Skip to main content
Statamic → HubSpotIntegration guide

Connecting Statamic to HubSpot

Statamic is a flat-file CMS on Laravel, usually chosen by agencies for content sites where commerce is bolted on rather than central. HubSpot is where sales works, so a conversion that never reaches it is invisible to the people who decide what a lead was worth. The join between them succeeds or fails on one thing: whether the contact identity — email, or the hubspotutk cookie reaches the Statamic or Laravel order record before the conversion happens, because HubSpot can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Statamic forms into HubSpot with the hubspotutk intact

Send Statamic form submissions to HubSpot's form submission API from a Laravel listener, including the hubspotutk cookie and page URL, or embed a HubSpot form. HubSpot's script sets hubspotutk even on statically cached pages, and the form POST reaches Laravel. Do not write through the contacts API, which drops the cookie and breaks original source. Test with caching on.

Most Statamic sites are lead generation, so the HubSpot join is the form, not an order. Statamic Forms store submissions in Statamic and do not post to HubSpot on their own. The common builds are a Laravel listener on Statamic's form submission event that calls HubSpot's form submission API, or an embedded HubSpot form in the template. The listener keeps your markup and validation, but it only preserves attribution if it sends the hubspotutk cookie and page URL with the submission.

Full static caching does not break this, which people get wrong in both directions. The landing page is served from disk with no PHP, so nothing server-side sees the first page view; but HubSpot's tracking script runs in the browser and sets the hubspotutk anyway, and the form POST reaches Laravel, where the listener can read that cookie from the request. Test it with full caching on, not in local development where caching is usually off.

The pair-specific failure is a listener that writes through the contacts API instead of the forms API. The contact appears, but without the cookie or page context, so HubSpot cannot tie it to earlier visits and the original source is wrong for every lead from the site.

Statamic → HubSpot · what breaks

Why this join usually fails — Statamic → HubSpot

  1. 01

    The contact identity — email, or the hubspotutk cookie never reaches Statamic

    Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run.

  2. 02

    Static caching bypassing PHP entirely

    Statamic's full static caching serves a file from disk. No PHP runs, so nothing dynamic happens — and this is invisible because the page looks perfect.

  3. 03

    Duplicate contacts

    Two records for one person, each with half the history. Every downstream report is then wrong in a way that looks like a data problem rather than an integration problem.

  4. 04

    Nothing reconciles afterwards

    HubSpot shows the contact record and its timeline. A successful API response means HubSpot accepted the call, not that it resolved to the right contact — open the record and look.

Statamic → HubSpot · the fix

What working looks like — Statamic → HubSpot

  • The contact identity — email, or the hubspotutk cookie on every order

  • Conversions arriving in HubSpot

    The revenue or conversion lands on the contact record and its associated deal, where sales can see it and where HubSpot's own attribution reporting can use it.

  • Reconciled against the source

Statamic → HubSpot · architecture

How Statamic and HubSpot actually connect

  1. 1

    Statamic holds the truth

    Because Statamic sits on Laravel, the commercial record is usually a database table your developers defined. That is the source of truth and it is fully under your control.

  2. 2

    HubSpot needs a click to match

    HubSpot needs to resolve the incoming data to an existing contact or create one. Without an email or a hubspotutk it creates duplicates, and duplicate contacts break every report built on top of them.

  3. 3

    The identifier is the bridge

    The contact identity — email, or the hubspotutk cookie, captured at the visit and carried into the Statamic or Laravel order record.

  4. 4

    The event source decides reliability

    Fire from the application event. Static caching means the template that rendered the page may never have executed anything.

  5. 5

    Deduplication at the destination

    HubSpot deduplicates contacts on email address. Events and property updates against the same contact are idempotent by design, but a second contact created for the same person is not detected, and merging them afterwards is manual work.

Statamic → HubSpot · normal or broken

Working vs. broken, side by side — Statamic → HubSpot

Normal, not a fault

  • The contact identity — email, or the hubspotutk cookie present on the order

  • Sent from your Laravel application's order event

  • Deduplicated correctly

    HubSpot deduplicates contacts on email address. Events and property updates against the same contact are idempotent by design, but a second contact created for the same person is not detected, and merging them afterwards is manual work.

  • Reconciles with the source

Actually broken

  • The contact identity — email, or the hubspotutk cookie missing on most records

    Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run.

  • Sent from the browser

    Statamic's full static caching serves a file from disk. No PHP runs, so nothing dynamic happens — and this is invisible because the page looks perfect.

  • Counted twice, or not at all

    Two records for one person, each with half the history. Every downstream report is then wrong in a way that looks like a data problem rather than an integration problem.

  • Nobody has reconciled it

Statamic → HubSpot · diagnose

Diagnostic order — Statamic → HubSpot

  1. 01

    Count orders carrying the contact identity — email, or the hubspotutk cookie

  2. 02

    Follow one real conversion end to end

  3. 03

    Check whether full static caching is enabled

    If it is, any per-request logic in a template is not running and never was.

  4. 04

    Search for the test contact by email after sending

    One record or two? Then check whether the properties landed on the contact or only on the form submission — they are different things and only the first is usable.

  5. 05

    Read the match rate, not the success message

    HubSpot shows the contact record and its timeline. A successful API response means HubSpot accepted the call, not that it resolved to the right contact — open the record and look.

Statamic → HubSpot · prove

How it gets proven — Statamic → HubSpot

Source of truth

Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.

  • The contact identity — email, or the hubspotutk cookie confirmed present on a live order.
  • One contact record confirmed, not two, with the property visible on the contact rather than only on the submission.
  • Order data confirmed persisted on a purchase made while full static caching was active.

Statamic → HubSpot · free audit

What we check in the free audit

  • Count orders carrying the contact identity — email, or the hubspotutk cookie
  • Follow one real conversion end to end
  • Check whether full static caching is enabled
  • Search for the test contact by email after sending
  • Read the match rate, not the success message

Checked against

Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.

Get my free conversion tracking audit

Free30 minutesNo obligation

Statamic → HubSpot · when not to buy

When you don't need this — Statamic → HubSpot

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the contact identity — email, or the hubspotutk cookie.
  • If commerce lives in a separate system entirely, work there — Statamic is the content layer.
  • HubSpot's native form and tracking code already handle the straightforward cases well. This is worth building when the conversion happens somewhere HubSpot's code cannot see.

Statamic → HubSpot · what we deliver

What gets built — Statamic → HubSpot

  • Identifier capture into Statamic

    Capture the identifier and persist it through a Laravel event listener into your own order table, entirely outside the static cache path.

  • Event source: your Laravel application's order event

    Fire from the application event. Static caching means the template that rendered the page may never have executed anything.

  • Dispatch to HubSpot

    The HubSpot API — contact create-or-update with the properties, or a custom behavioral event where you need the timeline entry rather than a property.

  • Reversals where they exist

    Whatever your application defines as a refund.

Written guarantee

95%+ tracking accuracy

Measured against Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Statamic → HubSpot questions, answered

Listen for Statamic's form submission event in Laravel and post to HubSpot's form submission API with the hubspotutk cookie and page URL. Check for a maintained Statamic addon first, or embed a HubSpot form if you can accept its markup.

Free · 30 min

Get Statamic and HubSpot joined properly

Free30 minutesNo obligation