- Is the module compatible with my theme?
- Another module already sends GA4: what should I do?
- Why doesn't a purchase appear in GA4?
- How can I get support?
- Do I need a valid license to use the module?
- How do I exclude robots and automated browsers?
- How are contact requests without a reload counted?
- Is the purchase amount correct with a free-shipping voucher?
Google Analytics 4 (GA4) & GTM for PrestaShop
This guide explains how to measure your PrestaShop store in Google Analytics 4, Google Tag Manager and Google Ads with the Google Tracking module: what is measured, how to set it up in a few minutes, how to respect your visitors' consent and how to check the result before opening your reports.
See the Google Analytics 4, GTM and Search Console module
What the module measures
The module sends the e-commerce events recommended by Google for GA4, with the same product data from the beginning to the end of the journey:
- Browsing: product lists viewed (categories, search, brands, new products, best sellers, price drops, including after a filter), product clicked in a list, product page with the selected combination, internal search.
- Cart: every quantity added from the product page, a list, the quick view or the cart; line deleted or quantity decreased; cart viewed.
- Checkout: checkout started, delivery method confirmed with the carrier name, payment method selected, purchase with the order currency, tax, shipping and coupon.
- Account and contact: login, account creation (guest accounts created during checkout are not counted), request sent with the contact form.
Page views are those of the Google tag in GA4 direct mode. Each event can be disabled in the Events tab.
When a voucher offers shipping, the product value sent excludes the offered shipping and the shipping fees match what is actually paid: the amounts stay correct in GA4, the DataLayer and Google Ads, even when the voucher combines a discount and free shipping.
Choosing the integration mode
- Google Analytics 4 direct (recommended): the module loads the Google tag and sends every event to GA4, and to Google Ads if configured. The simplest choice.
- Google Tag Manager: the module loads your container and fills the DataLayer. GA4 and Google Ads tags are configured in Tag Manager; the Diagnostics tab offers a container ready to import.
- Google Ads only: the module loads the Google tag for Google Ads only: conversions and remarketing, without Google Analytics.
Installation and first setup
- Download the module archive from your customer account.
- In the back office, open Modules > Module Manager, click Upload a module and select the archive.
- Open the module configuration and activate your license with the license key: without a valid license, the module stays disabled.
- Choose the integration mode.
- Paste your GA4 measurement ID (format G-XXXXXXXXXX, in Google Analytics > Admin > Data streams) or your container ID (GTM-XXXXXXX).
- For Search Console, paste the HTML verification tag or only its
contentvalue: the code is extracted automatically. - Save. The status bar shows Active and the selected mode.
Nothing is added to your pages as long as the identifier of the selected mode is empty.
Events and product data
In the Events tab, enable or disable each event and set the product data: the identifier sent (product ID, combination ID or reference), prices with or without tax, the purchase value (total paid, taxes and shipping included, or products excluding tax after discounts, without shipping) and the number of products sent per list. Choose the identifier used by your Merchant Center feed if you use dynamic remarketing.
Google Ads: conversions, enhanced conversions and remarketing
- Enter your Google Ads ID (AW-โฆ) and the label of the Purchase conversion: it is sent on order confirmation with the amount, currency and order reference, once per order. You can also paste the full โAW-โฆ/labelโ tag.
- The Contact conversion label and its estimated value measure contact requests.
- Enhanced conversions add the customer's email and phone, hashed with SHA-256, to the purchase conversion, only if the visitor granted
ad_user_data. Mention it in your privacy policy. - Dynamic remarketing adds the product identifiers expected by Google Ads to the events.
Consent Mode v2 and consent banner
In the Consent tab, choose who manages Consent Mode. With this module, you set the default values of analytics_storage, ad_storage, ad_user_data and ad_personalization, for all visitors or only in the EEA, the United Kingdom and Switzerland, as well as the banner wait time, advertising data redaction and passing click identifiers in URLs.
Automatic connectors update consent from Cookiebot, Axeptio, OneTrust (C0002 and C0004 categories), CookieYes and tarteaucitron, including when the visitor withdraws consent.
For another banner, for example a PrestaShop cookie module, enter the name of the cookie that stores the choices and the expressions that mean consent for measurement and advertising.
If your tool already sends Consent Mode (Cookiebot, Didomi, OneTrust, Usercentrics, iubenda, Axeptio or tarteaucitron configured for it), choose My consent tool sends Google Consent Mode itself: the module then sends no default values.
Custom integration: call wpGtUpdateConsent({analytics_storage: 'granted'}) from your banner or dispatch the wpgt:consent event with the same values.
Excluding internal traffic and linking your domains
- The browser you open the back office with is automatically excluded from tracking: your test visits and orders do not distort your reports. The Exclude this browser link also excludes another browser, for example a phone.
- Exclude IP addresses or address ranges (for example
203.0.113.0/24), IPv4 or IPv6; your current address is displayed. - Cross-domain keeps the visitor's session across several domains in GA4 direct mode.
- Contact forms submitted without a page reload are detected with CSS selectors you can adjust. A request is counted only when its success message is actually shown, whether it is added to the page or revealed by a class or style change; a message present but hidden is not counted.
Exclude robots and automated browsers
The Exclude robots and automated browsers option, off by default, keeps out headless browsers, performance tests (Lighthouse, PageSpeed Insights, GTmetrix, WebPageTest), monitoring services (Pingdom, UptimeRobot, StatusCakeโฆ) and search engine robots that run JavaScript. They then load no Google tag and send no event. Each visitor's browser decides: pages served from a cache stay the same for everyone, and the Search Console verification tag stays on every page.
Checking tracking without a test account
From the Exclusions and verification tab, enable verification mode for your browser. For 24 hours, a panel is displayed in the store and lists each computed event with its data, without sending anything to Google. The Remove the mark from this browser link disables it. If you test with an automated browser, the panel states that this browser is treated as a robot and still lists what would be sent.
The Diagnostics tab checks identifiers, consent, the presence of another tracking module that would count twice and the theme hooks used by the module, and lists the latest orders sent.
In Tag Manager mode, download the container to import: it contains the Google tag, the GA4 event tags, the DataLayer variables and, if labels are set, the Google Ads conversions. In Tag Manager, open Admin > Import container, merge it into your workspace, check the measurement ID, preview and publish.
You can then confirm reception with GA4 DebugView or Tag Assistant.
License and reactivation
The module works with a valid license. Without one โ expired, suspended, revoked, not recognized for this domain or missing โ it disables itself on the shop: no Google tag or Tag Manager, no event, consent update or conversion, and the Search Console verification tag is no longer added. Google may then report the Search Console property as unverified at its next check. Your settings, the list of tracked orders and the cookie secret are kept; nothing is deleted. The configuration page enables the module again as soon as the license is valid.
That page shows the license status: plan, domain, end date and days remaining. The Deactivate button releases the domain after confirmation; the module disables itself and the license form lets you activate another one.
A renewed subscription is checked with the license server. After the stored end date, the module waits seven days without any request, then asks the server at most once an hour; a valid answer stores the new date, while an explicit refusal (expired, suspended, revoked or unrecognized license) disables the module. A transient answer โ server error, rate limit, clock skew, unreachable server โ never disables a paid license: seven days of tolerance apply from the first failure.
Good to know: after a renewal you have nothing to do, the module stays active. Visits and orders received while the module was disabled are not caught up: tracking resumes when it is enabled again.
Upgrading from version 1.x
- From version 2.0.1: if your module was switched off while your subscription was valid, open its configuration page once: it enables the module again and shows the license status. Your settings and tracked orders are kept.
- Your settings are kept. If you had entered a Google Tag Manager container, Tag Manager mode stays active: check that your GA4 tags use the module's events or import the container offered in the Diagnostics tab.
- Purchases use the same product identifier as the other events (product ID by default). If your reports or your Merchant Center feed rely on the reference, choose Reference in the Events tab, Product data section.
Requirements
- PrestaShop 1.7.8, 8.0+ and 9.0+.
- PHP 7.4 or later.
- A theme that keeps the standard PrestaShop hooks (the diagnostics check them).
- A Google Analytics 4, Google Tag Manager or Google Ads account depending on the selected mode.
- A valid license to enable the module; without one, it disables itself and keeps your settings and tracked orders.
FAQ
Is the module compatible with my theme?
The module uses the standard PrestaShop hooks, without overrides. It works with themes that keep them, including the default PrestaShop themes. The Diagnostics tab reports a hook missing from the theme.
Another module already sends GA4: what should I do?
Disable the other tracking module or its Google tags: otherwise each visit or purchase may be counted twice. The diagnostics report active Google tracking modules.
Why doesn't a purchase appear in GA4?
The purchase is sent when the order confirmation page is displayed, within 24 hours of the order, and only once. Also check the visitor's consent and Google Analytics processing time.
How can I get support?
Contact us from your customer account. Include your PrestaShop and PHP versions, your theme, your consent tool and a screenshot of the Diagnostics tab.
Do I need a valid license to use the module?
Yes. Without a valid license, the module disables itself: no Google tag, event or conversion, and the Search Console tag is no longer added. Your settings and tracked orders are kept, and the configuration page enables it again once the license is valid. That page shows the plan, end date, days remaining and a Deactivate button; a renewal is checked with the license server, with seven days of tolerance for a transient answer.
How do I exclude robots and automated browsers?
In the Exclusions and verification tab, enable Exclude robots and automated browsers. The option is off by default and recognizes headless browsers, performance tests, monitoring services and search engine robots that run JavaScript. Each visitor's browser decides: cached pages stay the same for everyone and the Search Console verification tag stays in place.
How are contact requests without a reload counted?
The module watches the forms you list through your CSS selectors. A request is counted when the success message is actually shown, whether it is added to the page or revealed by a class or style change; a message present but hidden is not counted. PrestaShop's native contact form keeps its server-side detection.
Is the purchase amount correct with a free-shipping voucher?
Yes. The product value sent excludes the offered shipping and the shipping fees match the amount actually paid, in GA4, the DataLayer and Google Ads. A voucher that combines a discount and free shipping keeps its discount.
Support
Contact us from your WePresta customer account.
See the Google Analytics 4, GTM and Search Console module
Changelog
Version 2.1.0
New features
- Exclude robots and automated browsers with an option that is off by default, without changing the pages served from a cache.
- See your license status โ plan, domain, end date and days remaining โ directly on the configuration page.
- Deactivate your license from that page to release the domain, without losing your settings or tracked orders.
Improvements
- A renewed subscription is checked again with the license server after the end date, before the module can be disabled.
- A transient license-server answer no longer disables a paid license: seven days of tolerance apply from the first failure.
- The module is compatible with PrestaShop 1.7.8, 8.0+ and 9.0+.
Fixes
- A purchase with a free-shipping voucher sends the right product value and shipping fees to GA4, the DataLayer and Google Ads.
- A contact request whose success message appears through a class or style change is counted; a message present but hidden no longer is.
- An installation that fails is fully undone, with a clear message.
- On a PHP server older than 7.4, the module shows an explicit message instead of an error.
After the update
- If your 2.0.1 module was switched off while your subscription was valid, open its configuration page once: it enables the module again and shows the license status.
Version 2.0.1
Fixes
- Activate your license from the module configuration page on PrestaShop 9: the form no longer shows โInvalid form tokenโ.
Version 2.0.0
New features
- Choose your integration mode: Google Analytics 4 direct, Google Tag Manager or Google Ads only.
- Measure your sales in Google Ads with a purchase conversion sent once per order.
- Optionally enable Google Ads enhanced conversions and dynamic remarketing.
- Check your installation without sending data thanks to verification mode, directly in your store.
- Check your configuration in the Diagnostics tab: identifiers, consent, duplicate modules, theme and latest tracked orders.
- Import into Google Tag Manager a ready-to-use container for all the module's events.
- Connect Consent Mode to Cookiebot, Axeptio, OneTrust, CookieYes, tarteaucitron or any banner that stores choices in a cookie.
- Choose the product identifier sent (product ID, combination ID or reference), prices with or without tax, and the purchase value.
- Install the module on PrestaShop 1.7.8 to 9.
Improvements
- E-commerce events are sent to Google Analytics 4 even without Google Tag Manager.
- Product lists and product clicks are measured on every catalog page, including after a filter.
- Quantities added, changed or removed from the cart are measured with their exact value.
- Each product keeps the same identifier, name, brand, category and price type as on the product page until the purchase.
- Checkout start is counted once, even when the steps reload the page.
- Delivery method confirmation is measured with the carrier name.
- The visitor's consent withdrawal is passed to Google.
- Your test visits and orders from the back-office browser are no longer counted.
- IP address exclusions accept address ranges.
- Only employees allowed to edit the module can change the tracking identifiers.
- The module archive is much lighter and no longer contains development tools.
Fixes
- A purchase is no longer counted twice when the confirmation page is reloaded.
- Purchases are sent in the order currency.
- Requests sent with the PrestaShop contact form are detected.
- Guest accounts created during checkout are no longer counted as sign-ups.
- Removing a product from the cart is no longer counted as an addition.
- Google Ads only mode now adds the Google tag to your pages.
After the update
- Your settings are kept. If you had entered a Google Tag Manager container, Tag Manager mode stays active: check that your GA4 tags use the module's events, or import the container offered in the Diagnostics tab.
- Purchases now use the same identifier as the other events (product ID by default). If your reports or your Merchant Center feed rely on the reference, choose โReferenceโ in the Events tab, Product data section.
Version 1.1.0
- Lead tracking: contact form submissions are tracked as GA4
generate_leadevents. - Google Ads conversion tracking: contact form submissions can be tracked as lead conversions in Google Ads, with three new fields: Google Ads ID, conversion label and lead value.
- Contact forms submitted without a page reload are supported.
- 15 GA4 events tracked (up from 14).
- Compatible with Consent Mode v2 (Axeptio, Cookiebot, etc.).
Version 1.0.0
- Initial release
- 14 complete GA4 e-commerce events
- GTM and/or standalone GA4 support
- Google Consent Mode v2 integration
- Automatic Axeptio and Cookiebot detection
- Google Search Console verification
- Configurable cross-domain tracking
- Employee and IP exclusions
- Multi-store support
- Compatible with PrestaShop 8.x and 9.x