Editor's note:
Thanks for visiting GA Tip of the Day. All of my newer posts are published on the E-Nor blog. Please visit and sign up for updates.
- Eric Fettman


Skip Content Experiment Validation When You Need To

view at full size

You can usually skip code placement error messages when setting up Content Experiments.

Among the many virtues of Content Experiments discussed in yesterday’s post was ease of setup. As long as your original, variation, and goal pages contain the Google Analytics tracking code, all that’s required for a Content Experiment is a single code snippet on the original page.

The issue is the positioning of this code within the page’s HTML. You’re instructed to place it immediately after the opening <head> tag. That’s easy to do if you happen to be working with a standlone HTML page, but since most websites are based on templates that provide the <head> tag for all pages, it’s often difficult to customize its contents for individual pages.

The good news is that JavaScript code tends not to be too fussy about its placement within a page. Even if you’re working with a template-based content management system and cannot easily alter the <head> tag, your Content Experiment should work correctly regardless of where you place the code on the original page.

You should keep in mind that the pageviews for the original page may be inflated if the tracking code executes in the original page before the experiment code is reached. When this happens, Google Analytics will record a pageview both for the original page, even though the visitor will probably never see it the browser, and for any variation page that the experiment code redirects to and the visitor does see.

This potential skewing of data for the original page, however, is more than offset by the benefits you’ll reap from testing, so don’t let error messages about code placement thwart your Content Experiments. Skip validation if you need to, forge ahead, and start making better design decisions with A/B testing.

Please share this post:
Facebook Twitter Plusone Linkedin Email

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>