{"id":2849,"date":"2021-09-27T09:13:15","date_gmt":"2021-09-27T09:13:15","guid":{"rendered":"https:\/\/gaconnector.com\/docs\/?p=2849"},"modified":"2026-09-03T18:33:43","modified_gmt":"2026-09-03T18:33:43","slug":"how-to-integrate-ga-connector-with-zoho-forms","status":"publish","type":"post","link":"https:\/\/gaconnector.com\/docs\/how-to-integrate-ga-connector-with-zoho-forms\/","title":{"rendered":"How to integrate GA Connector with Zoho Forms"},"content":{"rendered":"<p>GA Connector works with Zoho Forms in <strong>both<\/strong> integration types. The steps are different for each, so start by confirming which one your website uses.<\/p>\n<p>Not sure which instructions to follow? Start here: <strong><a href=\"https:\/\/gaconnector.com\/docs\/how-to-check-which-ga-connector-integration-type-youre-using\/\">How to Check Which GA Connector Integration Type You\u2019re Using<\/a>.<\/strong><\/p>\n<p>The quick version: view your page source, search for <code>gaconnector.js<\/code>, and look at the subdomain. <code>tc.<\/code> or <code>tracker.<\/code> means Cookie-Based; <code>ta.<\/code> or <code>track.<\/code> means API-Based.<\/p>\n<h4><em>Add Google Analytics data to Zoho Forms with GA Connector\u2019s Zoho Forms integration.<\/em><\/h4>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>Installed either the GA Connector <a href=\"https:\/\/gaconnector.com\/download\/wordpress\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress plugin<\/a> or the GA Connector script on your website.<\/li>\n<li>Access to edit your Zoho Forms and your website\u2019s HTML (or your GTM container).<\/li>\n<\/ul>\n<hr \/>\n<h2>Cookie-Based integration<\/h2>\n<h3>Install the custom scripts on your website<\/h3>\n<ol>\n<li>Add the following GA Connector script on all pages of your website. The script must be placed before your Zoho embed code, so adding it to your website\u2019s <code>&lt;head&gt;<\/code> would work.<br \/>\n<em><strong>Note:<\/strong> If you are already using the cookie-based version of GA Connector, you can skip adding this script.<\/em><\/p>\n<pre class=\"lang:default decode:true\">&lt;script data-cfasync=\"false\" type=\"text\/javascript\" src=\"https:\/\/tracker.gaconnector.com\/gaconnector.js\"&gt;&lt;\/script&gt;<\/pre>\n<\/li>\n<li>Add the following script after your Zoho Form embed code.\n<pre class=\"lang:js decode:true\">&lt;script&gt;\r\nwindow.addEventListener('load', function() {\r\n    try {\r\n        var gaFields;\r\n\r\n        function checkGaconnector() {\r\n            return gaFields = gaconnector.getCookieValues(), !!gaFields.lc_source;\r\n        }\r\n        var interval = setInterval(function() {\r\n            checkGaconnector() &amp;&amp; (clearInterval(interval), updateZohoForm());\r\n        }, 100);\r\n\r\n        function updateZohoForm() {\r\n            var URLparams = new URLSearchParams(gaFields).toString();\r\n            var zohoIframe = document.querySelectorAll('iframe[src*=\"forms.zohopublic.com\"]');\r\n            if (zohoIframe === null) return;\r\n            else if (zohoIframe.length === void 0) {\r\n                var separator = zohoIframe.src.indexOf('?') &gt; -1 ? '&amp;' : '?';\r\n                var newSrc = zohoIframe.src + separator + URLparams;\r\n                zohoIframe.src = newSrc;\r\n            } else\r\n                for (var i = 0; i &lt; zohoIframe.length; i++) { var separator = zohoIframe[i].src.indexOf('?') &gt; -1 ? '&amp;' : '?';\r\n                    var newSrc = zohoIframe[i].src + separator + URLparams;\r\n                    zohoIframe[i].src = newSrc;\r\n                }\r\n        }\r\n    } catch (e) {}\r\n});\r\n&lt;\/script&gt;<\/pre>\n<p><em><strong>Note:<\/strong> If you have custom domains set up in Zoho Forms, you\u2019ll need to change the URL on line 15 to your own custom domain.<\/em><\/p>\n<p><strong>Find line 15:<\/strong><br \/>\n<code>var zohoIframe = document.querySelectorAll('iframe[src*=\"forms.zohopublic.com\"]');<\/code><\/p>\n<p><strong>Change this to:<\/strong><br \/>\n<code>var zohoIframe = document.querySelectorAll('iframe[src*=\"yourdomainhere.com\"]');<\/code><\/li>\n<\/ol>\n<h3>Setting up the GA Connector fields on Zoho Forms<\/h3>\n<p>On your Zoho Forms builder, add a hidden field for each GA Connector field that you want to track. For a full list of available GA Connector fields, refer to the table at the end of this article.<\/p>\n<ol>\n<li>While on the Zoho form builder, drag a <strong>Single Line<\/strong> field to your form to add a field.<\/li>\n<li>Click on the new field that you\u2019ve created and select <strong>Properties<\/strong>, and under the <strong>Visibility<\/strong> section, select <strong>Hide Field<\/strong>.<\/li>\n<li>After creating the hidden fields for each GA Connector field that you want to track, go to <strong>Settings &gt; Field Alias<\/strong>.<\/li>\n<li>On the Field Alias page, select the hidden fields that you have just created and add its equivalent <strong>GA Connector Input ID<\/strong> as the alias. (<em>Example: All Traffic Sources: all_traffic_sources<\/em>)<\/li>\n<\/ol>\n<hr \/>\n<h2>API-Based integration<\/h2>\n<p>The API-based version doesn\u2019t use hidden fields. Instead, Zoho Forms passes the submitted email address to GA Connector, which matches it with the visitor\u2019s tracking data on our servers and syncs it to your CRM.<\/p>\n<h3>Step 1: Enable PostMessage tracking in Zoho Forms<\/h3>\n<ol>\n<li>Open your form in Zoho Forms and click <strong>Edit<\/strong>.<\/li>\n<li>Go to <strong>Share &gt; Google Tag Manager &amp; Custom Tracking<\/strong>.<\/li>\n<li>Under <strong>PostMessage Tracking<\/strong>, enable <strong>Submit Form<\/strong> and select <strong>Configure Website Data Push<\/strong>.<\/li>\n<li>Find your form\u2019s email field and map it to the Field Alias <code>zf_email<\/code>.<\/li>\n<li>Click <strong>Save<\/strong>.<\/li>\n<li>Repeat for all of your forms.<\/li>\n<\/ol>\n<div class=\"gac-callout gac-warning\">\n<p><span class=\"gac-label\">Use the same alias on every form.<\/span><\/p>\n<p>The script below looks for the alias <code>zf_email<\/code>. If you use a different alias on a form, that submission won\u2019t be identified.<\/p>\n<\/div>\n<h3>Step 2: Replace your GA Connector script<\/h3>\n<p>Replace your current GA Connector script with the following, on all pages of your website:<\/p>\n<pre class=\"lang:js decode:true\">&lt;script src=\"https:\/\/track.gaconnector.com\/gaconnector.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\r\n&lt;script type=\"text\/javascript\"&gt;gaconnector2.track('YOUR GA CONNECTOR ACCOUNT ID');&lt;\/script&gt;\r\n&lt;script&gt;\r\n\/* --- Zoho Forms Integration --- *\/\r\nvar GAC_EMAIL_FIELD = 'zf_email';\r\nwindow.addEventListener('message', function(event) {\r\n    var frame = document.querySelector('iframe[src*=\"\/formperma\/\"]');\r\n    if (!frame || event.origin !== new URL(frame.src).origin) return;\r\n    var payload = event.data &amp;&amp; event.data.payload;\r\n    if (!payload || payload.e !== 'zf_submitform') return;\r\n    var email = payload.d &amp;&amp; payload.d[GAC_EMAIL_FIELD];\r\n    if (!email) return;\r\n    if (typeof gaconnector2 === 'undefined') return;\r\n    gaconnector2.identify('email', email);\r\n});\r\n&lt;\/script&gt;<\/pre>\n<div class=\"gac-callout gac-warning\">\n<p><span class=\"gac-label\">Set your account ID.<\/span><\/p>\n<p>Replace <code>YOUR GA CONNECTOR ACCOUNT ID<\/code> with your own GA Connector account ID. You can find it in <a href=\"https:\/\/gaconnector.com\/docs\/find-account-id\/\">your GA Connector account<\/a>. If you haven\u2019t received yours yet, please email support@gaconnector.com.<\/p>\n<\/div>\n<div class=\"gac-callout gac-note\">\n<p><span class=\"gac-label\">Keep your existing tracking subdomain.<\/span><\/p>\n<p>If your current script loads <code>gaconnector.js<\/code> from <code>ta.gaconnector.com<\/code> instead of <code>track.gaconnector.com<\/code>, keep the subdomain you\u2019re already using and only add the third script block.<\/p>\n<\/div>\n<p>The GA Connector script must be placed on every page of your website, ideally in the <code>&lt;head&gt;<\/code> or at the very beginning of the <code>&lt;body&gt;<\/code> tag, so visitors are tracked from their first page view.<\/p>\n<h3>Checking that it works<\/h3>\n<ol>\n<li>Open a page with your embedded Zoho form and submit a test entry with an email address you can recognize.<\/li>\n<li>In your browser\u2019s developer tools, open the <strong>Network<\/strong> tab and confirm a request is sent to the GA Connector tracking domain on submit.<\/li>\n<li>Check the matching record in your CRM. API-based tracking data syncs with a 15\u201330 minute delay, so give it some time before checking.<\/li>\n<\/ol>\n<h3>Still stuck?<\/h3>\n<p>If submissions aren\u2019t being identified, <a href=\"https:\/\/gaconnector.com\/support\/\">contact our support team<\/a> and include the page where your form is embedded so we can take a look.<\/p>\n<hr \/>\n<h2>More than just UTM parameters<\/h2>\n<p>GA Connector adds UTM information, geolocation, referral information to your Zoho Forms leads.<\/p>\n<p>See below for all the information that you can add to your leads to help you find out which of your marketing activities drive sales. (<em>The Input IDs below are the field aliases used by the Cookie-Based integration.<\/em>)<\/p>\n\n<table id=\"tablepress-6\" class=\"tablepress tablepress-id-6\">\n<thead>\n<tr class=\"row-1 odd\">\n\t<th class=\"column-1\">Label<\/th><th class=\"column-2\">Input ID<\/th><th class=\"column-3\">Label<\/th><th class=\"column-4\">Input ID<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-hover\">\n<tr class=\"row-2 even\">\n\t<td class=\"column-1\"><strong>All Traffic Sources <\/strong><\/td><td class=\"column-2\">all_traffic_sources<\/td><td class=\"column-3\"><strong>Last Click Campaign<\/strong><\/td><td class=\"column-4\">lc_campaign<\/td>\n<\/tr>\n<tr class=\"row-3 odd\">\n\t<td class=\"column-1\"><strong>Browser<\/strong><\/td><td class=\"column-2\">browser<\/td><td class=\"column-3\"><strong>Last Click Channel<\/strong><\/td><td class=\"column-4\">lc_channel<\/td>\n<\/tr>\n<tr class=\"row-4 even\">\n\t<td class=\"column-1\"><strong>City (from IP address)<\/strong><\/td><td class=\"column-2\">city<\/td><td class=\"column-3\"><strong>Last Click Content<\/strong><\/td><td class=\"column-4\">lc_content<\/td>\n<\/tr>\n<tr class=\"row-5 odd\">\n\t<td class=\"column-1\"><strong>Country (from IP address)<\/strong><\/td><td class=\"column-2\">country<\/td><td class=\"column-3\"><strong>Last Click Landing Page<\/strong><\/td><td class=\"column-4\">lc_landing<\/td>\n<\/tr>\n<tr class=\"row-6 even\">\n\t<td class=\"column-1\"><strong>First Click Campaign<\/strong><\/td><td class=\"column-2\">fc_campaign<\/td><td class=\"column-3\"><strong>Last Click Medium<\/strong><\/td><td class=\"column-4\">lc_medium<\/td>\n<\/tr>\n<tr class=\"row-7 odd\">\n\t<td class=\"column-1\"><strong>First Click Channel<\/strong><\/td><td class=\"column-2\">fc_channel<\/td><td class=\"column-3\"><strong>Last Click Referrer<\/strong><\/td><td class=\"column-4\">lc_referrer<\/td>\n<\/tr>\n<tr class=\"row-8 even\">\n\t<td class=\"column-1\"><strong>First Click Content<\/strong><\/td><td class=\"column-2\">fc_content<\/td><td class=\"column-3\"><strong>Last Click Source<\/strong><\/td><td class=\"column-4\">lc_source<\/td>\n<\/tr>\n<tr class=\"row-9 odd\">\n\t<td class=\"column-1\"><strong>First Click Landing Page<\/strong><\/td><td class=\"column-2\">fc_landing<\/td><td class=\"column-3\"><strong>Last Click Term<\/strong><\/td><td class=\"column-4\">lc_term<\/td>\n<\/tr>\n<tr class=\"row-10 even\">\n\t<td class=\"column-1\"><strong>First Click Medium <\/strong><\/td><td class=\"column-2\">fc_medium<\/td><td class=\"column-3\"><strong>Last Click Timestamp<\/strong><\/td><td class=\"column-4\">lc_timestamp<\/td>\n<\/tr>\n<tr class=\"row-11 odd\">\n\t<td class=\"column-1\"><strong>First Click Referrer<\/strong><\/td><td class=\"column-2\">fc_referrer<\/td><td class=\"column-3\"><strong>Longitude<\/strong><\/td><td class=\"column-4\">longitude<\/td>\n<\/tr>\n<tr class=\"row-12 even\">\n\t<td class=\"column-1\"><strong>First Click Source<\/strong><\/td><td class=\"column-2\">fc_source<\/td><td class=\"column-3\"><strong>Latitude<\/strong><\/td><td class=\"column-4\">latitude<\/td>\n<\/tr>\n<tr class=\"row-13 odd\">\n\t<td class=\"column-1\"><strong>First Click Term<\/strong><\/td><td class=\"column-2\">fc_term<\/td><td class=\"column-3\"><strong>Number of Website Visits<\/strong><\/td><td class=\"column-4\">page_visits<\/td>\n<\/tr>\n<tr class=\"row-14 even\">\n\t<td class=\"column-1\"><strong>First Click Timestamp<\/strong><\/td><td class=\"column-2\">fc_timestamp<\/td><td class=\"column-3\"><strong>Operating System<\/strong><\/td><td class=\"column-4\">OS<\/td>\n<\/tr>\n<tr class=\"row-15 odd\">\n\t<td class=\"column-1\"><strong>Google Analytics CID<\/strong><\/td><td class=\"column-2\">GA_Client_ID<\/td><td class=\"column-3\"><strong>Device<\/strong><\/td><td class=\"column-4\">device<\/td>\n<\/tr>\n<tr class=\"row-16 even\">\n\t<td class=\"column-1\"><strong>Google Analytics Measurement ID<\/strong><\/td><td class=\"column-2\">GA_Measurement_ID<\/td><td class=\"column-3\"><strong>Region<\/strong><\/td><td class=\"column-4\">region<\/td>\n<\/tr>\n<tr class=\"row-17 odd\">\n\t<td class=\"column-1\"><strong>Google Analytics Session ID<\/strong><\/td><td class=\"column-2\">GA_Session_ID<\/td><td class=\"column-3\"><strong>Pages Visited <\/strong><\/td><td class=\"column-4\">pages_visited_list<\/td>\n<\/tr>\n<tr class=\"row-18 even\">\n\t<td class=\"column-1\"><strong>Google Click Identifier<\/strong><\/td><td class=\"column-2\">gclid<\/td><td class=\"column-3\"><strong>Time Spent on Website <\/strong><\/td><td class=\"column-4\">time_passed<\/td>\n<\/tr>\n<tr class=\"row-19 odd\">\n\t<td class=\"column-1\"><strong>IP Address<\/strong><\/td><td class=\"column-2\">ip_address<\/td><td class=\"column-3\"><strong>Time Zone <\/strong><\/td><td class=\"column-4\">time_zone<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-6 from cache -->\n","protected":false},"excerpt":{"rendered":"<p>GA Connector works with Zoho Forms in both integration types. The steps are different for each, so start by confirming which one your website uses. Not sure which instructions to follow? Start here: How to Check Which GA Connector Integration Type You\u2019re Using. The quick version: view your page source, search for gaconnector.js, and look [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[72],"tags":[],"_links":{"self":[{"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/posts\/2849"}],"collection":[{"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/comments?post=2849"}],"version-history":[{"count":37,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/posts\/2849\/revisions"}],"predecessor-version":[{"id":3885,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/posts\/2849\/revisions\/3885"}],"wp:attachment":[{"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/media?parent=2849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/categories?post=2849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/tags?post=2849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}