: Google Analytics: How to keep word after # in URL? ex: /brands#my-brandname I'm having an issue where the Active Pages section only shows the path and not the term that appears after the #
I'm having an issue where the Active Pages section only shows the path and not the term that appears after the # (ex: mysite.com/brands#my-brandname shows up as mysite.com/brands). Is there a setting in the javascript for GA to log the # and everything after it?
More posts by @Sent6035632
1 Comments
Sorted by latest first Latest Oldest Best
You would have to include the hash portion in your pageviews like this:
_gaq.push(['_trackPageview', location.pathname + location.search + location.hash]);
if you are using classic GA, or like this if you are using Universal Analytics:
ga('send', 'pageview', {'page': location.pathname + location.search + location.hash});
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.