Marketing automation · 10-minute read

Google Analytics and CRM: How to Connect Forms to Customers

Giorgio Gnoli · updated October 29, 2026

In 30 seconds

  • Google Analytics tells you where leads come from; your CRM knows if they became customers. They don't talk to each other on their own.
  • The bridge is a common code that ends up in both the GA4 event and the CRM card.
  • You never share your name, phone number, or email address with Google: their rules prohibit it.
  • The result is a channel-based report: number of forms, number of clients, and revenue generated.
Article Index
  1. Why Google Analytics and CRMs Don't Talk to Each Other Automatically
  2. How to Connect Google Analytics to Your CRM, Step by Step
  3. Real case study: a dental practice
  4. Summary Table
  5. Common Mistakes to Avoid
  6. Frequently Asked Questions

Connecting Google Analytics and CRM means you can answer a simple question: of the website visitors, which ones became customers, and from which channel did they come? Google Analytics 4 knows where form fillers originate (Google, a campaign, Instagram), but it doesn't know what happens afterward. The CRM knows who bought, but not where they came from. The connection is made with a common code that goes into both systems.

If today you see "20 forms submitted" in GA4 and "5 new clients" in your CRM but can't tell which are the same, here's how I connect them: the steps, two possible approaches (one simpler, one that works even with old data), how to read the numbers, and what never to send to Google.

Why Google Analytics and CRMs Don't Talk to Each Other Automatically

These are two systems that view the same person from two different angles.

  • GA4 Register visits: entry page, source, campaign, device. When someone submits a form, the site sends the event. generate_leadthat Google recommends specifically to measure leads generated from a form (List of Recommended GA4 Events).
  • The CRM records the person: name, phone, appointments, quotes, invoices.

Between the two, there's no common field. GA4 doesn't know who filled it out and shouldn't: Google Analytics policies prohibit sending data that Google could identify as personally identifiable information (PII)—such as name, email, phone number, and similar details (Google best practices on PII). The CRM typically saves only the declared source ("How did you hear about us?"), which users fill in randomly.

So the attribution model ends up being decided by looking only at GA4, counting forms instead of customers. A campaign that drives many forms from people who don't buy seems best. The same applies to requests coming from ChatGPT: GEO, how to appear on ChatGPT and measure it explains how to separate them.

How to Connect Google Analytics to Your CRM, Step by Step

GA4 + CRM

  • Common codean ID for each submitted form
  • GA4 Eventgenerate_lead with ID as parameter
  • CRM Dashboardthe same ID saved on the contact
  • MatchingEvery day, automatically
  • Channel Reportmodules, clients, revenue
  1. Define the common code. This field lets you match a specific GA4 event with a corresponding CRM record. There are two approaches; see them below.
  2. Send the event generate_lead a GA4 with the code as a parameter. Via Google Tag Manager or site code, only after the form is actually submitted and only if the user has consented to analytics.
  3. Register the parameter as a custom dimension. In GA4, go to Admin → Custom Definitions → Create Custom Dimension, scope Event, and enter the parameter name. Without this step, the data arrives but remains invisible in reports; after creation, it takes 24–48 hours to appear (Google's guide on custom dimensions).
  4. Save the same code in the CRM. The form that creates the contact in the CRM must also write the code in a dedicated field.
  5. Automatically match records. A nightly script pulls daily events from GA4—including code, source, and campaign—and links them to your CRM records. You can use the GA4 API or export via BigQuery.
  6. View channel reports. For each source: forms submitted, forms with a CRM record, leads, revenue. This is the number you need to decide where to invest.

With a Lead ID (the approach I recommend)

The site generates a random code when the person submits the form, for example L-8F3K2and sends it to two places: the GA4 event and the CRM along with contact data. The code alone reveals nothing about anyone, so no personal data reaches Google.

It's the cleanest route if you start from scratch. The downside is it only works from the day you activate it: forms submitted before that won't have a code.

With a cryptic imprint of phone and email

This is the approach used in the case described below. The site does not send the phone number, but its fingerprint: a string calculated using SHA-256 based on the number plus a secret word (the "salt") known only to your server. The CRM calculates the same fingerprint for customer phones and compares the two lists.

The advantage is that you can also match contacts that were already in the CRM without a saved code. Two caveats:

  • For GDPR purposes, encrypted data remains personal data pseudonymized, not anonymous: whoever holds the key can identify the individual (Article 4 of the GDPR, definition of pseudonymization). It must be processed with consent and referenced in the privacy notice;
  • Without salt, a phone number's imprint recalculates in seconds. Salt must reside only on the server, never in the page code.

If you have doubts about this second path, use the first one. I use it only when reconnecting to the past is necessary.

Where data is read in GA4

For manual control: Explore → Free FormatAs dimensions, enter the parameter with the code. Session source/device e Destination PageAs a metric Event Countas a filter Event Name equal to generate_leadExport the table and compare it with your CRM. It works for a trial, but automation is the better long-term solution.

The same report is used when two pages on the site target the same search query: it tells you which one drives traffic, and that's where I start to resolve an SEO cannibalization issue.

Data retention matters: in standard GA4 properties, user-level data can be retained for either 2 months or 14 months, depending on your settings (Google's guide on data retention). If you need to reconcile over time, ensure it is set to 14 months.

If contacts are coming from ads, the comparison must also include Google Ads, which typically generates fewer leads than your CRM: why this happens and how to fix it is explained in the guide to offline conversions for Google Ads.

Real case study: a dental practice

In a dental practice, the new site was already sending the event to GA4 generate_lead With the encrypted phone number, name, and email—only with consent for statistics—the second half was missing: no one compared those data points to the studio's management system, which serves as the CRM. In GA4 reports, events were visible, but no one knew who they belonged to or whether they had become patients.

Dal modulo del sito al paziente nel gestionale Quattro passaggi: il modulo inviato manda a GA4 l'evento generate_lead con l'impronta del telefono; il gestionale calcola la stessa impronta sui pazienti; uno script abbina le due liste ogni mattina; la mail del mattino mostra solo i totali per canale. Nel primo giro, 9 moduli su 9 ritrovati. 1. Modulo inviato GA4 riceve generate_lead + impronta 2. Gestionale stessa impronta calcolata sui pazienti 3. Abbinamento alle 7:30 ultimi 30 giorni, sul server dello studio 4. Mail delle 8:00 solo totali per canale, nessun nome Primo giro: 9 moduli inviati su 9 ritrovati nel gestionale
GA4 numbers (generate_lead events from October 11) and first match on the studio's management system, last 30 days.

Before building anything, I checked what was actually arriving in GA4. No user IDs: only event parameters. As of October 11, there were 9 forms submitted, with 9 different phones, plus 18 events of form fields filled out and then abandoned. Data retention was already at 14 months, so reconciliation could also go backward.

Then I built the connection. In the CRM, I added a table that receives fingerprints from GA4, accessible only by the server and never via the site's public key, along with a function that recalculates the same fingerprint for patient phones and emails. Before activating it, I tested on a dummy number to ensure the site calculation matched the database result: if even one space or prefix differs, nothing matches.

In the first run, over the last 30 days, all 9 submitted forms were found in the CRM. From there, the script runs every morning at 7:30 AM, and the 8:00 AM report email no longer includes raw fingerprints: it has one row per channel showing submitted forms matched to a patient. Numbers only, no names.

Summary Table

Method Since it's coming to GA4 I cannot provide a translation because the source text you requested to translate is missing from your message. Please paste the Italian website content here, and I will immediately generate the natural, direct US English translation following all your specified rules (preserving tags, numbers, brand names like "Giorgio Gnoli", "AstraK", and "Astra K"). Contro When to Use It
Lead ID A random code No personal data to Google, simple Valid only when enabled Starting from scratch
Encrypted salt imprint Phone or Email Hash Reconnect existing contacts in the CRM too One personal data point for GDPR compliance If you need to match the past
Source in the CRM Nothing No GA4 setup required It depends on what the person writes How I control, never alone
Handcrafted export from Esplora One of the first two Done in an hour It can't hold beyond the trial To understand if it's worth

Secrets known by few

  1. Normalize before encrypting. Phone number with the +39 prefix and no spaces, email in lowercase: the website and CRM must perform exactly the same cleaning, otherwise fingerprints won't match.
  2. Measure abandoned forms too. An event on filled fields, before submission, tells you where people stop.
  3. In reports, include totals only. Emails or dashboards viewed by many don't need names; details stay in the CRM.
  4. Set data retention to 14 months on day one. You cannot recover what GA4 has already deleted.

When the two systems are connected, the next step is to select which numbers to review each week: I discuss this in KPI CRM B2B: the data that matters and in how to build a CRM dashboard. To determine how to allocate credit across channels when a customer interacts with more than one, refer to the guide on attribution modeling in CRM.

Common Mistakes to Avoid

  • Send to GA4 via email or phone clearly, also inside the thank-you page URL (grazie?email=...). It violates Google's rules, and it's easy to do without realizing it.
  • Encrypt without salt. A phone number's unsalted fingerprint is quickly reconstructed.
  • Count forms as leads. A form is a lead request. The best channel is the one that brings in customers, and you only know that from your CRM.
  • Trust the "How did you hear about us" field. Use it for confirmation, not as a primary data point.
  • Connect everything on a messy CRM. If the same customer has three records, matching picks one at random: first, we clean up your CRM data quality.

Frequently Asked Questions

Can you connect Google Analytics 4 to the CRM?

Yes. There is no direct connection, but you only need a common code: send it to GA4 as the form event parameter and save it in the CRM on the contact record. Then a script matches the two lists.

Is Google Analytics a CRM?

No. Google Analytics misura le visite e le azioni sul sito in forma aggregata, il CRM gestisce le persone e la relazione commerciale. Servono tutti e due, collegati.

Can I send the customer's email to Google Analytics?

No. Google Analytics policies prohibit sending data that can identify an individual, such as name, email, and phone number. Use a random code or, if absolutely necessary, a salted hashed fingerprint.

What is the generate_lead event in GA4?

It's the event Google recommends for measuring a generated lead, such as a submitted form. You can add parameters to it, like an estimated value or a code used to locate the contact in your CRM.

How long does it take to connect GA4 and CRM?

For a manual test with Esplora, it takes just one hour. For automatic integration, using the daily script, it went quickly for the studio since the site was already sending the correct data: most of the work involved verifying that the website and the management system calculated the same footprint.

Does it work with Google Ads campaigns too?

Yes: In GA4, the source and campaign arrive with the event, so the channel report shows them separately. If campaigns lack the correct parameters, they fall under a generic category and aren't distinguished.

If you want to know how many of your website contacts become customers and where they come from, I offer the CRM Diagnosis with Astra K. If you prefer to start on your own, below is the blueprint I use to measure lead generation channel by channel.

Want to apply it to your business? In the CRM Diagnosis, we follow a real deal of yours from first contact to contract and show you exactly where customers are lost.

Discover the CRM Diagnosis
WhatsApp