| Note: This article is for the latest version of the tracking code. If you are using the older version, please read the following article. To determine which tracking code you are using, please see Which version of the tracking code am I using? |
If you're currently an Urchin software user and would like to also use Google Analytics, you can do so by making a small change to your Analytics tracking code. (If you don't yet have an Analytics account, you can sign up for one.)
- Copy your Google Analytics tracking code into a text editor.
- Add the line in bold below to your tracking code (your actual code will contain your account and profile number in place of xxxx-x):
<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">
try{
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._setLocalRemoteServerMode();
pageTracker._trackPageview();
} catch(err) {}
</script>This additional line will serve the pageview to Urchin on Demand Software as well as Google Analytics, allowing you to gather data with both products. Note that Urchin on Demand is different from the urchin.js legacy tracking code.
- Then, remove this line of code from your webpages: <script src="__utm.js" type="text/javascript">
- Add the tracking code to each of your pages.