Introduction
Google Analytics 4 (GA4) is set to revolutionize the integration between Salesforce and Google Analytics. This upgraded version introduces a host of new features and capabilities that will profoundly influence how businesses leverage Salesforce and SEO for digital marketing automation.
GA4 provides businesses with deep insights into customer journeys, tracks user behaviour across multiple devices, and automates CRM processes. Since 2017, Salesforce and Google Analytics have been integrated, allowing companies to gain a better understanding of their customers, optimize campaigns, boost conversions, and save time through task automation.
Although designed for different purposes, Google Analytics is becoming even more compatible with Salesforce by offering more detailed and high-quality data. Here’s what you need to know
What’s Going On with Google Analytics?
Starting in March 2023, Google will automatically create a GA4 property for you if you don’t already have one, unless you choose to opt-out. This new GA4 property will be configured based on the settings of your existing Universal Analytics (UA) property, which is now considered outdated. Any incomplete settings will be automatically transferred, saving users time and effort, though opting out remains an option.
The transition from existing properties to the new Google Analytics 4 platform will take some time due to its different data collection methods. During this period, users will have the opportunity to update their properties and migrate any data they want to retain.
You will still be able to access your previously processed data in your Universal Analytics property for at least six months after July 1, 2023. Make sure to export your historical reports during this time, as after this six-month period, access to this data in Universal Analytics will be terminated. Failure to do so will result in losing access to your historical reports.
Google will announce when existing Universal Analytics properties will become completely inaccessible. Eventually, you won’t be able to access your Universal Analytics data via the API or view your UA reports in the Analytics interface. Therefore, it is crucial for customers to transition to the new GA4 version as soon as possible.
Unveiling Google Analytics 4:
Google Analytics 4 offers businesses unparalleled insights into customer journeys, tracking user behavior across multiple devices, and automating CRM processes. Since their initial integration in 2017, Salesforce and Google Analytics have enabled companies to gain deeper customer insights, optimize marketing campaigns, boost conversions, and save time through automation.
Key Features of Google Analytics 4:
GA4 offers:
- Enhanced website and app data analysis
- Event-based data for detailed insights
- Behavioural and conversion modelling
- Cookieless measurement and privacy controls
- Predictive capabilities for data-driven decisions
- Direct integration with media platforms
- It can improve online ads with the use of marketing analytics.
- It can understand your Target Customers.
- It tracks your goals as well as online traffic.
- It has in-built data reports and the option to customize reports according to your KPIs.
- Suggestions for better performance improvisation.
These features empower businesses to make data-driven decisions, making GA4 a powerful and effective tool.
Steps for Integration of Salesforce to Google Analytics:
Step 1: Decide how to identify your users
Choose how to identify your users Google Analytics provides two methods for user identification: Client ID and User-ID. For Salesforce Sales Cloud Data Import, implement Client ID. Optionally, consider implementing User-ID.
Client ID: This identifies a browser instance through a cookie-based identifier. Ideal for businesses focused on lead generation and customer acquisition, especially those with low user authentication rates.
User-ID: Enables session analysis across devices using a persistent, non-personally identifiable ID string. Suitable for businesses with high logged-in user rates, requiring additional setup via Google Tag Manager or JavaScript.
- Activate the User-ID feature in your Analytics property
- Add the User ID to your lead form page and any other pages you want to track. You can do this via Google Tag Manager or a JavaScript variable.
Step-2: Required Salesforce Sales Cloud objects and fields:
Identify required Salesforce Sales Cloud objects and fields Ensure access to essential Salesforce objects and their respective fields for Analytics integration.
Objects | Required Fields |
LeadStatus | ID MasterLabel SortOrder |
LeadHistory | CreatedDate OldValue NewValue |
Lead | Status GACLIENTID* GAUSERID* GATRACKID* |
OpportunityStage | ID MasterLabel SortOrder IsActive |
OpportunityFieldHistory | CreatedDate OldValue NewValue |
Opportunity | Amount StageName GACLIENTID* GAUSERID* GATRACKID* |
OpportunityLineItem | All fields |
Product2 (Products) | All fields |
Pricebook2 (Price Books) | All fields |
Step 3: Create new custom fields in Salesforce Sales Cloud:
You must have to create all the below 3 fields, no matter which tracking method you decide. Field names must be in uppercase. You can give any field names you want, and make these fields read-only to avoid unwanted changes. These fields should be created on both the Lead and Opportunity objects.
Field Name | API Name | Length |
GACLIENTID | GACLIENTID__c | 255 |
GAUSERID | GAUSERID__c | 255 |
GATRACKID | GATRACKID__c | 255 |
Step 4: Configure the Lead and Opportunity objects:
Configure Lead and Opportunity objects, Enable Field History Tracking for the Lead Status and Stage fields to monitor updates. Map Lead fields to corresponding Opportunity fields for seamless conversion.
Also, Map the Lead fields for the conversion to the respective fields in other objects:
- Lead.GACLIENTID to Opportunity.GACLIENTID
- Lead.GAUSERID to Opportunity.GAUSERID
- Lead.GATRACKID to Opportunity.GATRACKID
Step 5: Edit your lead form:
Customize your lead form Modify your lead form to capture and store tracking data, including your Analytics tracking ID. Include custom fields using JavaScript integration:
Also, you have to know your Analytics tracking ID.
Add the Custom Tracking Fields:
Below is an example that shows how you can add custom fields to your lead form using JavaScript.
<form action=”” name=”myForm”>
Phone: <input type=”text” name=”phone_number”>
<input type=”hidden” id=”GACLIENTID” name=”GACLIENTID” value=””>
<input type=”hidden” id=”GAUSERID” name=”GAUSERID” value=””>
<input type=”hidden” id=”GATRACKID” name=”GATRACKID” value=”XX-XXXXX-XX”>
<input type=”submit”>
</form>
You can remove the GAUSERID line if you are only using a Client ID.
To set the tracking ID, replace XX-XXXXX-XX it with your Analytics tracking ID. Alternatively, you can retrieve the tracking ID dynamically using this code:
<script type=”text/javascript”>
ga(function() {
var tracker = ga.getAll()[0];
var trackingId = tracker.get(‘trackingId’);
});
</script>
Then replace the hard-coded tracking ID (XX-XXXXX-XX) with the trackingId variable.
Set the custom tracking field values:
Add this code to your lead form to populate the Client ID and User-ID values.
<script type=”text/javascript”>
document.getElementById(‘FORM_ID’).addEventListener(
‘submit’, function(event) {
ga(function() {
var tracker = ga.getAll()[0];
var clientId = tracker.get(‘clientId’);
document.getElementById(‘GACLIENTID’).value = clientId;
var userId = tracker.get(‘userId’);
document.getElementById(‘GAUSERID’).value = userId;
});
});
</script>
Step 6: Integrate Analytics with your Salesforce Sales Cloud instance
To integrate Analytics with your Salesforce Sales Cloud instance, start by creating a new Data Import dataset and granting authorization to access your Salesforce Sales Cloud account.
Create a Salesforce Sales Cloud data set:
- Sign in to Google Analytics.
- In the bottom left, click Admin, and navigate to the Property to which you want to link. You must have the Editor role for this property.
- In the PROPERTY column, click Data Import.
- Click CREATE.
- For Data Set Type, under CRM Data, select Salesforce.
- Read and accept the Additional Terms for Analytics Salesforce Sales Cloud Data Import.
- Under Data Set details, name your data, then click Continue. The Data Source details panel appears.
Click the current credentials to see a list of all your successfully created Salesforce credentials. To remove unused credentials, on the right, click X. If the credentials are currently in use, you must disable those before you can remove them.
Authorize Salesforce Sales Cloud:
- In the Data Source details panel, navigate to Salesforce credentials and select Create new authorization.
- Enter a unique Credentials name for future reference.
- Click Access Salesforce.com.
- Log in to your Salesforce Sales Cloud account using the Salesforce pop-up window. Upon successful login, the integration with Analytics will be established. The newly created credentials will appear in the Salesforce credentials drop-down menu.
Configure Tracking Fields:
- Navigate to the Tracking Fields setup panel.
- Map your configured Salesforce fields to their respective Analytics Tracking IDs.
- Ensure each Tracking ID is correctly linked to the appropriate Salesforce custom fields.
After configuring your tracking fields, proceed by clicking Continue to finalize the setup.
Step 7: Set up the selection of Salesforce milestones for importing:
Here you will select the Salesforce lead and opportunity milestones to import. You also need to choose how often to import them.
- In the Data Source details panel, under Milestones Selection, use the drop-down menus to select the milestones you want to import.
- Click Continue.
Optional Setup Of Attributes And Product Data:
custom and specified standard fields within your Salesforce Lead and Opportunity modules. This process involves specifying which Analytics custom dimensions and custom metrics will serve as the repository for this imported information.
Product information importing facilitates the inclusion of product-related data directly from your Salesforce account. This data is seamlessly integrated into the same Measurement Protocol hit that captures your milestone data.
Though not mandatory, importing both attribute and product data is strongly encouraged, as it unlocks a myriad of advanced audience targeting and analytical possibilities.
Standard Supported Fields:
You can import attributes from the following standard Salesforce Lead and Opportunity fields:
Opportunity Fields | Lead Fields |
Id | Id |
Amount | Industry |
CampaignId | NumberOfEmployees |
ContractId | Rating |
ExpectedRevenue | ScoreIntelligenceId (if available in your Salesforce Edition) |
LeadSource | |
Name | |
Probability | |
TotalOpportunityQuantity |
Example Configuration:
Below is an example of a supported standard Salesforce fields and Analytics custom fields mapping,
Analytics custom field: scope | Salesforce field name |
Dimension: session OR user | Lead: Lead ID |
Dimension: session OR user | Lead: Lead Score (Salesforce Einstein predicted score) |
Dimension: user | Lead: Industry |
Dimension: session OR user | Lead: Rating |
Dimension: session OR user | Opportunity: Opportunity ID |
Metric: hit | Opportunity: Amount |
Dimension: session OR user | Opportunity: Probability (%) |
Metric: hit | Opportunity: Expected Amount |
Dimension: session OR user | Opportunity: Order Number |
Supported Formats:
You can import all custom attribute fields with the following Salesforce field formats:
boolean | dateTime (camelCase) |
currency | percent |
date | picklist |
datetime | string |
double | textarea |
int | time |
To import Attributes:
- Select the Analytics custom dimensions and/or custom metrics that you want to contain the attribute data.
- Make sure that the selected custom dimensions have the correct scope. In most cases, this will be user scope.
- Use the drop-down menu in the Salesforce field name column to map the Analytics fields to your Salesforce fields.
Step-8: Enable product data import:
To enable product data import, you should have the following configuration:
- Product data is configured in your Salesforce account.
- At least one view in the current Analytics property has Enhanced e-commerce enabled.
Then you can enable product data import by following the steps:
- Below the attribute import table, click Enable Product data import.
- You can then review the field mapping between Salesforce product data and your Analytics Enhanced E-commerce fields.
Data Source schedule:
Use this option to set up the import frequency.
- Click Continue.
- Click Done.
Note: Fetching the data every hour for the highest freshness, accuracy, and availability.
Step-9: Validate/Test Your Setup:
In the final step, you can test your configuration by importing some data and check it in an Analytics report.
Import data:
- If necessary, return to the Data Set list page:
- Sign in to Google Analytics.
- In the bottom left, click Admin, and navigate to the property that contains your Salesforce Sales Cloud data source.
- In the PROPERTY column, click Data Import.
- The Data Set list page appears.
- Locate the data set you created in the previous steps.
- On the right, click Manage Uploads.
- In the Uploads for Salesforce Offline Conversions page, click More > Fetch Now.
This will upload your Salesforce data to Analytics. If the upload is successful, the Status shows as “Completed.” If an error occurs, the Status show as “Failed” with a link to display more details.
In the top right corner, you can also check whether your Salesforce Data Set is scheduled for automated imports.
View Imported Data In a Report:
To view imported milestones:
- Navigate to the BEHAVIOR > Events > Top Events report.
- Adjust the time window to include your uploaded data.
- Apply a Secondary Dimension of Event Label
If your Salesforce milestones have been successfully imported, they should now appear in your report.
To review imported attributes:
To inspect imported attributes within any Analytics report, incorporate the custom dimensions you’ve aligned during setup as secondary metrics.
To examine imported product details:
To review imported product information, navigate to Conversions > Ecommerce > Sales Performance or Conversions > Ecommerce > Product Performance reports. Adjust the timeframe to validate the imported product specifics. For instance, if data import began today, ensure your report timeframe encompasses “today.”
Product data integrates with Opportunity milestones. The conversion of a lead into an opportunity in your Salesforce account may require additional processing time.
Transition to Google Analytics 4:
The transition to Google Analytics 4 begins in March 2023. Google will automatically create a GA4 property for users who haven’t set one up unless they opt out. This new property inherits settings from your existing Universal Analytics (UA) property, which becomes obsolete. Users can continue using UA and collecting new data until July 1, 2023. After that, some properties may briefly process data as UA phases out. It’s crucial to export historical reports within six months post-July 1, 2023, as access to UA data will cease afterward, potentially losing valuable information.
In What Ways Does Google Assist Salesforce Marketing Cloud User?
In the realm of digital marketing, leveraging the power of Google Analytics proves indispensable for comprehending user behaviour and guiding strategic initiatives. Harnessing the wealth of data available through Google can significantly elevate the operational efficiency of Salesforce Marketing Cloud.
Integrating Google’s robust analytics capabilities empowers Salesforce Marketing Cloud users to delve into extensive data sets. By amalgamating digital analytics with offline sales metrics, businesses gain holistic insights into their conversion pathways. This integration facilitates precise evaluation of marketing ROI and empowers the refinement of digital strategies based on comprehensive sales data.
Unlock Valuable Data Within Your Marketing Cloud:
The image above depicts how streamlined a Journey Builder plan can be. It utilizes data from Google to capture product reviewers.
This functionality enables marketers to distribute these audiences and activate them directly through Marketing Cloud channels, including email, SMS, or push notifications. By integrating insights from customer interactions across various channels, marketers can now effectively synchronize the customer journey.
With this new capability, marketers can deliver seamless experiences to their customers, ensuring uniformity across all channels. They can also craft more precise and personalized campaigns using comprehensive data, enhancing their ability to boost engagement and conversions.
Summary :
Google Analytics 4 (GA4) represents a significant evolution in digital analytics, poised to transform how businesses integrate and leverage data with Salesforce. This update introduces advanced features like multi-device tracking, automated CRM processes, and enhanced data privacy controls. Starting March 2023, GA4 properties will be automatically created, urging users to migrate from Universal Analytics (UA) to retain access to historical data. Integration steps, including user identification methods and custom field setups in Salesforce, ensure seamless data synchronization and robust analytics capabilities. By leveraging GA4’s predictive insights and direct media platform integration, businesses can make informed decisions, optimize campaigns, and enhance overall marketing effectiveness.
Contact Us
We would love to hear from you Please feel free to send us a message via the form