Yahoo Web Analytics Script Updates
It may be necessary to update the tracking scripts on your website. Yahoo’s migration has resulted in some changes to how your tracking scripts should be installed. There are two options for updating your scripts outlined below:
Option 1 – Small Update to enable continued tracking through July of 2010
Changes:
1) Amend the noscript part of the tracking code on all your tracked pages to include the domain s.analytics.yahoo.com:
|
Pre-Migration Version 4 Tracking Code |
Optimized Version 4 Tracking Code |
!-- IndexTools Customization Code -->
<!-- Remove leading // to activate custom variables -->
<script type="text/javascript" language="Javascript">
//var DOCUMENTNAME='';
//var DOCUMENTGROUP='';
//var ACTION='';
</script>
<!-- End of Customization Code -->
<!-- IndexTools Code v4.00 - All rights reserved - ->
<script type="text/javascript" language="javascript1.1" src="/indextools.js"></script>
<noscript><img src="http://stats.indextools.com/p.pl?a=10001234567&js=no" width="1" height="1" alt="" /></noscript><!--//--> |
!-- IndexTools Customization Code -->
<!-- Remove leading // to activate custom variables -->
<script type="text/javascript" language="Javascript">
//var DOCUMENTNAME='';
//var DOCUMENTGROUP='';
//var ACTION='';
</script>
<!-- End of Customization Code -->
<!-- IndexTools Code v4.00 - All rights reserved -->
<script type="text/javascript" language="javascript1.1" src="/indextools.js"></script>
<noscript><img
src="http:// s.analytics.yahoo.com/p.pl?a=10001234567&js=no" width="1" height="1" alt="" /></noscript><!--//--> |
Summary: The new version of the JavaScript include file name remains the same (indextools.js or tracking.js), therefore the portion of the HTML tracking code referencing this file remains unchanged. However, the noscript part of the tracking code must be amended.
2) Download the new tracking JavaScript include file from the user interface for each project and replace the existing JavaScript include files on clients’ servers.
To do so, you need to complete the following steps:
- Log in to your account.
- Click on the Installation tab.
- Click on Version 4 of the tracking code.
- Select either the standard HTTP code or the secure HTTPS tracking code and proceed to the next page.
- Download the updated JavaScript include file and upload it to the correct server location.
Option 2 – Complete reinstallation of Version 5 Of the Tracking Code
Version 5 of the tracking code is Yahoo! Web Analytics branded code and takes a new format. This new version provides more control for customers, as it uses setter methods to call functions as opposed to the global variables used by earlier versions.
Post migration, all new projects created will use Version 5 of the tracking code and reference the JavaScript include file hosted by Yahoo! Web Analytics.
Upgrading to Version 5 of the tracking requires the following:
- Replace the individual page tags on all your tracked web properties with new tracking methods.
- Reference a generic Yahoo! Web Analytics JavaScript include file, which is no longer hosted by the client, but by Yahoo! Web Analytics.
For detailed information on how to use Version 5 tracking methods, see the Installation Guide posted under the Resources tab of the Partner Interface.
In the example below, please note that the JavaScript include file (ywa.js) is hosted by Yahoo! Web Analytics and not the client.
|
Old IndexTools Tracking Code |
New Yahoo! Web Analytics Tracking Code |
<!-- IndexTools Customization Code -->
<script type="text/javascript" language="Javascript">
var DOCUMENTNAME='About Us';
var DOCUMENTGROUP='Company Information';
var ACTION='01';
</script>
<!-- End of Customization Code -->
<!-- IndexTools Code v4.00 - All rights reserved -->
<script type="text/javascript" language="javascript1.1" src="/indextools.js"></script><noscript><img src="http://stats.indextools.com/p.pl?a=10001234567&js=no" width="1" height="1" alt="" /></noscript><!--//--> |
<!-- Yahoo! Web Analytics - All rights reserved -->
<script type="text/javascript"
src="http:// d.yimg.com/mi/eu/ywa.js">
</script> <script type="text/javascript>
var YWATracker = YWA.getTracker("10001234567");
YWATracker.setDocumentName("About us");
YWATracker.setDocumentGroup("Company Information");
YWATracker.setAction("01");
YWATracker.submit();
</script>
<!-- End of Yahoo! Web Analytics Code --> |