Wednesday, January 05, 2011 1/05/2011 12:27:00 PM
Happy New Year fellow testers! We’ve just made a change to the Website Optimizer tags that will help your pages load faster, improve data accuracy, and eliminate tracking errors when tags are not fully loaded.
The next time you go to create an experiment, you’ll be given the new tags, which use asynchronous JavaScript. Asynchronous tagging, which is already a standard for Google Analytics, allows the Website Optimizer tracking and conversion scripts to run in parallel to your site loading. For Website Optimizer veterans, these new tags appear in Step 2 of the setup wizard -- be sure to read the instructions as the installation is slightly different.
Here’s five things you should know about the new tags:
- The traditional (non-async) snippets will continue to work if you want to use them. And there’s no need to retag experiments.
- We’ve combined the Control Script and Tracking Script into one snippet of code. Be sure not to double tag your pages.
- Async tags go immediately after the opening <head> tag on your test and conversion pages, not at the bottom of the page like the old tags.
- If you customize your Control Scripts (for experiments with cross-domain experiments and the like), the Control Script still uses urchin.js-style methods.
- Articles in the Help Center have been updated to reflect the new tags though we still have articles with the traditional tag for your reference.
Here’s to winning experiments in the new year.
12 comments:
Since the new code went live, i have been unable to start any tests. The preview does not show the changes on the different variations. could you look into this?
We're looking into the issue you're seeing. Would you mind sharing the website you're seeing the problem on?
How does asynchronous tagging improve data accuracy? Does it mean the previous data is not so accurate?
This is awesome but a few tweaks please:
- Fix the "<head" (add semi-colon).
- Provide a link to the "setup wizard" that contains Step 2 so I can see the new snippet.
Thanks.
@Wear,
Since the code executes faster, it prevents any tracking issues that occur when the code is not fully loaded prior to action. These tend to be edge cases. One scenario where this might happen is if you are tracking a click on a link as a conversion. If the conversion script hasn't fully loaded before the user clicks the link, then the conversion won't be recorded. We're talking on the order of milliseconds here, but with asynchronous tags these issues becomes even more rare.
@anonymous
Thanks, the head tag rendered fine in Chrome and Firefox, but I had not checked Safari, fixed.
There's not a way to link to a generic Step 2 since links are experiment specific, but you can see the new script throughout the Help Center. For example: http://www.google.com/support/websiteoptimizer/bin/answer.py?hl=en&answer=117912 (linked in the post) has the new Tracking and Conversion Scripts. Note that the lines in bold are additions made for that particular customization.
How can I validate the "old" conversion script? When I use the validate in step 2, I get errors since the "old" conversion script is on the page and not the "new" conversion script.
Thanks!
@Brighter Blooms
The page you're running an experiment on currently has Website Optimizer code for two different experiments. That's the issue you're seeing. The async tags are working normally.
@Sarah
I just tested a page with the old experiment tags and it validated without any problems. I'm guessing there's something wrong with how the tags are installed on your page that's causing validation to fail.
@Trevor -
Okay, I found the issue.
The issue is with the value in the gwoTracker tag.
The validation is looking for the number to in in "-2" but on the page the value ends in "-1". The 7 digit number after the UA- is the same in both places, it is just that last digit.
Is this truly an issue? Or can I run the test with this single digit being different?
validation: var gwoTracker=_gat._getTracker("UA-xxxxxxx-2");
my page: var gwoTracker=_gat._getTracker("UA-xxxxxxx-1");
Thanks so much for the help -
Sarah
Hi Sarah,
If the UA number on your page doesn't match the UA number that Website Optimizer provides then you won't get data. This includes final -X part. I'm not sure how you ended up with a different UA number. The move to async should not have had any effect on that.
Trevor -
Thank you so very much for the quick and understandable responses - I really appreciate it!
Is there a survey I can fill out saying how helpful you were so your boss can know?
Thanks again -
Sarah
Hopefully he reads the blog ;-)
Post a Comment
You are welcome to comment here, but your remarks should be relevant to the conversation. We reserve the right to remove off-topic comments, or self-promoting URLs, and vacuous messages. Please keep your comments relevant, friendly, and respectful.
We moderate all comments so you may not see your comment show right away.