Adding Zuko form tracking codes to your site

Every form set up in Zuko has a unique tracking and completion code.

Activity tracking code

This tracks views, starters, and all interactions with the fields and inputs on your form. Contains a unique 'slug' that identifies your form when data arrives at the Zuko servers. It will look something like this:

The slug will be different and unique for every form, and is generate automatically when you set up your form in Zuko

Completion tracking code

This tracks successful completions of your forms. Also contains the unique slug for your form. It will look like this:

The slug here should always match the one in the Activity Tracking Code

Nothing in either code dictates where the code should be placed on your site, which means you are free to put or fire these tags however works for your forms.

In plain english, you’ll need to configure the firing of codes to look something like this:

Where the form appears on your site - fire activity tracking code for form
When the form is successfully submitted - fire completion tracking code for form.

As long as you stick with this as guidance, it really is up to you how you fire the codes on your site, but below you can find some guidance on some different types of form setup.

Different types of form setup

Tag managers

Zuko can be added to your site directly or via a tag management system.

Single URL, single form, different URL for completion

This is the simplest form of set up. The Activity tracking code just needs to be fired on the form page, and Completion code on the thank you page.

Form contained within a pop up

This might be the case on a homepage which has a contact form that appears after clicking a button. You may not want to load Zuko on every page load as this will count towards your visit allowance for the month. You would therefore fire the Activity Tracking code when and only when the form becomes visible to your user. This might be on a click event when the button is clicked, or another event that represents the loading of the form.

No confirmation page forms

So for some forms there may not be a brand new URL loaded for the thank you message. In this case, you may need to fire the Zuko completion code when the confirmation message is made visible (and only then) - this can be triggered by an event on your website that signifies that this message has been shown.

Multi step URLs across multiple URLs

This is the best guide for this- https://www.zuko.io/guides/setting-up-a-multi-step-form-in-zuko

In short - each step is added as a new form in Zuko (with a different slug) and then the Activity and Completion codes are added in a chain throughout the form journey. Check the guide for more information on this!

Multi step forms on a single URL

This would be tracked as a single form within Zuko with a single slug. The Zuko code should be loaded once at the start of the journey and the completion code should be loaded when the entire journey is completed at the end. Zuko will take care of the rest.

Forms with multiple branches across different URLs

Guide for this - https://www.zuko.io/guides/setting-up-a-multi-step-form-in-zuko

In short - each step is added as a new form in Zuko (with a different slug) and then the activity and completion codes are added in a chain throughout the form journey.

Completion codes are added in every place that a user might get taken after completing a step.

For example completing Step 1 might take someone to Step 2A, Step 2B or Step 2C, so the completion code for Step 1 should be added to all three.

The same form on different URLs

Form pages

Thank you page

This can be added into Zuko as a single form using any of URLs - remember Zuko only looks at the domain and slug.

Then they can add the same tracking and completion codes to every single version of the forms.

Treating different forms as the same form

This can be done in the same way as above - simply adding the same tracking and completion codes to each form. If the slug is the same, Zuko will merge all of the data into one form in Zuko.

Single Page Apps (SPAs)

Set up as a single form in Zuko, with the activity tracking code added at the start, and the completion code fired right at the end on form submission.

Timings

The Zuko activity tracking code needs to be loaded after the form itself has been loaded onto a page. Sometimes this will mean that using Pageview as a trigger in GTM or other tag management system will not work, since the Zuko code will fire before the form ‘exists’ on the page. Consider using on Window Loaded, DOM ready, or a Timer trigger.

The most complete guide to installation can be found here: https://docs.zuko.io/knowledge-base/installation/


See more guides
Formisimo Ltd, Colony, 5 Piccadilly Place, Manchester, M1 3BR
VAT Number: GB181252425
Registered in England as company number 08859680
New Business: sales@zuko.io
Support: support@zuko.io
This website stores data such as cookies to enable important site functionality including analytics, targeting, and personalization. By remaining on this web site you indicate your consent.