Warning! Website Optimizer A/B Testing and Analytics

Discuss, and evaluate the latest news and innovations in Website Analytics

Moderator: Moderators

Warning! Website Optimizer A/B Testing and Analytics

Postby jondyer » Wed Sep 16, 2009 10:43 am

A word of warning with A/B tests with Google Analytics running on a site.

The GWO control script (at the very top of the original page), sends a predefined amount of traffic to the variation page. This will cause visits to the variation page to be seen as a direct visit within analytics reports rather than the actual source that has brought a visitor to the site! The reason is because the GA code has not been allowed to run, since it is at the bottom of the original page.

The quick fix is to put the GA tracking code above the GWO control script at the very top of the original page

I wonder how many websites running optimizer A/B tests are seeing skewed data by this happening!
jondyer
 
Posts: 184
Joined: Mon Feb 02, 2009 11:16 am

Re: Warning! Website Optimizer A/B Testing and Analytics

Postby elan » Wed Sep 16, 2009 11:08 pm

Jon, its great to know that we are into GWO now!

But Jon, If the GA code is not allowed to run for variation page, how the visits for those pages will be calcuated as direct visits? Instead it shouldn't count those visits, right?

Correct me if I am wrong.
let's optimize everything
elan
 
Posts: 87
Joined: Thu Apr 02, 2009 4:42 am

Re: Warning! Website Optimizer A/B Testing and Analytics

Postby jondyer » Thu Sep 17, 2009 4:04 pm

A visit to the original page does not write a cookie... the control script passes the visitor to the variation page (e.g. index2.php) which runs the GA code and reads the source as a type in "direct".

The rest of the visit (and return visits) use a direct source.

Hope that clarifies! :)
jondyer
 
Posts: 184
Joined: Mon Feb 02, 2009 11:16 am

Re: Warning! Website Optimizer A/B Testing and Analytics

Postby elan » Thu Sep 17, 2009 10:04 pm

yes it does. thanks Jon!
let's optimize everything
elan
 
Posts: 87
Joined: Thu Apr 02, 2009 4:42 am

Re: Warning! Website Optimizer A/B Testing and Analytics

Postby latha » Thu Sep 17, 2009 10:23 pm

Placing the GA code in the header section might solve the issue. I think it is suggested GA code is placed right at the very bottom is to ensure that the whole page loads and then this code at the bottom gets executed.

The aim might be ensure that if there are Javascript errors or any other breaks in the page (which prevent the GA code from being executed), it should not be treated as a valid visit, either direct or revisit.
Is this the only solution?
latha
 

Re: Warning! Website Optimizer A/B Testing and Analytics

Postby Mike » Fri Sep 18, 2009 10:39 am

Placing the GA code anywhere except right before the closing HTML tag is not advisable.

JS includes and to some degree functions are blocking calls - they are required to execute before anything after the call is permitted. A failure in the JS will result in the rest of the page not displaying at all. If you do it in the head or right after the opening body tag that will be a nice white page.

Mike
Mike
 

Re: Warning! Website Optimizer A/B Testing and Analytics

Postby elan » Sun Sep 20, 2009 10:22 pm

Using GA code in head part is not advisable. A note from Google.

"By placing the script at the end of the page body, you ensure that the tracking code is executed as the last element of the DOM. If a given page load is interrupted for some reason, it is possible that the GIF request for that page view will not be executed. However, should you place the tracking code at the top of the page, any load interruptions might result in incomplete or inaccurate reporting anyhow, since the tracking code relies on page data for its reports."

But I see many sites using GWO have GA tracking code in their head part. Lets digg deep into this to find a solution.
let's optimize everything
elan
 
Posts: 87
Joined: Thu Apr 02, 2009 4:42 am

Re: Warning! Website Optimizer A/B Testing and Analytics

Postby jondyer » Tue Dec 15, 2009 9:35 pm

jondyer
 
Posts: 184
Joined: Mon Feb 02, 2009 11:16 am


Return to Web Analytics

Who is online

Users browsing this forum: No registered users and 2 guests