Setting Up Google Analytics 4 Event Tracking in Workflows
Overview
You can use the Google Analytics 4 (GA4) tracking feature within your CRM workflows to capture and analyze user interactions. This allows you to send custom event data directly to your GA4 property, providing deeper insights into user behavior across your website, app, and other digital channels.
Configuring a Workflow for Google Analytics 4
Follow these steps to set up GA4 event tracking using a workflow action.
Step 1: Add the Google Analytics Action to Your Workflow
Navigate to the workflow you wish to edit. Add a new action and select 'Add to Google Analytics'. In the action settings, locate the 'Action Type' dropdown menu and select 'Google Analytics 4'.
Step 2: Obtain and Enter Your Measurement ID
You need your GA4 Measurement ID. To find it, log into your Google Analytics account. Go to the Admin section, select the appropriate Data Stream, and copy the Measurement ID. Paste this ID into the 'Measurement ID' field in your CRM workflow action.
Step 3: Define the Event to Track
In the workflow action, enter a name for the event you want to track in the designated field. This event name will appear in your Google Analytics reports. You can also optionally specify an 'Event Value' to send a numeric value (like a purchase amount or score) with the event. This value can be a fixed number or a dynamic value pulled from the workflow.
Step 4: Obtain and Enter Your API Secret
You also need an API Secret from Google Analytics. In your Google Analytics account, go to Admin, then your Data Stream, and find the 'Measurement Protocol API secrets' section. Create a new secret if you don't have one, giving it a recognizable name. Copy the generated secret value. Paste this value into the 'API Secret' field in your workflow action. Be careful not to include any extra spaces before or after the secret when pasting.
Step 5: Save and Activate Your Workflow
After filling in all the required fields, save the action and then save the entire workflow. Remember to publish the workflow for the tracking to become active.
Important Note
After the workflow triggers and executes, please allow 24 to 48 hours for the event data to appear in your Google Analytics dashboard.