Guide · Tracking

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.

Daniel Kalcher11 min read

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.

  1. 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 _fbp cookie.
  2. 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.
  3. 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.
  4. Event to the platform

    The event goes to the platform's API with hashed contact data, click ID, timestamp, event_id and, 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 eventTrigger in HubSpotTrigger in CloseRole
Leadcontact is createdlead or contact is createdvolume, baseline signal
Qualified (SQL)lifecycle stage SQL or a custom deal stagecustom lead statusquality signal
Meeting heldcustom deal stagecustom lead status or opportunity stageoften the optimization goal
Deal wondeal stage "Closed won"opportunity with status "Won"revenue signal with value
Deal lostdeal 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 Lead and Purchase, custom events like QualifiedLead for 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: Lead and Purchase. Since May 1, 2025, SubmitForm and CompletePayment have 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_LEAD or PURCHASE (LinkedIn Conversions API).

Three rules keep the mapping clean:

  1. One CRM event, one event per platform. If a won deal triggers both Lead and Purchase on Meta, the platform counts wrong.
  2. Don't rename events. A renamed event is a new event without history for the platform.
  3. Never send lost deals as conversions. If you send them, use a separate event for reporting, never Lead or Purchase.

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:

PlatformContact data (SHA-256)Click and browser IDs
Metaemail, phone, name and morefbc (from the fbclid), fbp
Google Adsemail, phone, name with addressgclid, gbraid, wbraid
TikTokemail, phonettclid
LinkedInemail, phone (from API version 202611), nameli_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: fbc and fbp are not hashed. If there's no _fbc cookie, Meta lets you build fbc yourself 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:

  1. 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 and event_id within 48 hours (Meta for Developers), and TikTok also deduplicates by event_id within 48 hours (TikTok Business Help). LinkedIn needs a separate conversion rule per source and the same eventId, and then only counts the Insight Tag event (LinkedIn deduplication).
  2. 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:

PlatformWindowSource
Metatimestamp at most 7 days before sending; if one event is older, the whole request failsMeta for Developers
Google Ads, gclid importup to 90 days after the last clickGoogle Ads Help
Google Ads, enhanced conversions for leadsup to 63 days after the last clickGoogle Ads Help
LinkedInconversion at most 90 days oldLinkedIn Conversions API
TikTokno 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_id or 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?

Try LeadMetrics free for 10 days and see which campaigns actually drive revenue.
Try free for 10 days

Frequently asked questions

In most cases, yes. The pixel captures page views and the lead in the browser and sets cookies like _fbp that help with matching later. CRM events add everything that happens after the form. If you send the lead through both channels, you need a shared event_id, otherwise it counts twice.

Terms in this guide

All terms

Conversion 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

More guides

All guides