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:
- Click View > Page Source from the browser's menu or press Ctrl-U.
- Type Ctrl-F to enter the Find menu
- Type in ga.js to locate the tracking code.
- Press Ctrl-U.
- Type Ctrl-F to enter the Find menu
- Type in ga.js to locate the tracking code.
In Internet Explorer:
- From the menu, click View > Source.
- Type Ctrl-F to enter the Find menu
- 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>
_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>
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>
沒有留言:
張貼留言