javascript - Tracking only the page, not the querystring -
i'm looking track page user visits, not querystring (for privacy reasons).
is valid?
_gaq.push(['_trackpageview', document.location.pathname]);
so page that's:
x.com/section/page/?test=123
will logged as
/section/page
cheers
yes, work fine. passing second argument log pageview using value rather default value google analytics passing (location.pathname+location.search
), , pageviews appear without query string.
Comments
Post a Comment