2012/07/21

Checking Browser Source Code for Analytics Tracking Code


Set up tracking for web properties

You can check if a web page contains the Analytics Tracking code by viewing the browser source code for the page and searching for the tracking code. First navigate to the web page you want to verify and then follow the appropriate instructions for your browser.
In Firefox:
  1. Click View > Page Source from the browser's menu or press Ctrl-U.
  2. Type Ctrl-F to enter the Find menu
  3. Type in ga.js to locate the tracking code.
In Google Chrome:
  1. Press Ctrl-U.
  2. Type Ctrl-F to enter the Find menu
  3. Type in ga.js to locate the tracking code.
In Internet Explorer:
  1. From the menu, click View > Source.
  2. Type Ctrl-F to enter the Find menu
  3. Type in ga.js to locate the tracking code.
If your search succeeds, you will find a snippet of javascript code that looks like one of the following:
Older Version of the Google Analytics Tracking Code
<script type="text/javascript" src=" http://www.google-analytics.com/urchin.js "></script>
<script type="text/javascript">
_uacct = "UA-xxxxxx-x"
urchinTracker();
</script>
Newer Version of the Google Analytics Tracking Code
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._trackPageview();
</script>

沒有留言:

張貼留言

閱讀地圖

歷史上人為書而瘋狂, 但現實裡, 愛書的人仍有但是越來越難尋. 一切知識的傳播都是靠書, 書靠印刷術的發明的普及與傳播. 書,權勢的權力還是在讀者, 有讀者,書才會有意義..