Skip to main content
Contact Form 7 → AmplitudeIntegration guide

Connecting Contact Form 7 to Amplitude

Contact Form 7 is free, everywhere, and stores nothing by default — which is the whole problem. Amplitude is built around behavioural cohorts, which makes the identity resolution and the event taxonomy load-bearing in a way they never are for an ad pixel. The join between them succeeds or fails on one thing: whether the user ID and device ID pair reaches the Contact Form 7 submission before the conversion happens, because Amplitude can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Contact Form 7 to Amplitude: keep the device ID with the lead

Wire Contact Form 7 to Amplitude only when the form sits in a product journey. Send one Form Submitted event with the form ID from the wpcf7_mail_sent hook, carrying the SDK's device ID written into a hidden field, and the stored entry ID as insert_id. Keep message text, phone and email out of event properties.

Amplitude is only worth wiring to Contact Form 7 if the form sits inside a product journey you analyze: a demo request on a SaaS marketing site, a waitlist, a beta signup. The useful event is a single "Form Submitted" with the form ID as a property, fired from the wpcf7_mail_sent hook so a blocked script cannot drop it.

The catch is identity. Amplitude's browser SDK has already assigned this visitor a device ID, and a server-side event from PHP knows nothing about it unless you put it there. Read the device ID from the SDK on page load, write it into a hidden field, and send it back with the server event. Skip that step and the submission lands on a brand-new anonymous user with no pageviews, which makes every pre-form funnel step look like a dead end. If the visitor later signs up, the user ID you set then is what merges the two.

Use the submission's stored entry ID as insert_id, because Contact Form 7 resubmits on AJAX retries and spam re-sends. Do not put the message body, phone number or email into event properties; Amplitude is a product tool and does not need free text someone typed into a contact box.

Contact Form 7 → Amplitude · what breaks

Why this join usually fails — Contact Form 7 → Amplitude

  1. 01

    The user ID and device ID pair never reaches Contact Form 7

    There is no entries table to write to, so the identifier has to be captured into a hidden field and persisted by whatever you add for storage. Contact Form 7 submits over AJAX, so the page does not reload and anything expecting a navigation event never fires.

  2. 02

    AJAX submission means no page load to hook

    Setups that fire a conversion on thank-you-page load simply never fire. Setups that listen for the DOM event miss anyone whose script execution was blocked or deferred.

  3. 03

    Revenue events that carry no revenue

    Amplitude will happily accept a purchase event with no price field. The event count looks correct, the funnel looks correct, and the revenue reporting stays at zero — which people usually discover a quarter later when someone asks what a cohort is worth.

  4. 04

    Nothing reconciles afterwards

    Amplitude shows the event in the user's activity stream with its properties expanded. Read the properties, because an event that arrives without its revenue fields still looks like a success.

Contact Form 7 → Amplitude · the fix

What working looks like — Contact Form 7 → Amplitude

  • The user ID and device ID pair on every submission

  • Conversions arriving in Amplitude

    The event lands on the user, joins their behavioural history, and becomes available for cohorts, funnels and retention.

  • Reconciled against the source

Contact Form 7 → Amplitude · architecture

How Contact Form 7 and Amplitude actually connect

  1. 1

    Contact Form 7 holds the truth

    Out of the box Contact Form 7 emails the submission and keeps no record. Before any attribution work is meaningful, submissions have to be stored somewhere queryable. That is step one and it is not optional.

  2. 2

    Amplitude needs a click to match

    Amplitude needs a device or user identifier, an event type and its properties. Revenue events need the price and quantity fields specifically, or the revenue reporting stays empty while events flow normally.

  3. 3

    The identifier is the bridge

    The user ID and device ID pair, captured at the visit and carried into the Contact Form 7 submission.

  4. 4

    The event source decides reliability

    Fire server-side from PHP. The browser-side wpcf7mailsent DOM event exists and is commonly used, but it depends on the visitor's browser executing correctly and on the AJAX response arriving — the server hook does not.

  5. 5

    Deduplication at the destination

    Amplitude deduplicates on insert_id. Omit it and a retried batch is counted twice, which shows up as a phantom spike that someone will eventually build a hypothesis on.

Contact Form 7 → Amplitude · normal or broken

Working vs. broken, side by side — Contact Form 7 → Amplitude

Normal, not a fault

  • The user ID and device ID pair present on the submission

  • Sent from the wpcf7_mail_sent hook

  • Deduplicated correctly

    Amplitude deduplicates on insert_id. Omit it and a retried batch is counted twice, which shows up as a phantom spike that someone will eventually build a hypothesis on.

  • Reconciles with the source

Actually broken

  • The user ID and device ID pair missing on most records

    There is no entries table to write to, so the identifier has to be captured into a hidden field and persisted by whatever you add for storage. Contact Form 7 submits over AJAX, so the page does not reload and anything expecting a navigation event never fires.

  • Sent from the browser

    Setups that fire a conversion on thank-you-page load simply never fire. Setups that listen for the DOM event miss anyone whose script execution was blocked or deferred.

  • Counted twice, or not at all

    Amplitude will happily accept a purchase event with no price field. The event count looks correct, the funnel looks correct, and the revenue reporting stays at zero — which people usually discover a quarter later when someone asks what a cohort is worth.

  • Nobody has reconciled it

Contact Form 7 → Amplitude · diagnose

Diagnostic order — Contact Form 7 → Amplitude

  1. 01

    Count submissions carrying the user ID and device ID pair

  2. 02

    Follow one real conversion end to end

  3. 03

    Confirm submissions are being stored at all

    If the only record is an email inbox, there is nothing to reconcile and no way to prove any number. Fix storage before touching attribution.

  4. 04

    Check a purchase event for the price and quantity fields specifically

    Not whether the event arrived — whether the revenue fields are populated, in the exact names Amplitude expects.

  5. 05

    Read the match rate, not the success message

    Amplitude shows the event in the user's activity stream with its properties expanded. Read the properties, because an event that arrives without its revenue fields still looks like a success.

Contact Form 7 → Amplitude · prove

How it gets proven — Contact Form 7 → Amplitude

Source of truth

Whatever you configure to persist submissions — an entries plugin, or your own database table. By default there is nothing to reconcile against.

  • The user ID and device ID pair confirmed present on a live submission.
  • Revenue reconciled per transaction against your billing system, with identity merge behaviour verified across signup.
  • Stored submissions confirmed to match the email record for the same period, before any attribution claim is made.

Contact Form 7 → Amplitude · free audit

What we check in the free audit

  • Count submissions carrying the user ID and device ID pair
  • Follow one real conversion end to end
  • Confirm submissions are being stored at all
  • Check a purchase event for the price and quantity fields specifically
  • Read the match rate, not the success message

Checked against

Whatever you configure to persist submissions — an entries plugin, or your own database table. By default there is nothing to reconcile against.

Get my free conversion tracking audit

Free30 minutesNo obligation

Contact Form 7 → Amplitude · when not to buy

When you don't need this — Contact Form 7 → Amplitude

  • Measure identifier coverage yourself first — pull your last hundred submissions and count how many carry the user ID and device ID pair.
  • If you are on Contact Form 7 and serious about attribution, moving to a form plugin that stores entries is often cheaper than working around the one that does not. We will say so rather than bill for the workaround.
  • If nobody is building cohorts or retention analysis, this is a large amount of instrumentation for reporting a dashboard already gives you.

Contact Form 7 → Amplitude · what we deliver

What gets built — Contact Form 7 → Amplitude

  • Identifier capture into Contact Form 7

    Hidden field populated from a first-party cookie, plus a storage layer so the submission and its identifier survive past the email. The wpcf7_before_send_mail hook is where both happen.

  • Event source: the wpcf7_mail_sent hook

    Fire server-side from PHP. The browser-side wpcf7mailsent DOM event exists and is commonly used, but it depends on the visitor's browser executing correctly and on the AJAX response arriving — the server hook does not.

  • Dispatch to Amplitude

    The Amplitude HTTP V2 API, posted server-side with the identity, event type and properties.

  • Reversals where they exist

    Nothing to reverse. Spam filtering before the send is the equivalent concern.

Written guarantee

95%+ tracking accuracy

Measured against Whatever you configure to persist submissions — an entries plugin, or your own database table. By default there is nothing to reconcile against.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Contact Form 7 → Amplitude questions, answered

Fire an event server-side from the wpcf7_mail_sent hook with the Amplitude device ID you copied into a hidden field on the form. Without that device ID the submission becomes a new, disconnected user in Amplitude.

Free · 30 min

Get Contact Form 7 and Amplitude joined properly

Free30 minutesNo obligation