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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -