Tracking Form Entries | Google Tag Manager - Zoho Forms

Google Tag Manager


If you are looking to understand how respondents interact with your form, Google Tag Manager (GTM) can help you add and manage analytics and measurement tags on your form to track events in Google Analytics when respondents view your form, click the form fields, review, save, and submit your form.
Watch a quick video to see how you could configure Google Tag Manager to track your form events  (using a Universal Analytics property). 


Pre-requisites

Before you configure to track events in your form, 

  1. Create a  Google Analytics account and configure a Google Analytics  Property .
  2. Create an account at tagmanager.google.com or you can use your existing account. A new container is created by default when you create an account.

After completing the pre-requisites, follow the steps below to configure and deploy the Google Analytics tags on your form using Google Tag Manager.

Installing Google Tag Manager in your form

To install Google Tag Manager in your form,

  1. In your Google Tag Manager account, go to  Workspace  and copy the container ID(GTM-XXXXXX) on the top of the window.
  2. In your form builder, navigate to the  Share tab >  Track Entries .
  3. Click  Google Tag Manager  and click  Configure .


  4. Paste the  Container ID .
  5. Enter an alternate name for your form in  Form Alias to identify it in Google Tag Manager.
  6. Under  Configure Events , select the form events from the following for which you want to push the event details to Google Tag Manager:
    • Form View : You can push an event when a respondent views your form.
    • Page View : If you have a multiple-page form, you can push an event when a respondent visits the selected pages. Enter an alias name for the selected pages to identify them in Google Tag Manager.
    • Onclick Fields : You can push an event when a respondent clicks the selected fields in your form. Enter an alias name for the selected fields to identify them in Google Tag Manager.
    • Review Form : You can push an event when a respondent reviews the form.
    • Save Form : You can push an event when a respondent saves your form.
    • Submit Form : You can push an event when a respondent submits your form.

  7. You can view the list of variables that will be pushed with each event by clicking  Variables .
  8. Click  Save.                               

Learn more about the considerations before you install Google Tag Manager.

Configuring Google Tag Manager

Google Tag Manager requires 3 main components to capture events:

  • Tags : Tags are code snippets or tracking pixels that collect and send data from your form to Google Analytics. Any tag that you create in Google Tag Manager gets fired in response to the event trigger associated with it. 
  • Triggers : Triggers instruct the Google Tag Manager on when to fire a tag based on the events detected in your form such as field clicks or form submissions. When an event matching the trigger definition is detected, the tag associated with that trigger will fire.
  • Variables : Variables are used to capture additional details related to an event. You can use variables in trigger conditions or to pass the information to the tags. For example, you can capture additional details from form events in Google Tag Manager, such as the fields clicked or the pages viewed using Data Layer Variables. 

    Supported Tags and Variables

    The following tables list the supported Tags and Variables:

    Tags ID
    Universal Analytics Tag ua
    Google Analytics 4 Configuration  gaawc
    Google Analytics 4 Event gaawe


    Variables ID
    Google Analytics Settings (legacy)  gas
    Auto-Event Variable v
    Constant c
    Custom Event e
    URL u

To track the selected Zoho Forms events in Google Analytics using Google Tag Manager, follow the steps below:

Configuring Custom Event Trigger

The following Zoho Forms events can be captured using the Custom Event Trigger Type in Google Tag Manager:
Event
Event Name
Form View
zf_formview
Page View
zf_pageview
Onclick Fields
zf_onclickfield
Review Form
zf_reviewform
Save Form
zf_saveform
Submit Form
zf_submitform

To configure a custom event trigger for the above events,

  1. In Google Tag Manager, click  Triggers from the left menu and click  New .
  2. Enter a name for the event (For example: Submit Form Trigger).
  3. Click  Trigger Configuration and choose the  Custom Event trigger type.
  4. Enter the  Event Name as given in the above table for the event that you wish to track. To track all the supported custom events in Zoho Forms, you can enter zf_* and select  Use regex matching to allow the field to handle regular expressions.
  5. Click  Save .




    Repeat the above steps in Google Tag Manager for the events selected in Zoho Forms.

Creating Data Layer Variables

The Data Layer is a virtual layer of your form that temporarily holds the data generated when a respondent interacts with your form. To capture this data from your form in Google Tag Manager, you will need to configure Data Layer Variables.

You can create the following Data Layer variables in Google Tag Manager to capture a form event data: 

  • zf_category : The source from which an event is captured (For example: Zoho Forms)
  • zf_action: Action that takes place in your form
  • zf_formname: Name of the form
  • zf_field : Field alias name of a field on being clicked
  • zf_page: Field alias name of a page on being viewed 

To create a Data Layer variable in Google Tag Manager, 

  1. In Google Tag Manager, click  Variables from the left menu.

  2. Under User-Defined Variables, click  New .

  3. Enter a name for the variable.

  4. Click  Variable Configuration and select  Data Layer Variable .

  5. Under  Data Layer Variable Name , enter the name of the variable as given in the above list (For example: zf_formname) and click  Save .





    Repeat the above steps to create all the Data Layer variables that you wish to push to Google Tag Manager.

    New variables may be added at the request of users.
Once you have configured the above steps, follow the below instructions depending on whether you have used the  Google Analytics Universal Analytics  Property or the  Google Analytics 4 Property .

Steps if  Google Analytics Universal Analytics  Property is used:

Creating Google Analytics Settings variable

The Google Analytics Settings variable is used while configuring a Universal Analytics tag. Once you have created this variable, you can reuse it to configure multiple Universal Analytics tags.

To create Google Analytics Settings variable,

  1. In Google Tag Manager, click  Variables from the left menu.

  2. Under  User-Defined Variables , click  New .

  3. Enter a name for the variable.

  4. Click  Variable Configuration and select  Google Analytics Settings under  Utilities .

  5. Enter your Google Analytics  Tracking ID and click  Save .



Creating Google Analytics Tag

To create a Universal Analytics tag, 

  1. In Google Tag Manager, click  Tags from the left menu and click  New .

  2. Enter a name for the tag (For example: Submit Form Tag).

  3. Click  Tag Configuration  and select Google Analytics: Universal Analytics .

  4. Under  Track Type,  select  Event .

  5. Enter the  Event Tracking Parameters : Under  Category , click the variable picker and select the data layer variables that you have created from the list to track them in Google Analytics.

  6. Under  Google Analytics Settings , select the Google Analytics Settings variable created earlier. If you have not created it already, select  New Variable from the list and create a Google Analytics Settings variable.

  7. Click  Triggering , and select a custom event trigger that you have created to associate it with the tag. 

  8. Click  Save .





    Repeat the above steps to configure more tags using the custom event triggers created.

    If your form's iframe is embedded in a website, you must make some 
    additional configurations  in Google Tag Manager.

Steps if  Google Analytics 4  Property is used:

Creating a Google Analytics 4 Configuration Tag

  1. In your Google Analytics account, go to  Admin  >  Data Streams Click the stream that you have created and copy the  MEASUREMENT ID   in the top-right corner of the pop-up.


  2. Now, in your Google Tag Manager container, click  Tags  from the left menu and click    New .
  3. Enter a suitable name for the tag (For example: GA4 Configuration Tag).
  4. Click  Tag Configuration  and select  Google Analytics : GA4 Configuration .
  5. Under  Measurement ID,  paste the ID that you have copied in step 1.
  6. Under  Triggering select  All Pages  and click  Save .



Note : If you keep the  Send a page view event when this configuration loads  option enabled, you may confuse between the page view event captured by Google Analytics with the page view event captured by Zoho Forms. Therefore, we recommend that you disable this option.

Creating a Google Analytics 4 Event Tag

  1. Click  New  to create another tag. Click    Tag Configuration  and select  Google Analytics : GA4 Event .
  2. Under  Configuration Tag select the GA4 Configuration Tag that you have created.
  3. Enter an Event Name.
  4. Under  Event Parameters click    Add Row  and select the data layer variables that you have created under  Value . Give the suitable  Parameter Name . Click Add Row to add more event parameters.
  5. Under    Triggering select the Custom Event trigger that you have created.
  6. Click  Save .

You can create more Google Analytics 4 Event Tags to track more form events.

Preview and Publish

Once you have configured and saved all your tags, you can click  Preview  in the top-right corner of Google Tag Manager to test and debug your configuration.

Click  Submit in the top-right corner to publish and push the changes to Zoho Forms. 

Note : Each time you make any changes to your Google Tag Manager configurations, hard refresh your form.

You can check the real time reports in Google Analytics under 
Reports  >  Realtime  >  Events.

Note :

  • Google Tag Manager can be configured only in our paid plans.
  • Configuring Google Tag Manager is not supported for forms with Payment field.
  • You can track form events only in Google Analytics using Google Tag Manager.

Tracking events when form is embedded in Website

If your form's iframe is embedded in a website, and you have configured to track events in both your website and form using Google Tag Manager, you must configure certain additional settings.

When your Form and Website have different domains

If your website and the form embedded in it are in different domains,  and you have used the Universal Analytics property:

  1. Ensure that you use the same Google Analytics Property across the website and the embedded form.
  2. In Google Tag Manager, check if the Cookie Domain parameter is set to auto in the Google Analytics Settings variable.
  3. While configuring the Google Analytics tag, click Fields to Set  under  More Settings .
  4. Enter the Field Name as cookieFlags and Value as  max-age=7200;secure;samesite=none .



If your website and the form embedded in it are in different domains, and you have used the Google Analytics 4 property:

  1. While configuring the Google Analytics : GA4 Configuration tag, click  Fields to Set  under   More Settings .
  2. Enter the  Field Name  as   cookie_flags   and  Value  as   max-age=7200;secure;samesite=none .
Note : If your website and the embedded form have different domains and you wish to capture a visitor's event flow in Google Analytics in a single session, you must create a custom domain  for your form to have the same domain as the website.

When your Form and Website have the same domain

If your form and website have the same domain, 

  1. Ensure that you use the same Google Analytics  Property across the website and the embedded form.

  2. In Google Tag Manager, check if the  Cookie Domain parameter is set to  auto in  Google Analytics Settings  Variable.

  3. In your Google Analytics account, go to  Admin  >  Property Column  >  Tracking Info  >  Referral Exclusion List . Enter the domain if it is not present already.

Refer to the FAQs on Google Tag Manager.

    Zoho DataPrep Personalized Demo

    If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

    Zoho CRM Training

      Create, share, and deliver

      beautiful slides from anywhere.

      Get Started Now





              Zoho CRM Training Programs

              Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

              Zoho CRM Training

                  Zoho SalesIQ Resources



                      Zoho TeamInbox Resources




                                Zoho DataPrep Resources

                                  Zoho DataPrep Demo

                                  Get a personalized demo or POC

                                  REGISTER NOW


                                    Design. Discuss. Deliver.

                                    Create visually engaging stories with Zoho Show.

                                    Get Started Now











                                                          • Related Articles

                                                          • Google Tag Manager

                                                            Why is my event showing up in GTM Preview but not in Google Analytics reports? If your form is embedded in a website, make sure that you have followed steps 3 and 4  here . Otherwise, if you have a standalone form, publish Google Tag Manager(GTM) ...
                                                          • Google Drive

                                                            Your form attachments will be saved to Google Drive when you choose this option.  To do this,  In your form builder, go to  Settings  and choose  Manage Form Attachments  from the left menu.  Choose  Google Drive  service. Authenticate  Zoho Forms to ...
                                                          • Google Sheets Integration

                                                            If you are looking to automate storing your form responses in a sheet and save the time spent on manual entry of form data into the sheet, you can use the Zoho Forms - Google Sheets integration. With this integration, your form responses will ...
                                                          • Google Calendar Integration

                                                            By integrating Zoho Forms with Google Calendar, you can schedule meetings and events, and manage guests in your calendar. With this integration, you can push form entries as events to your Google Calendar and associate guests with the calendar ...
                                                          • Saving attachments to Google Drive

                                                            If your form has attachment and signature fields, you can choose to save them in Google Drive using this integration.   To do this,   Select Yes to store file attachments and signatures under Google Drive . Select the Attachment and Signature fields ...

                                                          Resources

                                                          Videos

                                                          Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                          eBooks

                                                          Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                          Webinars

                                                          Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                          CRM Tips

                                                          Make the most of Zoho CRM with these useful tips.



                                                            Zoho Show Resources