Google analytics and request.resolver_match.url_name

23 views
Skip to first unread message

Alex Riina

unread,
Jul 7, 2017, 3:41:01 PM7/7/17
to Django users
I'm getting familiar with google analytics and stumbled upon https://developers.google.com/analytics/devguides/collection/analyticsjs/pages#modifying_page_urls in which the google docs recommend regexing out some unique ids. In django, it's a lot simpler to get something like /user/account/ from /user/USER_ID/account/ by using

  ga('set', 'page', "{{ request.resolver_match.url_name }}");

Is there any reason I should rethink that?
Reply all
Reply to author
Forward
0 new messages