Google Analytics does not allow you to store any personally identifiable information. CRM systems often allow last-click tracking using UTM or their own parameters.
This situation leaves marketers with siloed data. On the one hand side, Google Analytics contains web and mobile analytics data, and on the other side, CRM data. CRM data contains the key to analyzing customer lifetime values and cohorts.
Many of our clients want to somehow connect both analytics and CRM data to make decisions based on the whole customer journey.
The modern way to do this is to capture GA4’s own Client ID at the moment someone fills out your form, store it on the CRM record, then send the outcome (e.g. the lead becomes a won deal) back to GA4 later via the Measurement Protocol.
In this article I’ll explain how exactly to do this and how to connect the CRM data back to that Client ID.
Here’s a quick summary of how it works: GA4 already assigns each visitor a Client ID. When someone fills out your form, we capture that Client ID and store it in a hidden field synced to your CRM. Later, when the CRM records the outcome (a lead converts into an opportunity, a paying customer, or is marked junk), we send that outcome back to GA4 using the Client ID via the Measurement Protocol, tying the result back to the original visitor journey.

Get started for free
Access all your data from your favorite sources in one place.
Free forever plan, no credit card
Now back to our guide. It comprises of two steps:
Before you get started you will need to make sure that you have
- Edit rights on your GA4 property
- Edit and publish rights on your Google Tag Manager container on your website
Capturing the GA4 Client ID
1. Enable the Client ID and Session ID variables
In your GTM container, go to Variables > Built-In Variables > Configure, and enable Client ID and Session ID under the Utilities section. These read the values GA4 already assigns to the visitor, no extra code required.
2. Add a hidden field to your form
Give it an id, e.g. ga_client_id.
3. Populate the hidden field on form load
Add a Custom HTML tag in GTM that sets the hidden field’s value to {{Client ID}} when the page/form loads.
4. Pass the Client ID to your CRM
Map the hidden field to a custom field on the CRM record, the same way you already map the rest of the form’s fields. This works the same way regardless of which CRM you use (Salesforce, HubSpot, Zoho, Microsoft Dynamics, etc.).
Sending the conversion back to GA4
When your CRM records the outcome, for example a deal is marked Won, trigger a server-side call to the GA4 Measurement Protocol using the Client ID you stored earlier:
POST https://www.google-analytics.com/mp/collect?measurement_id=G-XXXXXXX&api_secret=YOUR_SECRET
Content-Type: application/json
{
"client_id": "<the Client ID stored on the CRM record>",
"events": [
{
"name": "crm_conversion",
"params": {
"value": 250,
"currency": "USD"
}
}
]
}
To create the api_secret: in GA4, go to Admin > Data collection and modification > Data streams > Web > [your stream] > Measurement Protocol API Secrets > Create.
One real limitation to know about: unlike Universal Analytics’ old Ecommerce model, GA4 doesn’t retroactively rebuild your existing channel reports when a delayed conversion like this comes in. The event will show up in GA4’s Realtime and Events reports and can be used in custom explorations, but treat it as tagging the conversion value to the right visitor, not as an automatic historical recalculation.
Syncing Google Analytics data with your CRM
To sync back the data you can now either use
A) A data integration software like ours, where you can match the data. Once the data is joined you can run a blended, cross-channel analysis on the whole customer journey (across web analytics and CRM data). This allows you to get a clear picture across systems on what works, and what doesn’t. A sample customer journey visualization looks like this:

We integrate with Salesforce, Snowflake, Marketo, HubSpot, Zoho, Microsoft Dynamics and Stripe. You can get started for free here. If you’re specifically on Salesforce, see our dedicated guide on connecting Salesforce CRM to Google Analytics for a Salesforce-specific approach.
B) Run manual Google Analytics exports and upload them into your CRM.
Connect Google Analytics to your CRM and start analysing the whole customer journey.
Windsor vs Coupler.io

