Tracking Multiple Goals (External + Internal) A/B Test

  • 5 January 2021
  • 3 replies
  • 28 views

I am currently tracking an external conversion - sign up completed in an A/B test. The CTA on the unbounce page leads to the sign up page. However, I would like to start tracking the CTR on the CTA as well. How can I do this so I can track which variant has a higher CTR and also track the overall conversion rate?

I don’t think Google Analytics lets me track the Unbounce variant.


3 replies

Userlevel 6
Badge +4

Hi @prateekgrwl and welcome to the community 😊

Actually GA is able to track the Unbounce variant. As long as you use the native GA-integration found under “integrations”.

Let’s say you are running your test on the URL ending with /example/. When using the native integration you’ll be able to see the different variations like this in GA:
/example/a
/example/b

I recommend setting a goal in GA that will track the button click. Unbounce creates events out of the box when using the native script, but I always define the events myself for improved control. In your example you could add a script (before body end tag) on the landing page variants like so:

<script>
  eventTracker.trackOne('#lp-pom-button-751', 'button', 'click', 'buy');
</script>  

Replace button id with your current button.

Now create the goal in GA using event
Category=button
Action=click
Label=buy

If you have more than one button you could even assign classes to the buttons - then set the script to fire on class instead of button id.

In this case use the following script to firing GA events:

<script>
  eventTracker.trackOne('.button-buy', 'button', 'click', 'buy');
</script>  

Hope this helps!

Hi @Finge thank you!

I’m actually using GTM so I’m thinking that switching to the native GA integration may create other complications since we have defined our tags on there. How do you suggest we can tackle the CTR issue?

Badge +1

Hi @prateekgrwl

I did a post sometime ago on how to track Unbounce variants in GTM. It’s a bit long winded but I hope this can help you achieve what you are trying to do 🙂

Reply