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

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -