Connecting PrestaShop to GA4
PrestaShop is self-hosted open source with a large module ecosystem, which means the store's behaviour depends heavily on which modules are installed. 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 PrestaShop order 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
PrestaShop to GA4: purchase from the hook, client_id from the cart
Save GA4 client_id and session_id against the PrestaShop cart, because actionValidateOrder often runs in a payment provider's callback with no _ga cookie. Send purchase through Measurement Protocol with the order reference as transaction_id and items from order lines, ideally on the payment-accepted state change. Disable any module firing purchase from the confirmation page, and map credit slips to refunds.
On PrestaShop, the GA4 detail that breaks most server setups is where the order validation hook runs. With payment modules that confirm through a server callback from the payment provider, actionValidateOrder executes in that callback rather than in the shopper's request, so there is no _ga cookie to read. Save client_id and session_id against the cart while the shopper is on your site, and read them from the cart at validation.
Send purchase through Measurement Protocol with transaction_id set to the order reference, value and currency from the order, tax and shipping separated, and items from the order lines. Decide which order states count: bank-wire and cheque orders are validated in an awaiting-payment state and may never be paid, so either send on the payment-accepted state change (actionOrderStatusPostUpdate) or accept that GA4 counts unpaid orders.
The Google Analytics module many PrestaShop stores run, and plenty of third-party GA4 modules, fire purchase from the order confirmation page. Leave one of those active next to your server send and GA4 counts every order twice. Credit slips map to GA4 refund events with the same transaction_id. On multistore installs, send each shop to its own data stream or tag the shop ID, and recheck order metadata for client_id after every module update.
PrestaShop → GA4 · what breaks
Why this join usually fails — PrestaShop → GA4
- 01
The GA4 client_id never reaches PrestaShop
Module conflicts and caching both interfere with anything running in the page, and multi-store installations complicate which store an order belongs to.
- 02
Module ecosystem interference
PrestaShop stores accumulate modules, and any of them can alter checkout behaviour or strip what your code depends on. Failures appear after an unrelated update.
- 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.
PrestaShop → GA4 · the fix
What working looks like — PrestaShop → GA4
The GA4 client_id on every order
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
PrestaShop → GA4 · architecture
How PrestaShop and GA4 actually connect
- 1
PrestaShop holds the truth
You own the data and can query it directly. Pin down which order states count as revenue, since PrestaShop's state machine is more granular than most.
- 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 PrestaShop order.
- 4
The event source decides reliability
Fire server-side from the hook rather than the confirmation template.
- 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.
PrestaShop → GA4 · normal or broken
Working vs. broken, side by side — PrestaShop → GA4
Normal, not a fault
The GA4 client_id present on the order
Sent from the PrestaShop order validation hook
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
Module conflicts and caching both interfere with anything running in the page, and multi-store installations complicate which store an order belongs to.
Sent from the browser
PrestaShop stores accumulate modules, and any of them can alter checkout behaviour or strip what your code depends on. Failures appear after an unrelated update.
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
PrestaShop → GA4 · diagnose
Diagnostic order — PrestaShop → GA4
- 01
Count orders carrying the GA4 client_id
- 02
Follow one real conversion end to end
- 03
Check order metadata on ten recent orders
Partial coverage across orders points at a module conflict rather than a missing implementation.
- 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.
PrestaShop → GA4 · prove
How it gets proven — PrestaShop → GA4
Source of truth
PrestaShop's order records in your own database, for the same window and order state set.
- The GA4 client_id confirmed present on a live order.
- Server events confirmed in DebugView attaching to an existing session with the original traffic source intact.
- Order metadata confirmed present across ten consecutive orders rather than one.
PrestaShop → GA4 · free audit
What we check in the free audit
- Count orders carrying the GA4 client_id
- Follow one real conversion end to end
- Check order metadata on ten recent orders
- Check whether server events carry a session and a source
- Read the match rate, not the success message
Checked against
PrestaShop's order records in your own database, for the same window and order state set.
Free30 minutesNo obligation
PrestaShop → GA4 · when not to buy
When you don't need this — PrestaShop → GA4
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the GA4 client_id.
- If your PrestaShop install is heavily moduled and maintained by another party, scope their involvement before starting.
- 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.
PrestaShop → GA4 · what we deliver
What gets built — PrestaShop → GA4
Identifier capture into PrestaShop
Capture the identifier and write it to order metadata through a hook, server-side, so it does not depend on page execution.
Event source: the PrestaShop order validation hook
Fire server-side from the hook rather than the confirmation template.
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
Credit slips are recorded against the order.
Written guarantee
95%+ tracking accuracy
Measured against PrestaShop's order records in your own database, for the same window and order state set.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
PrestaShop → GA4 questions, answered
The validation hook ran inside a payment provider's callback, where the shopper's cookies are absent. Save client_id on the cart earlier and read it from there.
Payment accepted, if you take bank wire or cheque; otherwise validation is fine. Use the same rule for every destination.
Almost always because the GA4 client_id never reached the PrestaShop order. Module conflicts and caching both interfere with anything running in the page, and multi-store installations complicate which store an order belongs to. 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.
The PrestaShop order validation hook. Fire server-side from the hook rather than the confirmation template.
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 PrestaShop → GA4
- PrestaShop + GoogleGoogle Ads and GA4 tracking for PrestaShop
- Stripe → GA4Connecting Stripe to GA4
- PayPal → GA4Connecting PayPal to GA4
RELATED GUIDES
Where PrestaShop → GA4 fits in the rest of your tracking
- Squarespace → GA4Connecting Squarespace Commerce to GA4
- Checkout Extensibility → GA4Connecting Shopify Checkout Extensibility to GA4
- SureCart → GA4Connecting SureCart to GA4
- PrestaShop → Adobe AnalyticsConnecting PrestaShop to Adobe Analytics
- PrestaShop → PostHogConnecting PrestaShop to PostHog
- Jewelry ecommerceConversion tracking for jewelry ecommerce, measured in settled orders
- Wix → GA4Connecting Wix Stores to GA4
- Braintree → GA4Connecting Braintree to GA4
Free · 30 min
Get PrestaShop and GA4 joined properly
Free30 minutesNo obligation
