Zoho Forms Advanced Tracking Code: UTM, gclid and Referrer

Zoho Forms Advanced Tracking: Capturing UTM, Google Ads and Referral Sources

Zoho Forms can record where each form respondent came from, so you can see which campaigns, ads, and channels bring in real enquiries. Its advanced tracking code goes further than reading UTM parameters from a link. It also recognises Google Ads clicks, and works out the source from search engines and referring websites when no tracking parameters are present. This article explains how it works, where to place it, and what to watch out for.

Before you start: tracking must be switched on for the form, with your tracking parameters defined, before the advanced tracking code is available. Our guide to the Zoho CRM and Zoho Forms integration explains how to turn tracking on: Zoho CRM and Zoho Forms Integration.

Add the advanced tracking code to your website

  1. With tracking enabled and your tracking parameters defined, click Get Tracking Code under Website Tracking.
  2. In the pop-up, copy the code shown under Advanced Tracking Code.
  3. Paste it into the footer of the web page where the form is embedded, just before the closing body tag.
  4. When you share your website link, add your tracking parameters to the link so the source can be recorded.
Embedded with JavaScript? If you embed the form using JavaScript rather than an iframe, place the tracking code in the head section of the page instead of the footer.

What it tracks, in order of priority

When this is present What is recorded
UTM parameters in the page URL (and any custom parameters you defined)The values are saved in browser cookies and passed to the form.
No UTM parameters, but a gclid from a Google Ads clickThe entry is recorded with utm_source set to Google Ads, utm_medium set to cpc, and utm_campaign set to not set.
Neither, but the visitor came from a search engineutm_source is the search engine, utm_medium is organic, and utm_term is filled in if it is available in the query string. Recognised engines are Google, Bing, Baidu, Yandex, Yahoo, and Ask.
Neither, and the visitor came from another websiteutm_source is the referring domain, and utm_medium is referral.

The last two rely on the browser sharing where the visitor came from, which it may not always do, so treat them as a good estimate and not a guarantee. To capture the exact page a respondent came from, add referrername as a custom parameter in your tracking settings.

How it works behind the scenes

  1. Once the page has finished loading, the script looks for a Zoho Form embedded in it.
  2. When it finds one, it reads the stored values from the cookies.
  3. It adds those parameters and values to the form's URL, so they arrive with the entry.

Cookies and consent

The script stores the values in cookies that Zoho categorises as marketing or tracking cookies.

Cookie Category
utm_sourceMarketing or tracking
utm_mediumMarketing or tracking
utm_campaignMarketing or tracking
utm_contentMarketing or tracking
utm_termMarketing or tracking

Any custom parameters you define, such as utm_offer_id to track a promotion's offer code, are stored in cookies in the same way. By default these cookies expire after 7 days. The form owner can change that from 0 days up to infinite validity, and if you choose infinite, the cookies stay in the visitor's browser until the visitor clears them.

UK and Ireland: because these are marketing or tracking cookies, you will usually need to cover them in your website's cookie notice and consent process, and may need consent before they are set. This is general guidance and not legal advice, so check your own obligations. A shorter expiry period is easier to justify than an infinite one.

WordPress: exclude the form from lazy loading

If you embed the form in WordPress and use the Smush plugin to lazy load images, the tracking code will not work unless you exclude the Zoho Forms iframe from lazy loading. Do this by adding the class no-lazyload to the iframe when you embed it. For example, an iframe tag that starts with class equals no-lazyload, followed by the usual source link to your form.

Checking that it works

  • Open your website through a link with test UTM parameters added, then submit the form.
  • Check that the entry shows the source, medium, and campaign you used.
  • Repeat with a link that has no parameters, to see how it records an organic or referral visit.
  • If nothing is captured, confirm the code sits in the right place, the form is embedded on the same page, and a cookie blocker or lazy loading is not stopping the script.
Need help? As a Zoho Partner serving the UK and Ireland, we can set up form tracking, connect it to Zoho CRM so lead sources are recorded automatically, and align it with your cookie consent. Email zoho@1cloudconsultants.com or raise a support request with 1 Cloud Consultants.