Google Analytics 4 tracking
The Add to Google Analytics workflow action sends event data to Google Analytics 4 (GA4) using a Measurement ID and an API Secret, so you can track member behavior across your website, portal, and other channels. GA4 is Google's latest analytics platform and offers cross-device tracking, machine-learning insights, and enhanced event tracking. The same action also supports Universal Analytics, so you choose the platform you track with.
After the workflow runs, it can take 24 to 48 hours for the data to appear in Google Analytics.
Add the Google Analytics 4 action to a workflow
Open the workflow where you want to record the event, then add the action and choose the GA4 option.
Open Automations > Workflows and create or open the workflow.
Select the Add to Google Analytics action.
Set Action Type to Google Analytics 4.
Add the Measurement ID
The Measurement ID identifies the GA4 data stream that receives your events. Copy it from your Google Analytics account.
In Google Analytics, go to Admin > Account Settings > Data Stream and select the data stream.
Copy the Measurement ID for the data stream you want to use.
Paste it into the Measurement ID field of the Google Analytics action in your workflow.
Set the event name and value
Enter the name of the event you want to track. The event appears in the Google Analytics dashboard alongside the standard events you have set up.
The action supports an optional Event Value field that sends a numeric value with the event, such as revenue, an order total, or a score. In the action UI this may appear as event.value. Populate it with a static number or a dynamic value from the workflow. If you don't need to send a numeric value, leave it blank.
Add the API Secret
The API Secret authorizes the action to send events to your data stream. Create one in Google Analytics, then paste its value into the action.
In Google Analytics, go to Admin > Account Settings > Data Stream, select the data stream, then open Measurement Protocol API secrets.
Acknowledge Google's privacy disclosures about the collection of user data before you can create a secret.
Select Create if no secret exists yet.
Name the API secret and select Create again. A Secret Value is generated automatically.
Copy the generated Secret Value and paste it into the API Secret field of the Google Analytics action.
Do not include spaces before or after the API Secret value when you paste it into the workflow field — a stray space causes the Google Analytics action to fail.
Save and publish
Finish the action, then save and publish the workflow so it can run.
Select Save Action.
Save the workflow.
Select Publish when you're ready to use it.
For how triggers and actions fit together in an automation, see Workflows Overview.