You are here: Home // miscellaneous // Google analytics: Tracking conversions across subdomains

Google analytics: Tracking conversions across subdomains

We’ve recently had to break something of a sweat in figuring out how to track conversions using Google analytics, when the goal funnel involves sub-domains.

In case anyone else runs into similar problems, here’s what you do:

1) Add this line(in BOLD, below) to your Google Analytics code, on both the starting page(step 1) as well as the conversion page(step 2).

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
} catch(err) {}

2. Then, if your start page(where visitors land) is: and your conversion page(where people land after signup or something like that) is:, then you specify your funnel as:

Step 1:

Step 2:

3.  That’s it. You’re done.

Tags: , , ,

blog comments powered by Disqus
unlimited hosting  
Copyright © 2009 marcellus. All rights reserved.