You are here:
Configure OmniAnalytics with Google Analytics
OmniAnalytics tracks user interactions with Omniscripts and Flexcards by integrating with Google Analytics 4 (GA4) and Google Tag Manager.
Example Omniscript and Flexcard
The tasks in this workflow use two examples to illustrate the setup:
-
A Omniscript representing a smartphone purchasing process.
-
A Flexcard that redirects users to the Google website.
These examples communicate with GA4 by using the Google Tag Manager Ecommerce APIs.
If you're familiar with Google Analytics and don't need the examples, make sure your Omniscripts meet these criteria, then skip to step 5.
- Enable Tracking is checked in the Omniscript Setup.
- The Omniscript includes JSON data for Google Analytics and Google Tag Manager. In Setup or Step Properties, expand Messaging Framework and add your message key value pairs.
Before You Begin
- Complete Configure Internal OmniAnalytics. You must create an Internal Tracking Group first to enable underlying metadata
tracking.Note The step "Add Tracked Components to a Lightning App Page" is optional if you are only tracking events by using Google Analytics in Experience Cloud. This step is mandatory only if you want to view tracking data within the Salesforce Internal OmniAnalytics dashboard.
- Create Google Analytics Trusted URLs. Make sure that your Salesforce org allows communication with Google domains.
To ensure Google Analytics captures Omniscript and Flexcard events, configure Tracking Groups in sequence:
- Configure an Internal Tracking Group: This registers the components for tracking within the Omnistudio framework.
- Configure the Google Analytics Tracking Group: Link your registered components to your Google destination.
- Set up Google Accounts: Create your accounts and properties at analytics.google.com and tagmanager.google.com.
- Map JSON Data: Complete Adding Ecommerce Data to the Example Omniscript for OmniAnalytics to align your data with the standard Google Analytics Ecommerce schema.
-
Finalise Connections: Complete Setting Up Third-Party Tracking and Event Types. Define which specific
interactions (example, StepLoad or ExtractAction) trigger a hit to Google.
If you're an Experience Cloud user, make sure that the Google Analytics Tracking Group is active to enable external data flow.

