Skip to main content
WPForms → SegmentIntegration guide

Connecting WPForms to Segment

WPForms is the most widely installed form plugin on WordPress, which means the same plugin sits behind contact forms, order forms and payment forms on the same site with completely different values. Segment is a customer data platform rather than an ad network, so sending to it is not about matching a conversion — it is about putting one clean event where every other destination can read it. The join between them succeeds or fails on one thing: whether the userId and anonymousId reaches the WPForms entry before the conversion happens, because Segment can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

WPForms to Segment: read ajs_anonymous_id, send one event spec

Copy Segment's ajs_anonymous_id into a WPForms hidden field, then send a track call from the wpforms_process_complete hook with that anonymousId, the click IDs captured at landing, and form_id as a property under one event name such as Form Submitted. Include consent state so declined visitors are filtered from ad destinations, and build messageId from the entry ID.

Segment's analytics.js sets an anonymousId in the ajs_anonymous_id cookie, and that value is what lets a server-side WPForms event join the visitor's earlier page views. Copy it into a hidden field when the form loads, and in the wpforms_process_complete hook send a track call with that anonymousId, the form ID and name as properties, and the click IDs captured on landing.

Name the event once, such as Form Submitted, and keep form_id as a property, so every downstream destination gets one definition instead of a separate event per form. Call identify only when the submission creates a real customer or account record with an ID you control; an inquiry form alone is not a reason to promote email to userId.

Pass the consent state captured on the page with each event, because Segment will forward a submission to every connected ad destination unless you filter it, and a contact-form submission from a visitor who declined marketing cookies should not reach Meta or Google through the back door. Build messageId from the entry ID where entries are stored, so a retried hook does not duplicate it everywhere.

WPForms → Segment · what breaks

Why this join usually fails — WPForms → Segment

  1. 01

    The userId and anonymousId never reaches WPForms

    Forms submit over AJAX without a page navigation, so a conversion bound to a thank-you page URL never fires.

  2. 02

    Every form on the site counted as one conversion

    A newsletter signup and a request for a quote are not the same event. Pooling them means bidding optimises toward whichever is easiest to get, which is always the newsletter.

  3. 03

    One bad event multiplied across every destination

    Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.

  4. 04

    Nothing reconciles afterwards

    Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.

WPForms → Segment · the fix

What working looks like — WPForms → Segment

  • The userId and anonymousId on every submission

  • Conversions arriving in Segment

    Events land in Segment and forward to every connected destination, warehouse included, on one shared definition.

  • Reconciled against the source

WPForms → Segment · architecture

How WPForms and Segment actually connect

  1. 1

    WPForms holds the truth

    The form ID is the only thing separating a newsletter signup from a quote request from a paid order. Without it, every submission is one undifferentiated conversion.

  2. 2

    Segment needs a click to match

    Segment needs a consistent identity model — the same userId everywhere, an alias when an anonymous visitor becomes known, and event names that follow one spec. Feeding it inconsistent identities pushes the mess to every connected destination at once.

  3. 3

    The identifier is the bridge

    The userId and anonymousId, captured at the visit and carried into the WPForms entry.

  4. 4

    The event source decides reliability

    Send qualified outcomes per form ID, with separate conversion actions for meaningfully different forms.

  5. 5

    Deduplication at the destination

    Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.

WPForms → Segment · normal or broken

Working vs. broken, side by side — WPForms → Segment

Normal, not a fault

  • The userId and anonymousId present on the submission

  • Sent from your CRM or payment record

  • Deduplicated correctly

    Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.

  • Reconciles with the source

Actually broken

  • The userId and anonymousId missing on most records

    Forms submit over AJAX without a page navigation, so a conversion bound to a thank-you page URL never fires.

  • Sent from the browser

    A newsletter signup and a request for a quote are not the same event. Pooling them means bidding optimises toward whichever is easiest to get, which is always the newsletter.

  • Counted twice, or not at all

    Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.

  • Nobody has reconciled it

WPForms → Segment · diagnose

Diagnostic order — WPForms → Segment

  1. 01

    Count submissions carrying the userId and anonymousId

  2. 02

    Follow one real conversion end to end

  3. 03

    List every form on the site and its real value

    Usually the first time anyone has, and it is normally the whole fix.

  4. 04

    Check identity resolution before checking anything downstream

    If anonymousId is never aliased to userId, every destination sees two people where there is one, and no downstream fix helps.

  5. 05

    Read the match rate, not the success message

    Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.

WPForms → Segment · prove

How it gets proven — WPForms → Segment

Source of truth

Your CRM or payment record, with the form ID recorded on the submission.

  • The userId and anonymousId confirmed present on a live submission.
  • An anonymous session confirmed aliased to a known user, with the event visible in at least one downstream destination.
  • Qualified outcomes reconciled per form ID against imported conversions.

WPForms → Segment · free audit

What we check in the free audit

  • Count submissions carrying the userId and anonymousId
  • Follow one real conversion end to end
  • List every form on the site and its real value
  • Check identity resolution before checking anything downstream
  • Read the match rate, not the success message

Checked against

Your CRM or payment record, with the form ID recorded on the submission.

Get my free conversion tracking audit

Free30 minutesNo obligation

WPForms → Segment · when not to buy

When you don't need this — WPForms → Segment

  • Measure identifier coverage yourself first — pull your last hundred submissions and count how many carry the userId and anonymousId.
  • A site with one form needs one conversion action and nothing else.
  • If you send to one or two destinations, Segment is infrastructure you do not need — direct integrations are simpler and cheaper. It earns its place at genuine fan-out.

WPForms → Segment · what we deliver

What gets built — WPForms → Segment

  • Identifier capture into WPForms

    Bind to the plugin's own submission event rather than to a page load, and pass the identifier through a hidden field.

  • Event source: your CRM or payment record

    Send qualified outcomes per form ID, with separate conversion actions for meaningfully different forms.

  • Dispatch to Segment

    Server-side track and identify calls with a stable messageId, consistent userId, and the click identifier carried as a trait or property.

  • Reversals where they exist

    Disqualified submissions reverse.

Written guarantee

95%+ tracking accuracy

Measured against Your CRM or payment record, with the form ID recorded on the submission.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

WPForms → Segment questions, answered

Send a server-side track call from the wpforms_process_complete hook, using the ajs_anonymous_id cookie value captured in a hidden field so it joins the visitor's browser history.

Free · 30 min

Get WPForms and Segment joined properly

Free30 minutesNo obligation