Tracking Google Optimize Variants in Zuko

If you’re using Google Optimize to run A/B tests on your form, you can track the performance of each version in Zuko by following these steps and setting a Custom Attribute for the Variants and Original.

Step 1

Open up your Google Optimise account, and click the Edit button on your Variant:

Step 2

Over on the right hand side, click the Add Code icon (‘<>’)::

Then click Global JavaScript:

Step 3

In the window that open, add the following code:

window.googleoptimizevariantzuko = 'variant_1';

You can change ‘variant_1’ - the latter should match the name you’ve given you variant. For example it might be called ‘Button Colour Change’ or something similar.

Now, everytime that Variant loads, a variable is going to be set. Now you need to amend your Zuko tracking tag to look for this attribute and send it to Zuko.

Step 4

Open up your Tag Manager account, open your Zuko tracking script and add the following line:

.setAttribute('Google Optimise Variant', window.googleoptimizevariantzuko || 'Not Set')

You can dd this between the slug line and the form view event line.

‘Google Optimise Variant’ can be changed - this is simply how this will appear in Zuko under the filter drop down menu.

You need to ensure that ‘window.googleoptimizevariantzuko’ exactly matches what you’ve set up in Google Optimize, otherwise the Zuko tracking script will error.

Now, if the visitor sees the variant of the page, an attribute of ‘variant_1’ will be pushed into Zuko, and you will be able to select it from the filter drop down menu in all of your reports.

If the visitor sees the original, an Attribute of ‘Not Set’ will appear in Zuko instead.

You can repeat the above for any form and any number of variants that you have set up in Google Optimize, and will therefore be able to filter your Zuko data to examine how the form-fill behaviour differs across different versions of your form.

See more guides
zuko full colour logo
Formisimo Ltd, Colony, 5 Piccadilly Place, Manchester, M1 3BR
VAT Number: GB181252425
Registered in England as company number 08859680
New Business: