How can you modify the URL for the current page that gets passed to Google Analytics?
(I need to strip the extensions from certain pages because for different cases a page can be requested with or without it and GA sees this as two different pages.)
For example, if the page URL is http://mysite/cake/ilikecake.html, how can I pass to google analytics http://mysite/cake/ilikecake instead?
I can strip the extension fine, I just can’t figure out how to pass the URL I want to Google Analytics. I’ve tried this, but the stats in the Google Analytics console don’t show any page views:
pageTracker._trackPageview(‘cake/ilikecake’);
Thanks, Mike
Two possibilities come to mind:
it can take a while, up to about 24 hours, for visits to be reflected in the Analytics statistics. How long ago did you make your change?
try beginning the pathname with a ‘/’, so
and then wait a bit, as per the first item.