Reputation: 17064
Below I've put some calls for page tracking:
_gaq.push(['_trackPageview'])
- takes URL listed in the URL bar at the top of the browser_gaq.push(['_trackPageview', '/sample/url'])
- takes sample URL passed as a parameter_gaq.push(['_trackPageview', ''])
- takes what...? (empty string or full URL like in case 1 ?)I'm wondering if case 3 behaves in the same way case 1 - takes the URL listed in the URL bar at the top of the browser or an empty string ?
Regards
Upvotes: 3
Views: 3406
Reputation: 946
Yes, it will handle the trackPageview
call as if you did not provide a custom URI.
Open your website on Chrome and use the Google Analytics Tracking Code Debugger
I tried to manually push to _gaq and it logged the following:
_gaq.push(['_trackPageview', '']);
ga_debug.js:12_gaq.push processing : "[_trackPageview,]"
And a bit further down it showed me that the actual browser URI was submitted to Analytics.
Upvotes: 6