Skip to content

Google Analytics Tracking to Multiple Profiles

Sometimes you need to use many Analytics site profiles to track the same information, for any reason. One instance is using tools like SEO Position Plus which may require a profile of its own.

Here's one way to do it with the new tracking code (not the legacy tracking, for that see this thread).

<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-xxxxxxx-1");
pageTracker._trackPageview();
var pageTracker2 = _gat._getTracker("UA-xxxxxxx-2");
pageTracker2._trackPageview();
} catch(err) {}</script>