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.
Open up your Google Optimise account, and click the Edit button on your Variant:
Over on the right hand side, click the Add Code icon (‘<>’)::
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.
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.