Track Gravity Forms Activity with Google Analytics 4.

📚 Manage Planet 4 > Integrate P4 > Set Up the Form Builder > Google Analytics 4

Before you start

Make sure to connect activate and connect Gravity Forms on your P4 website.

Tag Manager Setup

The form_submission event lets you track petition signups, quiz submissions, and more! You may have noticed it set up on your Global Analytics Property. Here’s how to take advantage of this feature on your Local Google Analytics 4 setup:

Create the dataLayer Variables in Google Tag Manager

Next, make sure you have a Data Layer Variable for “gGoal”. If not, create a new variable.  Under “Variable Configuration” set the Variable Type to “Data Layer Variable”, and set the Data Layer Variable Name to “gGoal”. Save this variable as “DLV – gGoal”.  

Repeat the steps above for the following variables: 

Variable NameVariable TypeSave As
formValueData Layer VariableDLV – formValue
formTitleData Layer VariableDLV – formTitle
formIDData Layer VariableDLV – formID
formPluginData Layer VariableDLV – formPlugin

You should now have five new Data Layer Variables on your Tag Manager workspace.

Create the GA4 Event Tag in Google Tag Manager

The next step is to create a GA4 Event Tag for a Form Submission event. Create a New Tag with the Tag Type “Google Analytics: GA4 Event”. For the Configuration Tag, select “GA4 Global Config. Tag”. Set the Event Name to “form_submission”. Save this event without any parameters (we will add parameters later!). 

Add Parameters and Triggers to the Form Submission Event

Finally, the last step is to add Parameters to your Form Submission event. Open the form_submission event you created earlier, and set the following Event Parameters:

Parameter NameValue
form_goal{{DLV – gGoal}}
form_plugin{{DLV – formPlugin}}
form_id{{DLV – formID}}
form_title{{DLV – formTitle}}
form_value{{DLV – formValue}}

Finally, set the event trigger to your NROs standard Form Submission trigger. 

⚠ Note: If you do not have a formSubmission trigger, you can create one by going to Triggers > New > Custom Event and set the event name to “formSubmission” or “Petition Signup”.

That’s it!

Congratulations! You now have the necessary tags and variables set up to track Gravity Forms activity in Google Analytics.

If your NRO is interested in tracking additional data points like pagination on multi-page forms, you may benefit from the Gravity Forms Google Analytics 4 Plug-in. Contact the Planet 4 team via Slack (#p4-general) or Email ([email protected]) with your use case to learn more!