How can I A/B test different color CTAs on my site?

Solved

How can I A/B test different color CTAs on my site?

PurplePartner
Shopify Partner
195 18 34

Hi!

 

I would like to A/B test my CTA by changing the colour of it. How can I display 2 different colours of the Add to Cart button in order to run an A/B test? Any ideas?

 

Thanks!

Did you find my response useful? Mark it as "Accepted solution" so others can see it, or just like it.
Accepted Solution (1)
theycallmemakka
Shopify Partner
1806 437 471

This is an accepted solution.

A good alternative to Google Optimize is VWO. If your website has <50k users, this is best as it provides Free Plan for users <50k

mangitma_0-1695639506015.png

 

Support Me: Buy me a Coffee


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com

View solution in original post

Replies 6 (6)

SpyProtect
Shopify Partner
10 1 3

You could add a custom code snippet to your Theme code files for the "Add to Cart" button that overwrites the style of the default "Add to Cart" button or adds a class to it that defines specific CSS for the color/style of the button. You can generate a random number 0 or 1 and based on that, apply specific styles/classes.

PS! This will not persist throughout the customer journey between pages so some pages will have "Add to Cart" buttons of a different color than they saw on a previous page. If you want the color to persist between pages then you need to save the random number that you generated on the first page load in your page's Local Storage or Cookies.

PurplePartner
Shopify Partner
195 18 34

Hi, Spy!

 

Thanks for the answer. Can you detail the second part of your message, please? The idea would be to have the same Add to Cart colour across the website for the same user. However, another user should have another colour. This is how I would like to perform the A/B Testing. Do you feel something like that is possible?

Did you find my response useful? Mark it as "Accepted solution" so others can see it, or just like it.
theycallmemakka
Shopify Partner
1806 437 471

Hi @PurplePartner ,

 

Creating a proper A/B test requires use of 3rd party tools. Google Optimize is a good tool that Google Provides which we can use to create a test. We can connect this test with Google Analytics and compare reports between multiple variants.  

 

However you are a little late to use Google Optimize. This is because Google Optimize will be available till september 30 only as this feature is being shut down by google. If you are expert in JS you can still use this to create A/B Test which can last for a week till 30th september.

 

Ref: https://support.google.com/optimize/answer/12979939?hl=en

 

All other tools are paid.

 

If you need to be done ASAP, feel free to contact me.

Support Me: Buy me a Coffee


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com

PurplePartner
Shopify Partner
195 18 34

Since Google Optimize will be deactivated, what other options do you recommend?

Did you find my response useful? Mark it as "Accepted solution" so others can see it, or just like it.
theycallmemakka
Shopify Partner
1806 437 471

This is an accepted solution.

A good alternative to Google Optimize is VWO. If your website has <50k users, this is best as it provides Free Plan for users <50k

mangitma_0-1695639506015.png

 

Support Me: Buy me a Coffee


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com

PurplePartner
Shopify Partner
195 18 34

Thanks! I will mark this as a solution.

Did you find my response useful? Mark it as "Accepted solution" so others can see it, or just like it.