2.2K members online now
2.2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

Starting Google Experiments on button click

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭



So what I am trying to do is implement a Google Experiment which only runs when a button on the webpage is clicked. For example, if I have www.test/home.html as my original page and www.test/home/2.html as my variant page, I only want to trigger this experiment through the click of a button. If the user directly accesses the www.test/home.html link then they will be brought to this page and not trigger the experiment.

I was wondering if this was possible and if so, would you be able to point me in the right direction.



1 Expert replyverified_user

Re: Starting Google Experiments on button click

Rising Star
# 2
Rising Star
Hey Gareth,

This may be a little past what content experiments does well and might be a case for Optimize or Optimizely.

That said, if the user clicks the button then take them to a unique URL (use canonical tags or noindex) like/home3.html and use that as your test target. That could be a duplicate of your other page (but only accessible via the button click) and then have that be your experiment audience (1/2 would see this duplicate and half would see the variant - if you had 100 audience).

If you need anything other than that, use one of the other tools.


Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn