Fixing Direct Visit Issue For Google Analytics When Employing Website Optimizer

Fixing Direct Visit Issue For Google Analytics When Employing Website Optimizer

Fixing Direct Visit Issue For Google AnalyticsHere’s a piece of advice for those that are A/B testing page variations using Website Optimizer with Google Analytics on the same pages.

During recent testing we saw an abnormal increase in direct visits around the same time as the launch of one of our A/B  tests using. Drilling into the landing page dimension we could see that most of these new direct visits were going to the variant page. This threw a HUGE question up as to the impact of the Website optimizer redirect that allocates visits to the original and variant page.

The redirect causes the source cookie information to be overwritten as a direct visit, (obviously because the GA tracking code has not had a chance to fire on the original page.)

The simple solution is to move the Google Analytics tracking code ABOVE the Google Website Optimizer control script. Problem solved! Obviously this is not best practice as far as GA code placement is concerned but the negative impact on data quality justifies this for the period of time that tests are being carried out.

An extra tip is to add a ‘no robots’, ‘no follow’ tag to the variant page(s). Google does state that indexing should not be affected, but better to be safe than sorry!

Post By Jon Dyer (18 Posts)

Jon is the VP of Operations at TechWyse and analyzes everything. This includes your analytics accounts and the difference between Coke and Pepsi. He often shares with us his advanced level knowledge of campaign analysis and Google Analytics.

Website: →


It's a competitive market. Contact us to learn how you can stand out from the crowd.

Read Similar Blogs

Post a Comment


  • avatar

    Thanks Sean & Chris, and thanks for confirming “nofollow” Elan – SEO king!
    Grette, great question! To clarify… MVT’s do not redirect to another page so there is not the same issue with the GA code being missed.
    Also, definitely DO NOT to add “nofollow” to an MVT page because the test is in your existing page and it will remove it from the Google index. Note that there might be a little MVT impact on your ranking due to content changing, depending what you are testing!
    Hope this helps! 🙂

  • avatar

    Very helpful post Jon, thanks for sharing your practical wisdom here.
    Will this work in multivariate testing too?
    Other than the above solution is there any other way to fix the problem.
    Is adding ‘no follow’ attribute enough?

  • avatar

    Great post Jon. I will definitely be moving my tracking code!

  • avatar

    Jon, I agree with you for having “nofollow” meta tag in the header of all variant pages. It may prevent that page from indexing in all search engines.

  • avatar

    Good post Jon.
    By using the combination of Google Analytics and Website Optimizer, you will get a rich data which gives you insight into the progress of your tests. But to get the best results out of the two, you should combine both the tools in the best effective way. It’s possible issues that like you mentioned in the post can occur while using the combination to track an e-commerce site. Such issues should be sorted out as quickly as possible to ensure that you always get the correct data for analysis.

Ready To Rule The First Page of Google?

Contact us for an exclusive 20-minute assessment & strategy discussion. Fill out the form, and we will get back to you right away!

What Our Clients Have To Say

Luciano Zeppieri
Sharon Tierney
Sheena Owen
Andrea Bodi - Lab Works
Dr. Philip Solomon MD