Syncing Google Analytics Data to CRM Analytics

To integrate Google Analytics and Salesforce Integration using the Google Analytics connector, follow these steps:

Thank you for reading this post, don't forget to subscribe!

Important Note: As of July 1, 2023, the main product Google Analytics has been decommissioned and replaced with the new product Google Analytics 4 (GA4). The Salesforce announcement GA4 Set to Replace Universal Analytics gives an overview on this.

Creating a Connection

  1. Navigate to the Data Manager Connections tab and click New Connection.
  2. Select the Google Analytics connector and click Next.
  3. Enter the required connection settings.
  4. Click Save & Test to validate your settings and establish the connection. If the connection fails, CRM Analytics will display potential reasons.
  1. Configuring the Connection
  2. To provide others access to your Google Analytics data, utilize a Google service account rather than a user account. To gain additional knowledge, view “Understanding Service Accounts.”
  3. To produce the service account’s JSON file:
  4. Navigate to the Google Cloud Platform Console’s IAM & Admin page.
  5. Create a JSON file with the necessary client_email and private_key in it.

Required Settings:

  • Connection Name: A descriptive name to distinguish between connections.
  • Developer Name: The API name for the connection, used in your recipes.
  • Description: A brief description for internal use.
  • APIVersion: The version of the Google Core Reporting API used for the connection (v3 for Universal Analytics, pre-populated for you).
  • Client Email: Enter the client_email from the JSON file.
  • Private Key: Enter the private_key from the JSON file, excluding the —–BEGIN PRIVATE KEY—– and \n—–END PRIVATE KEY—–\n.
  • Advanced Properties of Objects
  • Give advanced properties for each item connected using the Google Analytics connection so that Google Analytics may query the object.
  • Essential Qualities:
  • StartDate: The start date (in the format YYYY-MM-DD) of the date range that needs to be synced, or a relative date keyword such as today, yesterday, or NdaysAgo.
  • EndDate: The date range’s end date (in the relative date keywords or YYYY-MM-DD format).
  • ViewID: Within the account’s View Settings is the View ID obtained from Google Analytics.
  • Connector Considerations: Only letters, numbers, or underscores may be used in object names, and they must begin with a letter.
  • Up to 5 GB or 10 million rows can be synced per object using this connector.
  • One million rows can only be synced per object according to Google Analytics; any more rows are combined and labeled as “Others.”
  • There is no support for custom fields.
  • In order to query the binary big objects (blobs) of data that Google Analytics maintains, 32 virtual objects must be created for connections using SQL views. 

Google Analytics 4 Integration

To sync Google Analytics 4 data to Salesforce Data Pipelines:

  1. Navigate to the Data Manager Connections tab and click New Connection.
  2. Select the Google Analytics 4 connector and click Next.
  3. Enter the required settings:
    • Connection Name: Descriptive name for easy identification.
    • Developer Name: API name without spaces.
    • Description: Brief description for internal use.
    • Client Email: From the JSON file.
    • Private Key: From the JSON file, excluding the —–BEGIN PRIVATE KEY—– and \n—–END PRIVATE KEY—–\n.
  4. Set Advanced Properties:
    • StartDate: Start date of the date range to sync.
    • EndDate: End date of the date range to sync.
    • PropertyID: The Property ID from Google Analytics.

Connector Considerations:

  • Object names must start with a letter and contain only letters, digits, or underscores.
  • The connector can sync up to 10 million rows or 5 GB per object.
  • Custom fields are not supported.
  • Up to 9 dimensions can be selected per virtual object per connection.
  • To sync more than one million rows for an object, use the Google BigQuery connector.

Google Analytics Salesforce Sales Cloud Integration

User Identification

Analytics provides two methods to identify users:

  1. Client ID: A non-authenticated, cookie-based identifier best for businesses focused on lead generation.
  2. User-ID: A unique, persistent ID string best for businesses with high rates of logged-in users.

Required Salesforce Sales Cloud Objects and Fields:

  • Full access to necessary Salesforce objects and fields.
  • Create three custom fields in Salesforce to store Analytics tracking codes: GACLIENTID, GAUSERID, and GATRACKID.
  • Map these fields between Lead and Opportunity objects.

Integration Steps:

  1. Edit Lead Form: Add custom tracking fields using JavaScript.
  2. Link Analytics to Salesforce: Create a new Data Import dataset and authorize Salesforce access.
  3. Configure Tracking Fields: Map Salesforce custom fields to corresponding Analytics Tracking IDs.
  4. Import Milestones: Select and configure lead and opportunity milestones to import as Analytics events.
  5. Import Attribute and Product Data: Optionally import user attributes and product data from Salesforce.

Testing and Viewing Imported Data:

  • Import Data: Fetch data manually or set up a regular schedule.
  • View Imported Data: Use Analytics reports to view imported milestones, attributes, and product data.

Notes:

  • Abide by Analytics Terms of Service and Privacy Policy.
  • Do not import personally identifiable information (PII).
  • Imported data must not contain commas.
  • Test configuration by importing some data and viewing it in an Analytics report.

Google Data Studio and Salesforce Integration

Connecting Salesforce with Google Data Studio allows for powerful visualizations that combine sales and marketing data. This integration helps in understanding which channels generate the most leads and income.

Google Analytics 4 Connection Setup:

  1. Create a Connection: On the Data Manager Connections tab, click New Connection.
  2. Select the Google Analytics 4 connector and click Next.
  3. Enter connection settings and validate.

Connection Details:

  • Use a Google service account and generate a JSON file with the client email and private key.

Advanced Properties:

  • Set StartDate, EndDate, and PropertyID.

Considerations:

  • Sync limitations, custom fields, and object naming conventions.
  • Knowledge of Google Analytics Data API is necessary.
  • For more details and assistance, consult the Google Analytics 4 Data Model.

By following these steps, you can seamlessly integrate Google Analytics data into your CRM Analytics and Salesforce Data Pipelines, ensuring robust data analysis and informed decision-making.

Decide How to Identify Your Users: Analytics offers two ways to programmatically identify your users: Client ID and User-ID. To support Data Import for Salesforce Sales Cloud, you must implement Client ID. You may optionally choose to also implement User-ID.

Client ID pseudonymously identifies a browser instance and is best suited for businesses focused on lead generation and new customer acquisition.

User-ID enables the analysis of groups of sessions, across devices, using a unique, persistent, and non-personally identifiable ID string representing a user. This option is best for businesses with high rates of logged-in users.

How to Import CRM/ERP Data with Google Analytics 4 Using a CSV File:

  1. Prepare Your CRM/ERP Data: Export relevant data from your CRM or ERP system into a CSV file.
  2. Set Up Data Import in Google Analytics 4.
  3. Map Identifiers.
  4. Review & Save.
  5. Trigger Data Import.
  6. Analyze Data.

Transitioning to Google Analytics 4: As of March 2023, Google has automatically created GA4 properties for users unless they opt-out. Until July 1, 2023, you can continue to use and collect new data in your Universal Analytics properties. After this date, you must export your historical reports as Universal Analytics will be phased out.

How Does Google Help Salesforce Marketing Cloud Users? Google Analytics provides invaluable insights into user behavior, helping Salesforce Marketing Cloud users optimize campaigns and understand customer journeys. Integration with the Google platform allows businesses to combine offline sales data with digital analytics, optimizing digital marketing strategies and improving campaign effectiveness.

Additional Integration: Using datasets from Google Analytics and Google BigQuery, businesses can create interactive Tableau CRM dashboards to visualize campaign activities and performance metrics.

By following these guidelines, organizations can leverage Google Analytics data effectively within their Salesforce ecosystem, enhancing decision-making and strategic planning.

Content updated July 2024.

Related Posts
Salesforce OEM AppExchange
Salesforce OEM AppExchange

Expanding its reach beyond CRM, Salesforce.com has launched a new service called AppExchange OEM Edition, aimed at non-CRM service providers. Read more

The Salesforce Story
The Salesforce Story

In Marc Benioff's own words How did salesforce.com grow from a start up in a rented apartment into the world's Read more

Salesforce Jigsaw
Salesforce Jigsaw

Salesforce.com, a prominent figure in cloud computing, has finalized a deal to acquire Jigsaw, a wiki-style business contact database, for Read more

Health Cloud Brings Healthcare Transformation
Health Cloud Brings Healthcare Transformation

Following swiftly after last week's successful launch of Financial Services Cloud, Salesforce has announced the second installment in its series Read more