Skip to main content
Gravity Forms → AmplitudeIntegration guide

Connecting Gravity Forms to Amplitude

Gravity Forms stores the entry in your own WordPress database, which makes it one of the easier sources to join correctly. 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 Gravity Forms entry 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

Gravity Forms to Amplitude: write the device ID with JavaScript

Use a small script to write the Amplitude device ID, or user ID, into a hidden field, which works on cached pages. Send the event from gform_after_submission through Amplitude's HTTP API with that device_id, form and entry IDs as properties, and the entry ID as insert_id, dropping any browser track call. Exclude spam and avoid sensitive field values.

For Amplitude, the identifier to get into the entry isn't a click ID. It's the Amplitude device ID, or the user ID if the visitor is logged in. That actually helps with Gravity Forms' caching problem. Dynamic population runs in PHP and breaks on cached pages, but the device ID only exists in the browser anyway. A small script that reads it from the Amplitude SDK and writes it into a hidden field runs per visitor, whatever the cache served.

Then send the event from gform_after_submission through Amplitude's HTTP API, with the stored device_id, an event type such as form submitted, and the form ID and entry ID as properties. Use the entry ID as insert_id. If the AJAX submission and a browser track call both fire, the server event with a stable insert_id is the one to keep. Drop the browser call.

Be careful what goes into event properties. Gravity Forms entries often contain free-text fields, phone numbers and sometimes health or financial details. Send the form ID and a few routing fields, not the whole entry. And exclude anything Gravity Forms or your anti-spam add-on marked as spam before the send, or bots will show up as a cohort.

Gravity Forms → Amplitude · what breaks

Why this join usually fails — Gravity Forms → Amplitude

  1. 01

    The user ID and device ID pair never reaches Gravity Forms

    The identifier must be written into a hidden field with dynamic population enabled, and that only works if the parameter is on the URL when the page renders. Page caching serves a cached render to the visitor, so the dynamic population never runs — the same caching problem that breaks WooCommerce.

  2. 02

    Dynamic population fails silently under page caching

    The field is configured correctly and still arrives empty, because the visitor was served a cached page rendered for someone else. This is the most common Gravity Forms failure and it looks like nothing is wrong.

  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.

Gravity Forms → Amplitude · the fix

What working looks like — Gravity Forms → Amplitude

  • The user ID and device ID pair on every entry

  • 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

Gravity Forms → Amplitude · architecture

How Gravity Forms and Amplitude actually connect

  1. 1

    Gravity Forms holds the truth

    The entry lives in your database with every field value attached. You can query it, back it up and reconcile against it without depending on any third party, which is a real advantage over hosted form tools.

  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 Gravity Forms entry.

  4. 4

    The event source decides reliability

    Fire server-side from the PHP hook. This runs regardless of caching, AJAX submission, or what the confirmation page does.

  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.

Gravity Forms → Amplitude · normal or broken

Working vs. broken, side by side — Gravity Forms → Amplitude

Normal, not a fault

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

  • Sent from the gform_after_submission 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

    The identifier must be written into a hidden field with dynamic population enabled, and that only works if the parameter is on the URL when the page renders. Page caching serves a cached render to the visitor, so the dynamic population never runs — the same caching problem that breaks WooCommerce.

  • Sent from the browser

    The field is configured correctly and still arrives empty, because the visitor was served a cached page rendered for someone else. This is the most common Gravity Forms failure and it looks like nothing is wrong.

  • 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

Gravity Forms → Amplitude · diagnose

Diagnostic order — Gravity Forms → Amplitude

  1. 01

    Count entrys carrying the user ID and device ID pair

  2. 02

    Follow one real conversion end to end

  3. 03

    Submit a test entry through a cached page

    Not through a logged-in admin session, which bypasses the cache. If the hidden field is empty on the cached path and populated on the admin path, caching is your cause.

  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.

Gravity Forms → Amplitude · prove

How it gets proven — Gravity Forms → Amplitude

Source of truth

The Gravity Forms entries list for the same window, or the wp_gf_entry table directly.

  • The user ID and device ID pair confirmed present on a live entry.
  • Revenue reconciled per transaction against your billing system, with identity merge behaviour verified across signup.
  • Entry meta confirmed populated on a submission made from a fully cached page as an anonymous visitor.

Gravity Forms → Amplitude · free audit

What we check in the free audit

  • Count entrys carrying the user ID and device ID pair
  • Follow one real conversion end to end
  • Submit a test entry through a cached page
  • Check a purchase event for the price and quantity fields specifically
  • Read the match rate, not the success message

Checked against

The Gravity Forms entries list for the same window, or the wp_gf_entry table directly.

Get my free conversion tracking audit

Free30 minutesNo obligation

Gravity Forms → Amplitude · when not to buy

When you don't need this — Gravity Forms → Amplitude

  • Measure identifier coverage yourself first — pull your last hundred entrys and count how many carry the user ID and device ID pair.
  • If your site has no caching layer and one form, a developer can wire this in an afternoon. Worth trying before hiring anyone.
  • If nobody is building cohorts or retention analysis, this is a large amount of instrumentation for reporting a dashboard already gives you.

Gravity Forms → Amplitude · what we deliver

What gets built — Gravity Forms → Amplitude

  • Identifier capture into Gravity Forms

    Hidden field with 'allow field to be populated dynamically' enabled and a parameter name set, plus a cookie fallback via a gform filter so the identifier survives a visitor who browsed several pages before converting.

  • Event source: the gform_after_submission hook

    Fire server-side from the PHP hook. This runs regardless of caching, AJAX submission, or what the confirmation page does.

  • 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, though entries marked spam should be excluded from the send.

Written guarantee

95%+ tracking accuracy

Measured against The Gravity Forms entries list for the same window, or the wp_gf_entry table directly.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Gravity Forms → Amplitude questions, answered

Write the Amplitude device ID into a hidden field with JavaScript, then send an event from the gform_after_submission hook through the HTTP API using that device ID and the entry ID as insert_id.

Free · 30 min

Get Gravity Forms and Amplitude joined properly

Free30 minutesNo obligation