940cbdbde921b1b01bc102855d1b90fb

Using Google Tag Manager for Gravity Forms Field Tracking

Get better insights by tracking form field submissions in Google Analytics.

In this article, you will learn how to extract data from form fields submitted using Gravity Forms and track that data in Google Analytics (GA). You can use this data to then create reports to gain a deeper understanding of your customers.


Step 1: Setup Form Submission Tracking

For this to work, make sure Form Submission Tracking is set up on your forms, follow our guide on How to use Google Tag Manager to track Gravity From submissions before you begin Step 2.

Step 2: Finding the Input ID

  1. From your Google Tag Manager workspace, open up Tag Assistant by clicking the Preview button

  2. Enter your live website URL and click the blue connect button. Once connected click the blue continue button.

    You will now have two browser windows/tabs open, one with your website, and one window with Tag assistant.

  3. In the window with your website open, navigate to the page your form is on, fill out the form, and submit it.

  4. Next, open the tab/window that has tag assistant open. It would have recorded the information from the form submission.

  5. From the summary on the left-hand side, click gravityFormSubmission

  6. Then click the Data Layer tab

  7. The data layer tab will have the values recorded from your form, here you will be able to match your input ID numbers with the form fields.

    Eg: input_5: “St Kilda” is the answer to my forms dropdown menu “Which is your closest franchise?”

    You will want to note down which fields you wish to track and what their ID number is for the next step.

Step 3: Create a Form ID Data Layer Variable

  1. From your Google Tag Manager workspace, go to Variables then add a New User-Defined Variable

  2. Name your variable, This can be whatever you like, I am going to Name mine GFformID5-Franchise

  3. Configure your variable, Variable Type: Data Layer Variable

  4. Data Layer Variable Name: gfformSubmission.input_5 (case sensitive), I am using input 5 as this is the field I wish to track, yours might be different (see step 2.6).

  5. Data Layer Version: Version 2. Leave set default value unticked.

  6. Click Save

  7. Press the blue Submit button to publish your GTM workspace then we’ll move on to setting up Google Analytics goals!

Step 4: Creating a GTM Tag for the Form Field

  1. From your Google Tag Manager workspace, navigate to Tags

  2. Find the tag previously created called “Gravity Form Submission” and click into it. Once open click the three dots in the top right corner, then click copy. This will duplicate the setup.

  3. With the duplicated setup, enter a new name, I will call mine “What is your closest franchise” to match my gravity form field.

  4. Click to configure the tag.

  5. Update the Category field, this will show in your google analytics account, I will name mine “What is your closest franchise?”

  6. Update the Label field, by entering the Variable tag you created in Step 3.2
    Eg. Mine will be #{{GFformID5-Franchise}}

  7. Leave all other fields the same and click save.

  8. Press the blue Submit button to publish your GTM workspace.

Step 5: Test in Google Analytics

Finally, verify the implementation by submitting a few test submissions to the website. You will be able to use Google Analytics real-time reporting to look for events firing.

If you don’t see them, make sure your browser’s plugins or opt-out extensions aren’t blocking traffic. For ideal testing conditions, use a totally unfiltered GA view and submit the form on a mobile device using a 3g/4g/5g (no wifi).

That’s it! 🎉


Strattic is an end-to-end managed WordPress static publishing and hosting platform.
Try it free for 14 days, no credit card required.

Did this answer your question?