Skip to main content
WPForms → GA4Integration guide

Connecting WPForms to GA4

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. GA4 is where the business goes to understand what happened, which makes an unattributed conversion there expensive in decisions rather than in ad spend. The join between them succeeds or fails on one thing: whether the GA4 client_id reaches the WPForms entry before the conversion happens, because GA4 can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

WPForms in GA4: one key event per form ID, not form_submit

Bind a dataLayer push to WPForms' wpformsAjaxSubmitSuccess event and send GA4 generate_lead with form_id, unmarking enhanced measurement's form_submit as a key event. Store the GA4 client_id in a hidden field so qualified leads can be sent later as qualify_lead through Measurement Protocol. Payment forms send purchase with the payment ID as transaction_id.

When AJAX submission is enabled on a WPForms form (a per-form setting), the plugin triggers a wpformsAjaxSubmitSuccess event in the browser after a successful submission. Bind a dataLayer push to that event with the form ID and form name, and send generate_lead with form_id as a parameter, so a newsletter form, a quote form and a payment form can be separated in GA4 instead of collapsing into one count.

The trap specific to WPForms and GA4 is enhanced measurement's form_submit event. It fires on the browser's submit event, before WPForms has validated and stored the entry, and it knows nothing about the WPForms form ID. If someone marked form_submit as a key event, GA4 is counting failed attempts and treating every form as one. Unmark it and use the WPForms-bound event instead.

For outcomes that happen later, put the GA4 client_id in a WPForms hidden field; WPForms smart tags can fill hidden fields, but reading the _ga cookie needs a small script. The client_id is then stored on the entry and passed to your CRM. When a lead qualifies, send qualify_lead through Measurement Protocol with that client_id and the form ID. For WPForms payment forms, send purchase with the payment's ID as transaction_id, and make sure a browser-side purchase is not also firing.

WPForms → GA4 · what breaks

Why this join usually fails — WPForms → GA4

  1. 01

    The GA4 client_id 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

    Everything lands under (direct)/(none)

    The classic Measurement Protocol symptom, and it always means the same thing: the client_id was missing or wrong, so GA4 had no session to attach the event to and invented a new user.

  4. 04

    Nothing reconciles afterwards

    GA4 DebugView shows events arriving with their parameters, and Realtime confirms the user and session they attached to. Neither tells you whether you are double-counting — for that, compare GA4's conversion count against the source system's record for the same window.

WPForms → GA4 · the fix

What working looks like — WPForms → GA4

  • The GA4 client_id on every submission

  • Conversions arriving in GA4

    Conversions appear in GA4 attributed to the original session's source and medium, so acquisition reporting reflects what actually drove revenue.

  • Reconciled against the source

WPForms → GA4 · architecture

How WPForms and GA4 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

    GA4 needs a click to match

    GA4 needs the client_id to attach a server event to the user and session that produced the click. Without it there is no attribution to inherit and the event is orphaned.

  3. 3

    The identifier is the bridge

    The GA4 client_id, 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

    GA4 has no built-in deduplication for Measurement Protocol. If the browser also sends the event, it counts twice. The only reliable approach is to decide per event which side sends it, and enforce that decision — GA4 will not protect you from your own duplicates.

WPForms → GA4 · normal or broken

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

Normal, not a fault

  • The GA4 client_id present on the submission

  • Sent from your CRM or payment record

  • Deduplicated correctly

    GA4 has no built-in deduplication for Measurement Protocol. If the browser also sends the event, it counts twice. The only reliable approach is to decide per event which side sends it, and enforce that decision — GA4 will not protect you from your own duplicates.

  • Reconciles with the source

Actually broken

  • The GA4 client_id 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

    The classic Measurement Protocol symptom, and it always means the same thing: the client_id was missing or wrong, so GA4 had no session to attach the event to and invented a new user.

  • Nobody has reconciled it

WPForms → GA4 · diagnose

Diagnostic order — WPForms → GA4

  1. 01

    Count submissions carrying the GA4 client_id

  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 whether server events carry a session and a source

    In GA4 Realtime or DebugView, find the event and look at its session and traffic source. A brand-new user with no source on every server event is the missing-client_id signature.

  5. 05

    Read the match rate, not the success message

    GA4 DebugView shows events arriving with their parameters, and Realtime confirms the user and session they attached to. Neither tells you whether you are double-counting — for that, compare GA4's conversion count against the source system's record for the same window.

WPForms → GA4 · prove

How it gets proven — WPForms → GA4

Source of truth

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

  • The GA4 client_id confirmed present on a live submission.
  • Server events confirmed in DebugView attaching to an existing session with the original traffic source intact.
  • Qualified outcomes reconciled per form ID against imported conversions.

WPForms → GA4 · free audit

What we check in the free audit

  • Count submissions carrying the GA4 client_id
  • Follow one real conversion end to end
  • List every form on the site and its real value
  • Check whether server events carry a session and a source
  • 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 → GA4 · when not to buy

When you don't need this — WPForms → GA4

  • Measure identifier coverage yourself first — pull your last hundred submissions and count how many carry the GA4 client_id.
  • A site with one form needs one conversion action and nothing else.
  • GA4 is reporting, not bidding. If your problem is ad platform optimization, fix the ad platform destination first — GA4 will not change what any campaign does.

WPForms → GA4 · what we deliver

What gets built — WPForms → GA4

  • 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 GA4

    Measurement Protocol events with the client_id, session_id and the correct measurement ID and API secret, sent server-side.

  • 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 → GA4 questions, answered

Listen for WPForms' wpformsAjaxSubmitSuccess event and push a generate_lead event with the form ID to the dataLayer. If a form does not use AJAX submission, track its confirmation page or redirect instead.

Free · 30 min

Get WPForms and GA4 joined properly

Free30 minutesNo obligation