Add Google Analytics data to Zoho Forms with GA Connector’s Zoho Forms integration.
Install the custom scripts on your website
- 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’s <head> would work.
Note: If you are already using the cookie-based version of GA Connector, you can skip adding this script.
1<script data-cfasync="false"type="text/javascript"src="https://tracker.gaconnector.com/gaconnector.js"></script> - Add the following script after your Zoho Form embed code.
1234567891011121314151617181920212223242526272829<script>window.addEventListener('load', function() {try {var gaFields;function checkGaconnector() {return gaFields = gaconnector.getCookieValues(), !!gaFields.lc_source;}var interval = setInterval(function() {checkGaconnector() && (clearInterval(interval), updateZohoForm());}, 100);function updateZohoForm() {var URLparams = new URLSearchParams(gaFields).toString();var zohoIframe = document.querySelectorAll('iframe[src*="forms.zohopublic.com"]');if (zohoIframe === null) return;else if (zohoIframe.length === void 0) {var separator = zohoIframe.src.indexOf('?') > -1 ? '&' : '?';var newSrc = zohoIframe.src + separator + URLparams;zohoIframe.src = newSrc;} elsefor (var i = 0; i < zohoIframe.length; i++) { var separator = zohoIframe[i].src.indexOf('?') > -1 ? '&' : '?';var newSrc = zohoIframe[i].src + separator + URLparams;zohoIframe[i].src = newSrc;}}} catch (e) {}});</script>
Note: If you have custom domains set up in Zoho Forms, you’ll need to change the URL on line 15 to your own custom domain.Find line 15:
var zohoIframe = document.querySelectorAll(‘iframe[src*=”forms.zohopublic.com”]’);Change this to:
var zohoIframe = document.querySelectorAll(‘iframe[src*=”yourdomainhere.com]’);
Setting up the GA Connector fields on Zoho Forms
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 below this article.
- While on the Zoho form builder, drag a Single Line field to your form to add a field
- Click on the new field that you’ve created and select Properties, and under the Visibility section, select Hide Field
- After creating the hidden fields for each GA Connector field that you want to track, go to Settings > Field Alias
- On the Field Alias page, select the hidden fields that you have just created and add its equivalent GA Connector Input ID as the alias. (Example: All Traffic Sources: all_traffic_sources)
More than just UTM parameters
GA Connector adds UTM information, geolocation, referral information to your Zoho Forms leads.
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.
Label | Input ID | Label | Input ID |
---|---|---|---|
All Traffic Sources | all_traffic_sources | Last Click Campaign | lc_campaign |
Browser | browser | Last Click Channel | lc_channel |
City (from IP address) | city | Last Click Content | lc_content |
Country (from IP address) | country | Last Click Landing Page | lc_landing |
First Click Campaign | fc_campaign | Last Click Medium | lc_medium |
First Click Channel | fc_channel | Last Click Referrer | lc_referrer |
First Click Content | fc_content | Last Click Source | lc_source |
First Click Landing Page | fc_landing | Last Click Term | lc_term |
First Click Medium | fc_medium | Last Click Timestamp | lc_timestamp |
First Click Referrer | fc_referrer | Longitude | longitude |
First Click Source | fc_source | Latitude | latitude |
First Click Term | fc_term | Number of Website Visits | page_visits |
First Click Timestamp | fc_timestamp | Operating System | OS |
Google Analytics CID | GA_Client_ID | Device | device |
Google Analytics Measurement ID | GA_Measurement_ID | Region | region |
Google Analytics Session ID | GA_Session_ID | Pages Visited | pages_visited_list |
Google Click Identifier | gclid | Time Spent on Website | time_passed |
IP Address | ip_address | Time Zone | time_zone |