Skip to main content
When you finish, each new HubSpot contact, qualified deal, and won deal arrives in Events, matched by email to the visit that started it. HubSpot has no direct connection. You send each stage to the DATALYR ingest endpoint from Zapier or from a HubSpot workflow.

What HubSpot sends

Only deal_won carries a value: the deal amount. Its cash_role is non_cash_fact, so no revenue report counts it. Cash comes from a payment source such as Stripe or Commas. Each event_id is stable per record and stage. A retried request is a duplicate, not a second conversion. See Duplicates.

Before you start

The request

Replace each placeholder such as {{email}} with the matching HubSpot field. Keep source, currency, lead_source and cash_role as written. A refused request returns 400 with the field. Zapier marks the step failed.
The HubSpot card in Sources has the same bodies.
Keep the write key in Zapier or HubSpot only. Anyone holding it can write events into your workspace.

Send stages from Zapier

Build one Zap per stage.
1

Add the HubSpot trigger

For lead_submitted, use New Contact. For the deal stages, use Updated Deal Stage and pick the stage.
2

Find the contact

For a deal stage, add Find Associations for the deal. Then add Find Contact to read the contact’s email.
3

Add the request

Add Webhooks by Zapier with the Custom Request event. Set Method to POST.
4

Set the URL and headers

Paste the URL. Add the X-API-Key and Content-Type headers.
5

Paste the body

Paste the stage’s body into Data. Map each placeholder to the field from an earlier step.
6

Test the step

Run the step test. Confirm the response contains "success": true.

Send stages from a HubSpot workflow

A deal-based workflow must send the associated contact’s email as user_id. If it cannot, use Zapier.

How deals match to ad clicks

HubSpot events match by email alone. user_id and properties.email carry it. A HubSpot event joins an ad click only when DATALYR already knows that email from a tracked visit. That happens through an identify() call on your form, an iClosed or Calendly booking, or a payment source. See Identity.

Set up conversion rules

In Sources, select Set up conversions on the HubSpot card. Setup asks what a qualified lead is worth, then creates: Most deals close after Meta’s 7-day window. Optimize Meta on lead_qualified. Setup sends one purchase per sale to each pixel or conversion action. It asks when two sources compete: Setup pauses the other side’s rules there and lists them first. It deletes none.

Verify

  1. Open your landing page in a private window with ?utm_source=doctest.
  2. Submit your form with a test email address.
  3. Create a test deal for that contact. Move it to your qualified stage.
  4. Open Events. Confirm a lead_qualified row with source hubspot.
  5. Open Users. Find the test email. Confirm the pageview and lead_qualified sit on one user.
  6. Move the deal to Closed won. Confirm deal_won arrives with the deal amount in value.

When it does not work

Next