How to Set Up a Conversion API with Your CRM: Send CRM Events to Meta, Google, TikTok and LinkedIn
How to send leads, deal stages and closed deals from HubSpot or Close to Meta, Google Ads, TikTok and LinkedIn through their conversion APIs: event mapping, matching data, deduplication, upload windows and values.
Contents
- Why CRM events instead of form submits
- The data flow from click to deal
- Event mapping: CRM event to platform event
- Matching data: how the platform recognizes your lead
- Deduplication with the pixel
- Only attributed data or all data
- Upload windows: when an event is too late
- Values and currency
- Common mistakes
- Checklist
- How LeadMetrics helps
The pixel reports that someone submitted a form. What happens next lives in your CRM: Was the lead qualified? Did they take a meeting? Did they buy? This guide shows how to send those events from HubSpot or Close to Meta, Google Ads, TikTok and LinkedIn through the Conversion API. It's about the setup: data, mapping, deduplication and deadlines. Which stages make good optimization goals is covered in the guide on pipeline stages as conversions. Last updated: November 2026.
Why CRM events instead of form submits
A form submit is easy to measure but a weak signal. Spam, fake phone numbers, prospects without budget: to the ad platform, every one of them is a success. CRM events change that:
- Quality over quantity: The platform learns which clicks lead to qualified leads and customers, not just filled-out forms.
- Real revenue instead of estimates: A won deal carries its actual value. That's the basis for value-based bidding.
- Independent of the browser: The event is created on the server when the status changes in your CRM. Ad blockers or a closed browser tab don't affect it.
The form lead still matters. It provides volume, and it carries the data the platform uses to match every later event.
The data flow from click to deal
When a deal is won weeks later, the customer is no longer on your website, but the platform still has to match the event to a click or a person. So everything it needs has to be stored with the lead.
Click
The ad appends a click ID to the URL: fbclid for Meta, gclid (or gbraid and wbraid) for Google, ttclid for TikTok, li_fat_id for LinkedIn. The Meta Pixel also sets the_fbpcookie.Lead
When the form is submitted, click IDs, cookie values and contact data are stored with the lead, on the contact in your CRM or in your tracking tool.Status change
Sales moves the deal to a new stage in the CRM, for example deal won. That change triggers the event, right away and not with the next export.Event to the platform
The event goes to the platform's API with hashed contact data, click ID, timestamp,event_idand, for closed deals, value and currency.
If step two is missing, nothing else works. Click IDs are only in the URL on the first page view. If you don't capture them there, you can't send them weeks later. They get lost most often in funnel builders and with iframe tracking.
Event mapping: CRM event to platform event
Before the first event goes out, build a mapping table. An example:
| CRM event | Trigger in HubSpot | Trigger in Close | Role |
|---|---|---|---|
| Lead | contact is created | lead or contact is created | volume, baseline signal |
| Qualified (SQL) | lifecycle stage SQL or a custom deal stage | custom lead status | quality signal |
| Meeting held | custom deal stage | custom lead status or opportunity stage | often the optimization goal |
| Deal won | deal stage "Closed won" | opportunity with status "Won" | revenue signal with value |
| Deal lost | deal stage "Closed lost" | opportunity with status "Lost" | reporting only, never an optimization goal |
On the platform side, the events have different names:
- Meta: Standard events
LeadandPurchase, custom events likeQualifiedLeadfor stages in between. For leads from Instant Forms, Meta's Conversion Leads performance goal expects a specific CRM format, see the post on low-quality leads from Meta Ads. - Google Ads: One conversion action of type import per stage. Since June 2026, new upload integrations go through the Data Manager API, details in the post on enhanced conversions for leads.
- TikTok:
LeadandPurchase. Since May 1, 2025,SubmitFormandCompletePaymenthave these names, and the old names are converted automatically (TikTok Business Help). - LinkedIn: One conversion rule per event with a type such as
LEAD,QUALIFIED_LEAD,SALES_QUALIFIED_LEADorPURCHASE(LinkedIn Conversions API).
Three rules keep the mapping clean:
- One CRM event, one event per platform. If a won deal triggers both
LeadandPurchaseon Meta, the platform counts wrong. - Don't rename events. A renamed event is a new event without history for the platform.
- Never send lost deals as conversions. If you send them, use a separate event for reporting, never
LeadorPurchase.
Matching data: how the platform recognizes your lead
A CRM event is only as good as its match. Every platform combines hashed contact data with its own click ID:
| Platform | Contact data (SHA-256) | Click and browser IDs |
|---|---|---|
| Meta | email, phone, name and more | fbc (from the fbclid), fbp |
| Google Ads | email, phone, name with address | gclid, gbraid, wbraid |
| TikTok | email, phone | ttclid |
| email, phone (from API version 202611), name | li_fat_id |
Sources: Meta for Developers, Google Data Manager API, TikTok Business Help, LinkedIn Conversions API.
What matters in practice:
- Normalize first, then hash: Email in lowercase without spaces, phone with country code. LinkedIn expects the number in E.164 format without the plus sign, so digits only. One extra space produces a different hash and no match. How to check this for Meta is covered in the guide to improve Event Match Quality.
- Click IDs in plain text:
fbcandfbpare not hashed. If there's no_fbccookie, Meta lets you buildfbcyourself from the fbclid, using the time you first saw it. - Send several identifiers: LinkedIn points out that only matched events can be used for attribution and optimization. The more identifiers, the higher the match rate. In B2B, the li_fat_id helps when someone signs up with a work email but their LinkedIn profile uses a personal one.
Deduplication with the pixel
Most CRM events only exist on the server. No pixel sees that a deal was won. So the main double-counting risk is the lead, which both pixel and CRM can report. There are two clean ways to handle it:
- Shared
event_id: The browser creates an ID for the lead, sends it with the pixel event and stores it with the lead. The server later sends the same ID. Meta drops duplicates with the same event name andevent_idwithin 48 hours (Meta for Developers), and TikTok also deduplicates byevent_idwithin 48 hours (TikTok Business Help). LinkedIn needs a separate conversion rule per source and the sameeventId, and then only counts the Insight Tag event (LinkedIn deduplication). - Separate roles: The pixel reports the lead, the CRM path only sends later stages under their own event names. Then there's no overlap.
What to avoid: pixel and CRM both send Lead, but with different IDs. Then every lead counts twice. Server-only events also need a stable ID, for example built from deal ID and stage, so a re-sync doesn't report anything twice. In Google, the transactionId does this: within the same conversion action, Google counts the first event and treats later ones as adjustments.
Only attributed data or all data
A basic decision during setup: does each platform only get events from its own leads, or all of them?
- Only attributed data: Meta only gets deals from leads that came through Meta, Google only those from Google leads. Platform reports stay clean, and no platform claims deals from other channels. In return, you lose signals, for example when someone only saw the ad and later searched for you directly.
- All data: Every closed deal goes to the platform, which checks for itself whether it knows the person. That gives it more signals for optimization. But the platform may then count deals as its own conversions that another channel brought in. Add up the numbers from all platforms and you'll quickly exceed your CRM.
Rule of thumb: with low volume, "all data" can help optimization. But base budget decisions on your own attribution, never on the sum of all platform reports.
Upload windows: when an event is too late
CRM events happen days or weeks after the click. Each platform only accepts them within a certain window:
| Platform | Window | Source |
|---|---|---|
| Meta | timestamp at most 7 days before sending; if one event is older, the whole request fails | Meta for Developers |
| Google Ads, gclid import | up to 90 days after the last click | Google Ads Help |
| Google Ads, enhanced conversions for leads | up to 63 days after the last click | Google Ads Help |
| conversion at most 90 days old | LinkedIn Conversions API | |
| TikTok | no official limit found | - |
Meta recommends sending events in real time or in batches close to real time (Meta for Developers). The timestamp should be the moment of the status change, not the date the lead was created. In Google, imported conversions show up in the account after about 3 hours. For a comparison of all formats, see the post with the conversion APIs compared.
Values and currency
Without a value, the platform only knows that a deal happened, not how big it was. For Meta, value and currency are required for Purchase and for events used in value optimization, with the currency as a three-letter ISO code like EUR (Meta for Developers). For Google, value and currency are optional but needed for value-based bidding. LinkedIn accepts the value as currency code plus amount.
In practice:
- Stay consistent: Pick net or gross, and one logic for subscriptions, such as first-year or contract value. Switching distorts learning.
- Always send the currency, even if everything runs in euros.
- Value earlier stages: For SQL or meeting you can use an expected lead value. How to derive it is covered in the pipeline guide.
Common mistakes
- Click IDs not stored with the lead: The CRM event can't be matched to a click later.
- Monthly uploads: For Meta almost everything is older than 7 days, and the request fails completely.
- Wrong timestamp: Sending the lead's creation date with the deal breaks Meta's window even if you send it right away.
- Amounts in cents: Payment providers like Stripe often return amounts in cents. €5,000 turns into €500,000.
- No legal basis: Sending contact data to ad platforms requires a legal basis under GDPR. Check with your data protection officer how you handle it.
Checklist
- Click IDs (
fbc/fbp, gclid, ttclid, li_fat_id) and contact data are stored with every lead - Mapping table with CRM trigger and event name per platform
- Each CRM event triggers exactly one event per platform
- Email and phone normalized and hashed with SHA-256
- Lead event deduplicated: shared
event_idor separate roles - Stable ID per deal and stage against duplicate syncs
- Decision made on only attributed or all data
- Events are sent as soon as the status changes, with the real timestamp
- Value and currency for closed deals, consistently net or gross
- Platform numbers checked against the CRM for two to four weeks
How LeadMetrics helps
LeadMetrics covers the whole path from click to platform event:
- Click IDs without CRM fields: Lead tracking captures
fbc/fbp, gclid, ttclid, li_fat_id and UTMs on the visit. Leads are matched to the visit by session ID, email or phone number up to 90 days back. - Native CRM connection: The CRM integration pulls deals from HubSpot and Close. For HubSpot, LeadMetrics stores deal stages over time. Connect other systems through webhooks, Zapier or Make.
- Mapping per project: The Conversion API sends lead, purchase, deal won and deal lost to Meta, Google Ads, TikTok and LinkedIn. You decide per project which LeadMetrics event becomes which platform event. Track intermediate stages like SQL or meeting as a custom metric, for example through a HubSpot workflow or webhook, and send them as events too.
- Matching and deduplication: Email, phone and names are hashed with SHA-256 and sent with click IDs, value and currency, and an
event_id. - Only attributed or all data: You decide whether only events from attributed leads are sent or all of them, the latter for Meta and TikTok.
- Traceable: For every lead you see a log of which events went to which platform.
LeadMetrics doesn't support the Conversion Leads performance goal for Instant Forms. For leads from your website and funnel builders, you get all CRM events to all four platforms through one connection.
Ready for better tracking?
Frequently asked questions
Terms in this guide
All termsConversion API · CAPI
A Conversion API (CAPI) is an interface that sends conversions directly from server to server to ad platforms like Meta or Google, without the browser.
CRM · Customer Relationship Management
A CRM (customer relationship management) is a system for managing contacts, leads, deals and all communication with prospects and customers in one place.
Offline Conversions · Reporting deals that happen off your website back to ad platforms
Offline conversions are conversions that don’t happen on your website – like a closed deal in your CRM – and are sent back to ad platforms like Meta.
Conversion Action · What Google Ads counts as a success
A conversion action in Google Ads is a single action counted as a success, such as a lead, a qualified lead or a won deal. Primary conversion actions are used for bidding, secondary ones for observation only.
Event Deduplication
Event deduplication makes sure a conversion sent through both the pixel and the Conversion API is only counted once by the ad platform.
Hashing
Hashing turns data like email addresses into a fixed string using a one-way function (e.g. SHA-256), so the original can't be calculated back from it.
gclid · Google Click Identifier
The gclid is the Google Click ID that Google Ads adds to your URL on every ad click, e.g. ?gclid=EAIaIQobChMI... What it means, why it is missing and how to use it.
li_fat_id · LinkedIn First-Party Ads Tracking ID
The li_fat_id is the click ID of LinkedIn Ads. LinkedIn appends it to the landing page URL on an ad click so conversions sent through the Conversions API can be matched to the click and the LinkedIn member.
Related articles
- Conversion APIs for Lead Generation: Meta, Google, TikTok and LinkedIn ComparedAll major ad platforms now accept leads and deals server-side, but each one differently. Match keys, click IDs, lead events, time limits and deduplication for Meta, Google Ads, TikTok and LinkedIn at a glance, as of October 2026.
- Google Data Manager API and Enhanced Conversions for Leads: What Changed in 2026Since June 15, 2026, the Google Ads API no longer accepts new offline conversion import integrations. What the Data Manager API is, how enhanced conversions for leads work and what to do now.
- Meta Conversion Leads: Why Cheap Leads Are ExpensiveYour Meta lead campaigns deliver cheap leads, but sales can hardly reach anyone? With the Conversion Leads performance goal, Meta optimizes for leads that progress in your CRM. Requirements, setup and common mistakes.
- From CRM Lead to Real Conversion: No More Flying Blind in Performance MarketingHow CRM/AdSync makes the true value of your campaigns visible – and why it's the game-changer for data-driven growth.
- Client-Side vs. Server-Side Tracking: Differences, Pros and Cons for Lead GenerationClient-side vs server-side tracking: how both work, how they differ on ad blockers, cookies, privacy and data quality, and why lead gen setups combine the two.
More guides
All guidesCross-Domain Tracking for Funnels, Iframes and Checkouts: Don't Lose a Single Lead
Why leads from Heyflow, Perspective, Typeform, ClickFunnels, Calendly or Digistore24 lose their source, and how to pass the session across domains, iframes and checkouts.
Read guideHow to Improve Meta Event Match Quality: What Data to Send
How to improve Event Match Quality in Meta: which customer data counts, how to normalize and hash it, and how fbc, fbp and event_id help your score.
Read guideCampaign Tracking with UTMs and Click IDs: Setup Guide
Set up clean campaign tracking: a UTM naming convention, dynamic parameters in Meta and Google Ads, click IDs, common mistakes and how to test it all.
Read guide