开发者

Google Analytics and page tracking parameters

开发者 https://www.devze.com 2023-03-17 02:56 出处:网络
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

Below I've put some calls for page tracking:

  1. _gaq.push(['_trackPageview']) - takes URL listed in the URL bar at the top of the browser
  2. _gaq.push(['_trackPageview', '/sample/url']) - takes sample URL passed as a parameter
  3. _gaq.push(['_trackPageview', '']) - takes what...? (empty string or full URL like in case 1 ?)

I'm wondering开发者_JAVA百科 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消