Analytics
3.8K members online now
3.8K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Setting up A/B Testing with CSS Only

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi all,

 

I am wondering if there is a way to setup an experiment for A/B testing by using just CSS? We are wanting to test background colors on our site. So only the only thing that will be changing is the body {background-color:333;} vs. another color, etc.   

What would be the best way to do this? We are wanting the color change on the whole site.

 

Thanks!

 

Re: Setting up A/B Testing with CSS Only

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

Hi!

Unfortunately no. You have to use different URLs to start Content Experiments in Google Analytics. 

 

1LXUY4J.jpg

 

Source https://support.google.com/analytics/answer/1745147?hl=en

 

There are a lot of different services that you can use to test elements on your page, but I think it's easier (Smiley Happy) to copy a new page with background-color. 

 

Sergey

Setting up A/B Testing with CSS Only

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

I am not 100% sure, but it seems that you can test css.

 

I am trying it now, I'll let you know it goes. I entered the same page for original and variant, and used the google experiment api.

 

https://developers.google.com/analytics/solutions/experiments-client-side

 

Will let you know how it goes.