CRM Ad Integration: Building a Lead-to-Revenue Data Flow
How to set up CRM ad integration: connect Google, Meta and TikTok lead forms to your CRM and send sales stages back to the ad platforms, step by step.
CRM ad integration is a two-way data flow that automatically moves leads from ad platforms into the CRM and sends sales results from the CRM back to the ad platform. The first direction ensures that the person who filled in the form reaches the sales team without getting lost. The second lets the Google Ads, Meta and TikTok algorithms learn from real sales instead of form counts.
In this post I walk through a lead’s journey from ad click to revenue, which connection method I choose and when, and the setup mistakes I see most often. The topic is one of the most concrete parts of the way of working I call marketing engineering.
Why do you need CRM ad integration?
You need CRM ad integration to connect ad spend to the real business outcome recorded in the CRM. Without it, the ad platform only knows that a form was submitted. It does not know whether the lead was called, whether it was qualified or whether it turned into a sale.
This missing information creates two separate problems. The first is operational: leads sit in CSV files, inboxes or spreadsheets copied by hand. The sales team responds late, and some records are never opened. The second is algorithmic: smart bidding strategies move toward the audience that brings the most forms. That audience is often the cheapest but least qualified one.
The integration solves both problems together. The lead lands in the CRM within seconds and is assigned to an owner. The stage marked by the sales team also goes back to the ad platform. The setup described here is the technical foundation for measuring patient lead quality, which I wrote about earlier.
How does data flow between the CRM and the ad platform?
Data between the CRM and the ad platform flows in two directions: lead transfer going forward, and conversion reporting coming back. Each direction is built with different technical tools. Planning them as separate projects makes the work easier.
Forward direction: getting the lead into the CRM
The forward direction is a form on the ad platform or on your site creating a record in the CRM. Leads can come from two places. With in-platform forms (Google Ads lead forms, Meta Instant Forms, TikTok Instant Forms), the data is created on the ad platform and pulled into the CRM from there. With site forms, the data is created on your own server and written directly to the CRM API.
With site forms, the main job is not losing the click ID. Parameters such as GCLID, fbclid or ttclid that arrive on the landing page should be written into hidden form fields and stored in separate CRM fields. I explain how in detail in the landing page guide and the GCLID post.
Backward direction: reporting the sales result to the ad platform
The backward direction is sending the CRM lead stage to the ad platform as a conversion. On the Google Ads side, this is done through offline conversion import using the click ID or hashed user data.[4] I cover the details in the Google Ads offline conversion import and Enhanced Conversions for Leads posts.
On the Meta side, the same job is done by the Conversions API for CRM. According to Meta’s developer documentation, for best results the 15-17 digit Meta lead ID should be stored in the CRM and sent with every event.[3] If there is no lead ID, customer parameters such as click ID, phone number or email can be used instead.[3] You can find the general logic of the Conversions API in the what is Meta Conversions API post.
How do you connect a Google Ads lead form to a CRM?
Short answer
How do you connect a Google Ads lead form to a CRM?
A Google Ads lead form connects to a CRM through a webhook, the Google Ads API or a partner such as Zapier. With a webhook, you define a URL and a verification key on the CRM side. Every time the form is submitted, Google sends an HTTP POST request to that address. Verify the setup with the test feature and a low-budget campaign.
- In the lead form asset delivery settings, choose the webhook, API or Zapier method.
- For a webhook, create a URL and a verification key on the CRM side.
- Map the form fields to CRM fields and add a lead_id field.
- Send a sample lead with the Google Ads test feature.
- Verify the live flow with a low-budget campaign.
According to Google’s help page, lead form data can be downloaded as a CSV, received by email or sent to the CRM automatically.[1] There are three ways to send it automatically: webhook, the Google Ads API and Zapier.[1] The webhook documentation explains that an HTTP POST request goes to the defined URL when the form is submitted, and that the request can be validated with a key.[2]
Two details directly affect the setup. The first is retention: Google states that leads are stored for only 60 days.[1] If the automatic transfer fails, older leads are lost. The second is repeat delivery: the same lead may be delivered more than once, and Google recommends using the lead_id field to deduplicate.[1]
That is why the webhook receiver in the CRM should follow two rules. The key of every incoming request should be validated, and no new record should be created if the lead_id has already been saved. The pseudocode below sums up this logic:
// Webhook receiver on the CRM side (simplified)
app.post('/webhooks/google-lead', async (req, res) => {
if (req.body.google_key !== process.env.GOOGLE_LEAD_KEY) return res.sendStatus(401);
const leadId = req.body.lead_id;
if (await crm.findByExternalId('google', leadId)) return res.sendStatus(200); // duplicate
await crm.createLead({ source: 'google_ads', externalId: leadId, gclid: req.body.gcl_id, ...mapFields(req.body) });
res.sendStatus(200);
});
TikTok Instant Forms offer similar options. TikTok’s help page lists direct integrations, third-party integrations, the TikTok Custom API with webhooks and website builder plugins.[5] Field mapping is edited separately for each Instant Form connection.[5]
Which integration method should you choose?
Choose the integration method based on lead volume, number of channels and your need for error handling. For a single channel and low volume, ready-made connectors deliver fast results. In multichannel, multi-market setups with custom business rules, a webhook or API integration you write yourself is easier to control.
Ready-made connector (Zapier, CRM plugin)
- Set up in a few hours without code
- Field mapping is done in the interface
- Error handling and retry logic are limited
- Per-task cost can grow as lead volume rises
Custom webhook or API integration
- Requires development and maintenance effort
- Deduplication, assignment and validation rules are written freely
- Errors are logged and can be reprocessed
- You know exactly which server the data passes through
In practice, most setups are hybrid. A pattern I use often is pulling Meta and TikTok leads through the CRM’s own integration while writing site forms and the feedback flow in custom code. What matters is that every source writes to the same CRM field schema.
Which fields and stages should you define in the CRM?
The CRM should have, at a minimum, fields that carry source, ID and stage information; without them, the feedback loop cannot be built. Writing the field schema before the integration is far cheaper than cleaning up data afterwards.
| Field | Example value | What it is for |
|---|---|---|
| Source platform | google_ads, meta, tiktok | Separating channels in reports |
| Lead ID | The lead_id assigned by the platform | Deduplication and Meta matching |
| Click ID | GCLID, fbclid, ttclid | Offline conversion matching |
| Campaign / ad group | UTM or platform field | Revenue reporting by campaign |
| Creation time | ISO 8601 date-time | Conversion window and first response time |
| Marketing consent | Yes / no, date | Compliance with KVKK and platform terms |
| Lead stage | New, contacted, qualified, won | The signal sent back to ads |
Keep lead stages few and measurable. Meta recommends that the stage you optimize for happens within 28 days after the lead is created, and that its conversion rate falls between 1% and 40%.[3] The same documentation recommends at least 200 leads per month and data uploads at least once a day.[3] These thresholds are a good checkpoint when choosing a stage: a stage that rarely happens does not give the algorithm enough data to learn from.
It also matters to keep stage values close to the sale. In e-commerce, order and return data are good candidates; in health tourism, consultation and deposit stages are. Think about this together with the patient journey of the health tourism business.
How do you set up CRM ad integration step by step?
CRM ad integration is set up in this order: stage definitions, field schema, forward flow, backward flow and testing. Changing the order usually leads to rework. These are the steps I follow in my own projects:
- Define sales stages in writing
Agree with the sales team on the conditions under which "contacted", "qualified" and "won" are marked. Create a conversion action in the ad platform for each stage.
- Set up the CRM field schema
Create the source, lead ID, click ID, campaign, time and consent fields. Add click IDs to site forms through hidden fields.
- Connect the forward flow
Connect Google, Meta and TikTok lead forms to the CRM through a webhook, API or ready-made integration. Write the deduplication rule using the lead ID.
- Connect the backward flow
Build a workflow that sends an offline conversion to Google Ads and a Conversions API event to Meta when a stage changes. Send events at least once a day.
- Test and monitor
Verify the end-to-end flow with test leads, then launch a low-budget campaign. Check match rates and errors weekly in the platform diagnostics screens.
The software side of the backward flow is usually a scheduled job (cron) or the CRM’s own automation rule. When a stage changes, the event is written to a queue and sent to the platforms at regular intervals. Failed sends should be logged and retried. Otherwise the feedback loop breaks silently, and you notice it weeks later.
How do you ensure KVKK compliance and data security?
In CRM ad integration, personal data should be sent to the ad platform only with explicit consent or another valid legal basis, and only in hashed form. KVKK, Turkey’s Personal Data Protection Law, governs how data such as phone numbers and email addresses is processed and transferred abroad. Ad platforms also expect this data to be hashed with SHA-256 before it is sent.
The risk grows when health data is involved. In patient leads, even the treatment someone is interested in can be considered sensitive. That is why events sent to ad platforms should not include fields such as treatment name, diagnosis or health condition. Stage names should also stay neutral, such as “qualified lead” or “consultation”.
What should you check after the integration is live?
After the integration is live, check lead loss, duplicate records, match rates and stage consistency regularly. An integration works on the day it is set up; the real question is whether it still works three months later. I use the list below in a monthly audit:
The first check is the most important. The gap in lead counts between the ad platform and the CRM is the quickest sign of whether the integration has broken. If the gap is more than a few records, look at the webhook logs and the error queue.
Conclusion: tell the algorithm which leads are valuable
CRM ad integration is the infrastructure that ties ad budgets to revenue instead of form counts. Going forward, it brings leads into the CRM without losing them; coming back, it reports the sales stage to the ad platform. The webhook and API options from Google, Meta and TikTok are enough to build both directions. The real work is defining sales stages clearly and moving data in line with KVKK.
To get started, compare the fields in your own CRM with the table above. The missing field is the first piece you need to build. I handle this kind of measurement and integration work as part of my software development service and my performance marketing work; you can find my background on the about page.
Key terms
- Webhook
- Webhook is a notification mechanism that sends an HTTP request to another system the moment an event happens. With ad lead forms, the lead data is delivered to a defined URL as a POST request as soon as the form is submitted, and a CRM record is created.
- Lead ID
- Lead ID is the unique number an ad platform assigns to each prospect who comes in through a form. Stored in the CRM, it is used to filter out duplicate records and to match a sales result to the right ad click.
- Lead stage
- Lead stage is the step a prospect is at in the CRM sales process, such as new, contacted, qualified, quoted or won. When these stages are sent back to the ad platform, the algorithm learns which leads are valuable.
Frequently asked questions
What is CRM ad integration?
CRM ad integration means leads from ad platforms flow into the CRM automatically, and sales results in the CRM are sent back to the ad platform. The first direction makes sure the lead reaches the sales team without getting lost. The second lets the ad algorithm optimize for real sales instead of form counts.
How do you connect a Google Ads lead form to a CRM?
According to Google's help page, lead form data can be sent to the CRM through a webhook, the Google Ads API or a partner such as Zapier. With a webhook, you define a URL and a verification key, and Google sends an HTTP POST request to that address every time the form is submitted. After setup, verify the flow with the test feature and a low-budget campaign.
How do you integrate Meta lead ads with a CRM?
With Meta lead ads, leads are first downloaded into the CRM through a direct integration, a partner or a webhook. Then the lead stages in the CRM are sent back to Meta through the Conversions API. For this match, Meta recommends storing the 15-17 digit lead ID in the CRM.
Which fields should be mandatory for a CRM integration?
At a minimum you need the lead ID, source platform, campaign and ad group, click ID (GCLID or fbclid), creation time and a marketing consent field. On the sales side, keep the lead stage, the date of each stage change and the sale value if there is one. Without these fields you cannot build the feedback loop.
Should you choose Zapier or a custom integration?
If lead volume is low and you need to start fast, ready-made connectors such as Zapier are enough. In multichannel, multi-market setups with custom business rules, an integration written with webhooks or APIs is easier to control. Base the decision on your need for error handling and data ownership.
Sources
The full topic: Software guide ↗ · Tracking guide ↗