Connecting Divi to GA4
Divi is a theme and builder combined, which means the site's structure and its forms are the same product — and a theme update can change both at once. 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 Divi form submission 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
Divi contact form leads in GA4, AJAX submit and all
Divi's contact module submits without a page load, so fire generate_lead from Google Tag Manager on success or enable the redirect. Add a field carrying the _ga client_id and session_id so they reach the CRM in the notification email, then send qualify_lead through Measurement Protocol with that client_id. Browser and server should own different events.
Divi's contact module submits without loading a new page, so there is no thank-you URL for GA4 to count unless you switch on the module's redirect option. Enhanced measurement's form interaction events may or may not catch a Divi AJAX submit, and they can also fire on attempts that failed validation. Check in DebugView with one real submission and one deliberately invalid one before relying on them.
For the qualified outcome, the module itself is the obstacle: it emails the submission rather than storing it (check your Divi version), so the client_id has to travel inside the email to whatever CRM receives it. Add a field that carries the _ga client_id and session_id, filled by a script loaded from a child theme or Divi's Integration tab, and confirm the values appear in the email. When the CRM marks the lead qualified, send qualify_lead through Measurement Protocol with that client_id.
Put the browser generate_lead in Google Tag Manager, not in the parent theme's footer.php, because a Divi update replaces those files and the event disappears with no error. GA4 does not deduplicate Measurement Protocol events against browser events, so let the browser own generate_lead and the server own qualify_lead.
Divi → GA4 · what breaks
Why this join usually fails — Divi → GA4
- 01
The GA4 client_id never reaches Divi
Custom code added to theme templates is vulnerable to updates, and Divi's contact module submits over AJAX.
- 02
Tracking removed by a theme update
Code placed directly into theme files disappears when the theme updates. The site keeps working, the forms keep submitting, and the conversions stop arriving with no error anywhere.
- 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.
- 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.
Divi → GA4 · the fix
What working looks like — Divi → 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
Divi → GA4 · architecture
How Divi and GA4 actually connect
- 1
Divi holds the truth
Because the builder is the theme, tracking added into templates can be lost or duplicated by a theme update in ways a plugin-based setup would not experience.
- 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
The identifier is the bridge
The GA4 client_id, captured at the visit and carried into the Divi form submission.
- 4
The event source decides reliability
Send qualified outcomes per form, with the identifier passed through a hidden field.
- 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.
Divi → GA4 · normal or broken
Working vs. broken, side by side — Divi → GA4
Normal, not a fault
The GA4 client_id present on the submission
Sent from your CRM 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
Custom code added to theme templates is vulnerable to updates, and Divi's contact module submits over AJAX.
Sent from the browser
Code placed directly into theme files disappears when the theme updates. The site keeps working, the forms keep submitting, and the conversions stop arriving with no error anywhere.
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
Divi → GA4 · diagnose
Diagnostic order — Divi → GA4
- 01
Count submissions carrying the GA4 client_id
- 02
Follow one real conversion end to end
- 03
Check whether tracking code sits in theme files or in a child theme
If it is in the parent theme, it is one update away from vanishing.
- 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.
- 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.
Divi → GA4 · prove
How it gets proven — Divi → GA4
Source of truth
Your CRM record, joined to 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 against imported conversions, with code placement verified update-safe.
Divi → GA4 · free audit
What we check in the free audit
- Count submissions carrying the GA4 client_id
- Follow one real conversion end to end
- Check whether tracking code sits in theme files or in a child theme
- Check whether server events carry a session and a source
- Read the match rate, not the success message
Checked against
Your CRM record, joined to the submission.
Free30 minutesNo obligation
Divi → GA4 · when not to buy
When you don't need this — Divi → GA4
- Measure identifier coverage yourself first — pull your last hundred submissions and count how many carry the GA4 client_id.
- Sites using a separate form plugin and a tag manager are insulated from the theme-update risk.
- 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.
Divi → GA4 · what we deliver
What gets built — Divi → GA4
Identifier capture into Divi
Use a child theme or the builder's supported code integration areas rather than editing templates directly, and bind to the AJAX submission.
Event source: your CRM record
Send qualified outcomes per form, with the identifier passed through a hidden field.
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 record, joined to the submission.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Divi → GA4 questions, answered
The Divi contact module submits over AJAX without a page change, so URL-based goals never fire. Either enable the module's redirect to a thank-you page or listen for the successful submit in Tag Manager.
Only if a field on the form carries it and the value reaches the CRM in the notification email or integration. Verify it on a real submission before building the Measurement Protocol step.
Almost always because the GA4 client_id never reached the Divi form submission. Custom code added to theme templates is vulnerable to updates, and Divi's contact module submits over AJAX. Measure coverage before debugging the dispatch.
The client_id, from the _ga cookie. Measurement Protocol events without it are rejected or create a brand-new user with no session and no source, which is how server events end up filed under (direct)/(none) and make paid channels look worse than they are. Send session_id alongside it so the event joins the existing session, and include engagement_time_msec or the event may not appear as expected in reports.
Your CRM record. Send qualified outcomes per form, with the identifier passed through a hidden field.
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.
More on Divi → GA4
- Stripe → GA4Connecting Stripe to GA4
- PayPal → GA4Connecting PayPal to GA4
- HubSpot → GA4Connecting HubSpot to GA4
RELATED GUIDES
Where Divi → GA4 fits in the rest of your tracking
- Elementor → GA4Connecting Elementor to GA4
- Bricks → GA4Connecting Bricks Builder to GA4
- Divi → MixpanelConnecting Divi to Mixpanel
- Divi → AmplitudeConnecting Divi to Amplitude
- Marketing agenciesOne tracking standard across your whole client portfolio
- Bricks → Adobe AnalyticsConnecting Bricks Builder to Adobe Analytics
- Bricks → AmplitudeConnecting Bricks Builder to Amplitude
- Bricks → MixpanelConnecting Bricks Builder to Mixpanel
