Are you trying to integrate Google Analytics and Salesforce data? Do you want to get insights into your Salesforce data to take better actions? If yes, then this blog will answer all your queries. In this blog, you will go through Google Analytics, Salesforce, and two different approaches to integrate Google Analytics and Salesforce data easily. When you integrate Google Analytics and Salesforce data, you get insights into the marketing data that can help you take actions to fetch better results. Salesforce is one of the most popular CRM tools that allows you to manage your relationships with your customers, leads, sales, opportunities, etc. Google Analytics also allows you to keep track of the conversion funnel conveniently.
What is Google Analytics?
Google Analytics is a web analytics service that tracks and reports website traffic. It allows in-depth analysis of the visitors on your website and then provides valuable insights. Google Analytics puts numerous lines of tracking code into the code of your site. This code is responsible for recording various activities of the users on your website. All the recorded information is sent to the Google Analytics server once the user exits from your website. Google Analytics uses encryption while sending this data so that no one can intercept the information that’s being collected. Google Analytics also supports integrations with various applications and helps you track and analyze your data conveniently.
Hevo is a no-code data pipeline platform that supports Google Analytics and Salesforce as Sources. Its intuitive User interface ensures that data integration is simple and that the pipeline is set up in minutes.
- With its robust transformation capabilities, Hevo ensures that your data is always ready for analysis.
- Hevo’s cost-efficient pricing makes sure you only pay for what you use.
- Its fault-tolerant architecture ensures your data is always secure and there is no data loss
Try Hevo for free today to experience seamless migration of your data!
Get Started with Hevo for Free
What is Salesforce?
Salesforce is a cloud-based Saas (Software-as-a-Service). It is CRM (Customer Relationship Management) software that offers complementary enterprise application services. It can act as a helping hand for your IT team, marketing team, commerce team, etc. It is comparatively faster than traditional CRMs. It also supports customization. As Salesforce is on the cloud, all the team members can access it from anywhere at any time. Some of the most popular services offered by Salesforce are sales, marketing, health, etc. All these are accessible to you at a reasonable price. Know more about Salesforce pricing from the offcial website.
Prerequisites
To achieve Google Analytics and Salesforce integration, you need to have the following:
- A Salesforce account with System Administrative settings and Modify all data permission.
- A Google Analytics account with Edit permissions for Analytics property.
Why Integrate Google Analytics and Salesforce?
The purpose of Google Analytics and Salesforce integration includes:
1) Find out which marketing channels generate high-quality leads
Some of your marketing campaigns may generate a large number of leads that rarely convert and thus waste the time of your sales team. While other channels may generate a small number of leads, a significant portion of these leads will become long-term customers who will spend a significant amount of money with your company.
It is measured using a metric known as “Revenue per lead“.
2) Google Analytics and Salesforce integration gives you a 360 view of your marketing campaigns
The goal of marketing is to generate a steady stream of lukewarm leads that will result in high revenue per lead. To do so, you must determine which specific marketing channels, campaigns, blog posts, keywords, etc are more likely to generate those leads.
This is where Google Analytics and Salesforce can help. It provides a 360-degree view of your marketing campaigns and allows you to calculate the ROI of each channel, campaign, and keyword. So you can focus more on marketing activities that are effective and less on those that are a waste of your time and money.
How do Google Analytics and Salesforce Compliment One Another?
Google Analytics provides a detailed view of how different user groups discover and interact with your website and mobile applications. While it is possible to use Google Analytics to analyze an individual user’s behavior, the tool was not designed for this purpose.
1) Salesforce Marketing Cloud & Google Analytics
The Salesforce Marketing Cloud includes tools for interacting with customers and creating personalized experiences for them, such as automated emails and product recommendations. This is accomplished by developing campaigns that target specific user groups.
When you integrate the Marketing Cloud with Google Analytics, you give Google Analytics access to campaign data. This is accomplished by simply adding UTM parameters to your Marketing Cloud campaign links and then pulling reports from the Google Analytics API to see how well those campaigns performed.
As previously stated, Google Analytics and the API used by Salesforce are designed for analyzing groups of users, which is exactly how Marketing Cloud reporting works. As a result, the two tools provide useful information for marketers who need to compare the relative performance of multiple campaigns.
2) Salesforce Sales Cloud & Google Analytics
The Salesforce Sales Cloud, on the other hand, serves a very different purpose than the Marketing Cloud. It provides tools for understanding individual customers, recording detailed information about them, and providing the necessary information to your sales team to drive meaningful interactions with them and, ultimately, close deals.
When you integrate the Sales Cloud with Google Analytics, you send individual users’ activity from the Sales Cloud to Google Analytics after they have been modified in the Sales Cloud. Because Google Analytics is not designed to pull information about individual users, it does not send any data to the Sales Cloud.
This integration is most commonly used by B2B sites where the goal of the website or mobile app is to drive potential customers to submit a lead form, and then the transaction takes place offline. When a user submits a lead form on the website or app, the Google Analytics ID (known as the “client ID” or “user pseudo ID” in GA4) is passed into Salesforce. When the sales team updates the Salesforce record to indicate that the deal has been won, Salesforce will send an event back to Google Analytics.
Marketers appreciate this integration because it allows them to compare the relative performance of their campaigns within Google Analytics and calculate the true cost per acquisition rather than simply a cost per lead.
Unfortunately, neither of these integrations is particularly beneficial to Sales teams.
The Google Analytics and Salesforce Integration for Sales Teams
Performance is measured differently by Marketing and Sales teams. The standard Google Analytics and Salesforce integrations are not as useful for Sales teams as they are for Marketing teams. Sales teams manage relationships with individual leads whereas Marketing teams are concerned with groups of people. Hence, they have different requirements.
Despite the fact that Google Analytics is a goldmine of individual behavioral data, the Sales Cloud integration does not import it into your lead records. This is unfortunate because the data stored in Google Analytics could benefit sales teams in a number of ways, including:
- Drive meaningful conversations: Having quick and easy access to a customer’s website or app interaction history can reveal which products they are interested in or which issues they are researching with the support team.
- Prioritize time: The history of website and app interactions can be used for lead scoring and to help the sales team understand who is most likely to go for a purchase call.
- Respond to changes: Notifying the sales team when an old lead resurfaces on the website has the potential to rekindle stale relationships.
The good news is that Google and Salesforce have both recently launched new products that make data more accessible and transferable between systems. As a result, you can now access your Analytics data and import it into your Salesforce Sales Cloud lead, contact, and opportunity records.
Integrate Google Analytics 4 to PostgreSQL
Integrate Salesforce to BigQuery
Integrate Salesforce Marketing Cloud to Amazon S3
Method 1: Using Salesforce Sales Cloud Data Import
Salesforce provides Salesforce Sales Cloud Data Import that lets you bring the sales pipeline data directly to Google Analytics for analysis. With Salesforce Sales Cloud Data Import, you can conveniently augment your digital analytics with offline sales data (for example, opportunities, leads, product data, etc.), which gives you a complete view of your conversion funnel.
Let’s see what are the steps to connect Google Analytics and Salesforce data:
Step 1: Identify your Users
Google Analytics supports two ways to programmatically identify your user, i.e., Client ID and User ID. Data Import implements using the Client ID. You can also implement it using the User ID.
Implementation using the USER ID requires additional set up as mentioned below:
- Activate the User ID features in Google Analytics property.
- Add this User ID to the lead form page and any other page that you want to track.
Step 2: Required Salesforce Sales Cloud Objects and Fields
To achieve this integration, you need to have full access to the following Salesforce objects and fields.
OBJECT | REQUIRED FIELDS |
LeadStatus | ID, MasterLabel, SortOrder |
OpportunityStage | ID, MasterLabel, SortOrder, IsActive |
LeadHistory | CreatedDate, OldValue, NewValue, Field |
Lead | Status, GACLIENTID*, GAUSERID*, GATRACKID* |
OpportunityFieldHistory | CreatedDate, OldValue, NewValue, Field |
Opportunity | Amount, StageName, GACLIENTID*, GAUSERID*, GATRACKID* |
OpportunityLineItem | All fields |
Product2 (Products) | All fields |
Pricebook2 (Price Books) | All fields |
If you are using Salesforce Group Edition or Salesforce Professional Edition, then field access is granted by adding all the necessary fields to the Lead and Opportunity page layout.
Step 3: Create New Custom Fields
Using the instructions as stated here, you have to create three custom fields to store the Google Analytics tracking codes. Also, note that all the field names must be uppercase and must have read-only permission. Create these fields in both lead and opportunity.
FIELD NAME | API NAME | FIELD LENGTH |
GACLIENTID | GACLIENTID_c | 255 |
GAUSERID | GAUSERID_c | 255 |
GATRACKID | GATRACKID_c | 255 |
To configure the Lead object, enable Field History Tracking for your lead status field and for configuring opportunity object, enable Field History Tracking for Stage fields. It is to make sure that any update to these fields generates a hit event.
Map the fields in each of the objects to their counterpart in another object:
Lead.GACLIENTID to Opportunity.GACLIENTID
Lead.GAUSERID to Opportunity.GAUSERID
Lead.GATRACKID to Opportunity.GATRACKID
Step 4: Edit your Lead Form
For this step, you need to know your Google Analytics tracking ID. The following code tells you how to add the custom tracking fields that you created above, to the lead:
<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="UA-XXXXX-YY">
<input type="submit">
</form>
This code adds Client ID and User ID to your form. You can also remove GACLIENTID if you are using a Client ID. You need to replace “UA-XXXXX-YY” with your Google Analytics tracking ID.
Note: You can also retrieve your tracking ID dynamically using this code:
<script type=”text/javascript”>
ga(function() {
var tracker = ga.getAll()[0];
var trackingId = tracker.get('trackingId');
});
</script>
Add the following code to your lead so that you can 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 5: Link Google Analytics and Salesforce Sales Cloud Account
You will be able to link Google Analytics and Salesforce data by creating a new Data Import dataset and then providing access to your Salesforce Sales Cloud account.
Follow these steps to create a Salesforce Sales Cloud Data Set:
- Sign in to your Google Analytics.
- At the bottom left, select Admin and click the property to which you want to link. Make sure that you have Edit permission for that property.
- Select Data Import.
- Click Create.
- In Data Set Type, under CRM Data, select Salesforce.
- Accept the terms and conditions.
- Under Data Set details, give a name to your data and click Continue.
You can click the current credentials to see a list of successful Salesforce credentials. To remove the unused credentials, you need to right-click X. If the credentials are currently in use, you need to disable it before you remove them.
Follow these steps to authorize Salesforce Sales Cloud:
- In the Data Source detail panel, select Create new authorization under Salesforce credentials.
- Enter a credential name.
- Select Access Salesforce.com.
- In the pop-up, login to your Salesforce Sales Cloud account.
- The new credentials name will appear in the Salesforce credentials drop-down menu.
To import your data from different Salesforce accounts, you need to repeat the above steps to create multiple credential sets.
Tracking your field setup panel helps you map your configured Salesforce fields to corresponding Google Analytics tracking IDs. After configuring the tracking fields, click Continue.
Step 6: Configure Salesforce Milestone to Import
You will select the Salesforce lead and opportunity milestone to import it. You can also select how often to import them. All these milestones import as Google Analytics events.
- In the Data Source details panel, under the Milestone Selection, select the milestone you want to import from the drop-down menu.
- Click Continue.
Step 7: Data Source Schedule
You can use the following option to set-up import frequency:
- Select Continue.
- Select Done.
Step 8: Test your Setup
In this step, you will test your configuration by importing some data from Salesforce and analysing it in a Google Analytics report.
To import the data from Salesforce, follow these steps:
- Sign in to your Google Analytics account.
- At the bottom left, select Admin and click the property to which you want to link. Make sure that you have Edit permission for that property.
- Select Data Import from property column.
- The Data Set List page appears.
- Locate the data set created in the last step.
- On the right side, select Manage upload.
- In the Uploads for Salesforce Offline-Conversion page, select More > Fetch Now.
If your upload was successful, then Status column shows Completed else it shows Failed. To view your imported data in a report, follow these steps:
- Select BEHAVIOR > Events > Top Events report.
- Adjust the time window to include uploaded data.
- Apply a secondary dimension of the Event Label.
To view imported attributes in your Google Analytics report, add the custom dimension that you have mapped in the configuration steps as secondary dimensions.
Limitations of Using Salesforce Sales Cloud Data Import
Some of the limitations of using the above-stated method for Google Analytics and Salesforce integration are listed below:
- All the empty fields are removed automatically from the Measurement Protocol hit at the time of your import.
- The imported data doesn’t contain commas as Measurement Protocol event hits are imported as CSV files.
- Measurement Protocol event hits can not exceed 8192 bytes.
- The imported data use the currency that was set up in your Salesforce account.
Method 2: Using Hevo Data
Configure Google Analytics 4 as Your Source
Hevo focuses on three simple steps to get you started to connect Google Analytics:
- Connect: Connect Hevo with Google Analytics and various other sales & marketing data sources by simply logging in with your credentials.
- Integrate: Consolidate your marketing data from several sources in Hevo’s no-Code Data Integration Platform and automatically transform it into an analysis-ready form.
- Visualize: Connect Hevo with your desired destination and visualize your unified marketing data easily to gain better insights.
This is how you can connect Google Analytics using Hevo, A No-Code Data Integration Platform.
Check out what makes Hevo amazing:
- Real-Time Data Transfer: Hevo with its strong integration with 100+ sources, allows you to transfer marketing data quickly & efficiently. This ensures efficient utilization of bandwidth on both ends.
- Data Transformation: It provides a simple interface to perfect, modify, and enrich the marketing data you want to transfer.
- Secure: Hevo has a fault-tolerant architecture that ensures that the data is handled in a secure, consistent manner with zero data loss.
- Simplicity: Using Hevo is easy and intuitive, ensuring that your data is exported in just a few clicks.
- Completely Managed Platform: Hevo is fully managed. You need not invest time and effort to maintain or monitor the infrastructure involved in executing codes.
- Live Support: The Hevo team is available round the clock to extend exceptional support to its customers through chat, email, and support calls.
Integrate Google Analytics with your Preferred Destination in Just 2 Steps!
No credit card required
Benefits of GA and Salesforce Integration
- Enhanced Customer Insights: Combine Salesforce’s customer data with GA’s website analytics to gain a 360-degree view of customer behavior.
- Improved Lead Tracking: Track and analyze how leads interact with your Salesforce Sites, enabling better lead qualification and nurturing strategies.
- Seamless Conversion Tracking: Measure the journey from website interactions to conversions in Salesforce, providing clear insights into campaign effectiveness.
- Optimized Marketing Efforts: Use integrated data to create more targeted and effective marketing campaigns based on user behavior and demographics.
- Centralized Reporting: Consolidate data from GA and Salesforce into unified reports for easier analysis and decision-making.
- Track Salesforce Sites with GA: Monitor traffic, user interactions, and performance of Salesforce-hosted pages directly in GA, ensuring better website optimization.
Take a look at the powerful features of Google Analytics which you can use to get more out of your GA and Salesforce integration.
Conclusion
In this blog, you have learned about Google Analytics, Salesforce, and the steps to integrate Google Analytics and Salesforce data using two different approaches. You can use Salesforce Cloud Data Import to achieve this integration. But, if you are looking for a fully automated solution, then try Hevo.
Try Hevo and see the magic for yourself. Sign up for a free 14-day trial to streamline your data integration process. You may examine Hevo’s pricing plans and decide on the best plan for your business needs.
FAQs
1. Does Google Analytics work with Salesforce?
Google Analytics does not natively integrate with Salesforce. However, you can use tools like Zapier or custom APIs to sync Google Analytics data with Salesforce for combined reporting.
2. How to connect GA4 to Salesforce?
To connect GA4 to Salesforce, use third-party tools or connectors like Google Data Studio with Salesforce integration, or build custom integration using APIs to import GA4 data into Salesforce.
3. Can Salesforce be used for data analytics?
Yes, Salesforce can be used for data analytics. It offers built-in analytics tools like Salesforce Reports and Dashboards, and the more advanced Salesforce Einstein Analytics for deeper insights and AI-driven analytics.
Oshi is a technical content writer with expertise in the field for over three years. She is driven by a problem-solving ethos and guided by analytical thinking. Specializing in data integration and analysis, she crafts meticulously researched content that uncovers insights and provides valuable solutions and actionable information to help organizations navigate and thrive in the complex world of data.