homepage Welcome to WebmasterWorld Guest from 54.237.95.6
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Visit PubCon.com
Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: Receptional & mademetop

Website Analytics - Tracking and Logging Forum

    
Multiple Tracking codes
intruder2000




msg:3781853
 11:39 am on Nov 7, 2008 (gmt 0)

I hould like to install multiple Google tracking codes ( the uacct = "UA-#*$!#*$!-X";) on a single page. The purpose behind this is that on this specific page, there are multiple vendors who supply content and need to track usage.

I added two UA tags but Google only provided tracking information to the second UA tag.

Does anyone know if it is possible to have two or more Google UA tags on the same page?

I've got the same problem. Does anybody know if it's possible?

 

mark_roach




msg:3781882
 12:45 pm on Nov 7, 2008 (gmt 0)

Yes you can track a single page in multiple accounts. The following code should do the trick:


<script type="text/javascript">
var firstTracker = _gat._getTracker("UA-YYYYYYY-1");
firstTracker._initData();
firstTracker._trackPageview();


var secondTracker = _gat._getTracker("UA-ZZZZZZZ-1");
secondTracker._initData();
secondTracker._trackPageview();
</script>

intruder2000




msg:3781903
 1:20 pm on Nov 7, 2008 (gmt 0)

Hi Mark,

Thanks for your post!

In the Website I want to track I have the following code:

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-YYYYYYY-3";
_uacct = "UA-ZZZZZZZ-1";
urchinTracker();
</script>

</body>
</html>

I will substitute your code for my 6 current code lines above. Is that all I need to do?
I can't test it right now because I don't have FTP access with me.

Tanks a lot!

mark_roach




msg:3781929
 1:57 pm on Nov 7, 2008 (gmt 0)

The code I posted is for the most recent version of the analytics code. You are currently using the older version. If you are not doing any fancy tracking is is very straightforward to migrate to the newer version

Adding the new tracking code [google.com]

There is a migration guide [google.com] on the analytics site, for converting more complicated tracking.

In the migration guide it shows an example of multiple tracking for the older version:


<script type="text/javascript">
_uacct = "UA-#*$!XX-X";
urchinTracker();
_uff = 0; // Reset flag to allow for second account
_uacct = "UA-#*$!XX-X";
</script>

I have never used the older version but I think there might be a typo. If the above code doesn't work I would try:


<script type="text/javascript">
_uacct = "UA-YYYYY-Y;
urchinTracker();
_uff = 0; // Reset flag to allow for second account
_uacct = "UA-ZZZZZ-Z;
urchinTracker();
</script>

Welcome to Webmasterworld BTW.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved