Connect a Website with Google Analytics 4 (Beta)
Use the Data Cloud Website connector for Google Analytics 4 (GA4) to ingest GA4 event data from your websites into Data Cloud. The connector uses the Data Cloud Web SDK to copy metadata from your GA4 schema so that Data Cloud can track and ingest events. When the data is in Data Cloud, you can use it to understand your customers and make business decisions by generating insights, creating marketing campaigns, and scoring leads.
The Google Analytics 4 connector is a pilot or beta service that is subject to the Beta Services Terms at Agreements - Salesforce.com or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer's sole discretion.
When you set up the connector for Google Analytics 4 (GA4), Data Cloud automatically sets:
- Standard event definitions for all recommended and required engagement events used by Google Analytics 4.
- The refresh mode for profile events to partial refresh.
- Data capture rules for all recommended and required events used by Google Analytics 4.
- Your website must be using Google Analytics 4. The connector does not work with previous versions of Google Analytics.
- To enable web data collection, you have the option of using Google Tag Manager or manually inserting a JavaScript snippet into your website.
- Use Feature Manager to enable the Google Analytics 4 (Beta) connector.
- In Salesforce, click Setup, and then select Data Cloud Setup.
- Click Website & Mobile Apps, and then click New Connection or Set Up Your First Connection.
- Enter the connection name, and select A Website with Google Analytics, and then click Next.
-
Data Cloud automatically imports automatic and recommended event definitions for Google Analytics Events. To review the event definitions, click View Definitions.
-
To optionally set any custom events not specific to Google Analytics, click Add Definitions.
-
To select a refresh mode for Profile events, click Change Refresh Mode.
Choice Description Partial (default) After initial data ingestion, replace only the fields for which new data is received. Incremental After initial data ingestion, replace the entire record when new data is received. Existing values may be replaced by blank values.
-
If you added custom events, click Set Data Capture Rules and upload a data capture rules file.
Changing data capture rules, changes the data you collect or can cause no data to be ingested into Data Cloud. You must select the acknowledgement to do so.
- Select a data space to ingest the web engagement data, and then click Next.
-
To configure the Data Cloud, click Let’s Get Started.
- Data Cloud automatically creates a data stream, data mappings, and the identity resolution ruleset for your web connection.
- If you added custom events and have custom fields to map between your data stream and the data lake object, click Map Custom Fields. You manually map these fields in Data Cloud.
-
To optionally modify the data capture rules, click Open Data Capture Rules, and modify them as required.
Changing data capture rules, changes the data you collect or can cause no data to be ingested into Data Cloud. You must select the acknowledgement to do so.
-
From the Collect Web Engagement section, click Select Publication Type.
-
Select Push a Tag using Google Tag Manager, and click Next.
-
To authenticate to Google Tag Manager, click Sign in with Google, and then follow the Google authentication prompts.
-
When prompted that Salesforce wants to access your Google account, click Allow.
-
Configure Google Tag Manager. Select an Account, Container, and Workspace where you want to add the tag, and then click Add Connection.
-
Ask your web admin to review and publish the tag on each page you want to collect data from.
After your web admin publishes your tag, Data Cloud activates the connection and starts data collection.
-
Click Select Publication Type.
-
Select Manually add a snippet and click Next.
-
Copy the snippet.
-
Ask your web admin to embed the snippet on the website pages from which you want to collect data.
Embed the snippet in the
<body>
tag.After your web admin adds the snippet tag, Data Cloud activates the connection and starts data collection.