Gifts

Culture

Reviews

Local Spots

How to Connect Google Analytics with Salesforce (2026)

Google Analytics

★★★★ 4.5
Analytics Data Web Analytics

Google Analytics is the most widely used web analytics platform that tracks website traffic and user behavior. It provides comprehensive…

Full Review

Salesforce

★★★★ 4.5
Crm Enterprise Crm

The world's leading cloud-based CRM platform powering sales, service, and marketing for businesses of all sizes.

Full Review

Why Connect Salesforce and Google Analytics

Salesforce tracks what happens after a lead enters your sales pipeline — deal stages, revenue, close dates, and customer lifetime value. Google Analytics tracks what happens before that — which channels, campaigns, and pages drive traffic and conversions. Connecting them closes the loop between marketing spend and actual revenue, answering the question every marketing team asks: "Which campaigns produce deals that actually close?"

Without this integration, marketing teams optimize for top-of-funnel metrics like clicks, sessions, and form submissions. With it, they can optimize for revenue. A Google Ads campaign that generates 100 leads but only 2 deals is less valuable than one that generates 30 leads but 10 deals. This integration makes that distinction visible by connecting web analytics data to CRM outcomes.

What This Integration Does

  • Import Salesforce revenue data into Google Analytics: Map Salesforce Opportunity data (revenue, close date, deal stage) to Google Analytics conversions, so you can see actual revenue attributed to marketing channels and campaigns.
  • Offline conversion tracking: When a website visitor fills out a form (tracked by Google Analytics) and later becomes a closed deal in Salesforce, the revenue from that deal can be attributed back to the original Google Analytics session and traffic source.
  • Audience building from CRM data: Create Google Analytics audiences based on Salesforce data (like customers, high-value leads, or specific industries) for use in Google Ads remarketing.
  • Campaign performance analysis: Analyze the full funnel from ad click to closed deal within Google Analytics or Looker Studio (formerly Data Studio) dashboards.
  • Lead quality scoring by source: Determine which traffic sources and campaigns produce the highest-quality leads by connecting Google Analytics acquisition data to Salesforce lead conversion rates.

Native Integration vs Third-Party

There is no direct native integration between Google Analytics (GA4) and Salesforce that you can enable with a single click. Google and Salesforce are separate ecosystems, and connecting them requires middleware, data import features, or custom development.

However, several established methods exist:

  • Google Analytics Data Import: GA4 supports uploading offline data (like Salesforce revenue) via CSV or through the GA4 Measurement Protocol. This is the closest to a "native" method — it uses Google's own data import feature but requires you to format and upload Salesforce data.
  • Salesforce Data Import for Google Ads: Google Ads (not GA4 directly) has a Salesforce integration that imports conversion data from Salesforce. This powers offline conversion tracking and Smart Bidding optimization.
  • Zapier or Make: Can bridge specific events between Salesforce and GA4, such as sending a Measurement Protocol hit to GA4 when a Salesforce deal closes.
  • Salesforce Marketing Cloud + GA4: If you use Salesforce Marketing Cloud, there are built-in connectors for sharing audience and campaign data with Google Analytics.
  • Data warehouse approach: Export both Salesforce and GA4 data to a warehouse (BigQuery, Snowflake, or Redshift) and join them there for analysis. GA4 has a native BigQuery export, and Salesforce data can be extracted via its API or tools like Fivetran.

Step-by-Step Setup

The most impactful setup is connecting Google Ads offline conversions from Salesforce. Here is how to set that up, along with the GA4 data import approach.

Method 1: Google Ads Salesforce Offline Conversion Import

Step 1: Enable Google Click ID (GCLID) Tracking

In your Google Ads account, go to Settings > Account Settings and ensure Auto-tagging is enabled. This appends a GCLID parameter to every ad click URL. On your website, capture the GCLID value from the URL when a visitor arrives and store it in a cookie or hidden form field.

Step 2: Pass GCLID to Salesforce

When a lead submits a form on your website, include the GCLID value as a hidden field. This value should be stored in a custom Salesforce field on the Lead or Contact record (create a custom field called "Google Click ID" or "GCLID"). This is the key that links the Google Ads click to the Salesforce record.

Step 3: Set Up the Salesforce Integration in Google Ads

In Google Ads, go to Tools & Settings > Measurement > Conversions. Click + New Conversion Action and select Import. Choose Salesforce as the data source. Follow the prompts to connect your Salesforce org using OAuth authorization. You will need Salesforce admin credentials with API access.

Step 4: Map Salesforce Stages to Google Ads Conversions

Select which Salesforce Opportunity stages or Lead statuses count as conversions in Google Ads. Common mappings include:

  • Lead Created: A lead-level conversion (low value, high volume)
  • Opportunity Created: A mid-funnel conversion
  • Closed Won: A revenue conversion (include the deal value)

Set the conversion value to the Opportunity Amount field for revenue-based conversions.

Step 5: Configure Import Schedule

Set the import to run automatically on a daily schedule. Google Ads will pull new conversions from Salesforce each day and match them to the original ad clicks using the GCLID. Conversions may appear in Google Ads reports 1-3 days after the import runs.

Method 2: GA4 Data Import for Salesforce Revenue

Step 1: Export Salesforce Data

Create a Salesforce report that includes Closed Won Opportunities with the following fields: Client ID (or User ID from GA4), Revenue Amount, Close Date, and any other dimensions you want to analyze. Export this as a CSV file.

Step 2: Format the Data for GA4

GA4 Data Import requires a specific CSV format. The key is matching records between GA4 and Salesforce. You need a common identifier — typically the GA4 Client ID (stored as a custom dimension) or a User ID. Format the CSV with columns that match your GA4 event parameters.

Step 3: Upload to GA4

In GA4, go to Admin > Data Import. Create a new data source, select the data type (Event data or User data), upload your CSV file, and map the columns to GA4 dimensions and metrics. For automated uploads, use the GA4 Management API to schedule regular data imports.

Best Automation Workflows

  1. Closed-deal revenue attribution: When a Salesforce Opportunity is marked Closed Won, automatically import the revenue and GCLID to Google Ads. This feeds Smart Bidding algorithms with real revenue data, allowing Google to optimize ad delivery for deal value rather than just lead volume. Over time, this shifts your ad spend toward keywords and audiences that produce actual revenue.
  2. Lead quality feedback loop: Import Salesforce lead status changes (Qualified, Disqualified) as Google Ads conversions with different values. Qualified leads get a positive conversion value; disqualified leads get zero. This teaches Smart Bidding which types of clicks produce quality leads.
  3. CRM-based remarketing audiences: Export Salesforce contact lists (like "Open Opportunities" or "Past Customers") and upload them as Google Ads Customer Match audiences. Target these audiences with relevant ads — upsell campaigns for existing customers, nurture ads for open pipeline contacts.
  4. Campaign ROI dashboards: Use a data warehouse (BigQuery) to join GA4 session data with Salesforce Opportunity data. Build Looker Studio dashboards that show true ROI per campaign, channel, and keyword — from first click to closed revenue. This replaces lead-based reporting with revenue-based reporting.
  5. Predictive lead scoring from web behavior: Combine GA4 engagement data (pages viewed, time on site, content consumed) with Salesforce close rates to build a predictive model. Identify which web behaviors correlate with deal closure and feed this back into lead scoring or Google Ads bidding strategies.

Data Sync Details

Data Direction Sync Method Notes
Offline conversions (GCLID-based) Salesforce to Google Ads Daily automated import Requires GCLID captured on web forms and stored in Salesforce
Revenue data Salesforce to GA4 or Google Ads CSV import or API Matched by Client ID, User ID, or GCLID
Lead/Opportunity stage changes Salesforce to Google Ads Daily import Multiple stages can be mapped as separate conversion actions
Customer lists for remarketing Salesforce to Google Ads Manual or scheduled CSV upload Uses Customer Match; requires email or phone
Web analytics data GA4 to Salesforce (indirect) Via data warehouse or ETL tool GA4 does not push data to Salesforce natively

The Google Ads-Salesforce offline conversion import runs on a daily schedule by default. Conversions typically take 1-3 days to appear in Google Ads reports after import. For GA4 data imports, the frequency depends on whether you automate the process (via API) or do it manually.

Common Issues and Troubleshooting

GCLID not being captured or stored

The most critical point of failure. If the GCLID is not captured from the URL and stored in Salesforce, offline conversion import will not work. Common causes: the landing page strips URL parameters, the form does not include a hidden GCLID field, or the CRM field mapping drops the value. Solution: Test the full flow from ad click to Salesforce record. Click an ad, submit the form, and verify the GCLID appears on the resulting Salesforce Lead. Use a JavaScript snippet on your landing pages to capture and persist the GCLID from the URL parameter into a cookie and hidden form field.

Conversion import shows zero matched conversions

If the import runs but no conversions are matched, the GCLIDs in Salesforce may be stale (more than 90 days old), corrupted (partial strings), or from a different Google Ads account. Solution: Verify GCLID format is correct, ensure the Google Ads account connected to Salesforce is the same one generating the clicks, and check that the conversion date in Salesforce falls within Google Ads' lookback window (default 90 days).

Revenue attribution not matching Salesforce reports

Google Ads attributes revenue based on the click date, while Salesforce reports revenue based on the close date. A deal clicked in January but closed in March shows as January revenue in Google Ads but March revenue in Salesforce. This is expected behavior — neither number is wrong, they are just measuring different things. Document this difference for stakeholders to avoid confusion.

GA4 Client ID matching failures

If you are importing Salesforce data to GA4 using Client ID as the matching key, the Client ID must be captured at the time of form submission and stored in Salesforce. The GA4 Client ID is stored in the _ga cookie and changes if the user clears cookies or switches devices. Solution: Capture the Client ID via JavaScript at form submission time and pass it to Salesforce as a custom field. Accept that cross-device attribution will have gaps.

Alternatives

  • Salesforce Marketing Cloud + Google Marketing Platform: Enterprise-level integration for organizations fully invested in both ecosystems. Includes direct audience sharing, campaign reporting, and attribution modeling.
  • HubSpot Marketing Hub: HubSpot provides built-in analytics and Google Ads integration that connects ad spend to CRM revenue within one platform, eliminating the need for a separate GA4-Salesforce connection.
  • Fivetran or Stitch: ETL tools that extract data from both Salesforce and GA4 into a data warehouse, where they can be joined for analysis. Best for organizations that want to build custom attribution models.
  • CallRail or Ruler Analytics: Revenue attribution platforms that connect marketing channels (including Google Analytics data) to CRM revenue. Purpose-built for the closed-loop reporting problem.
  • Supermetrics: Data connector that pulls from Google Analytics, Google Ads, Salesforce, and other sources into spreadsheets, Looker Studio, or data warehouses for unified reporting.

Compare Google Analytics vs Salesforce side by side »