TagPilot is a free, open-source PrestaShop module that gives you a production-grade Google Tag Manager + Google Analytics 4 setup in minutes — including Enhanced Ecommerce, server-side Measurement Protocol, Consent Mode v2, and Enhanced Conversions.
Built for PrestaShop 8.0 – 9.x. Zero coding required for standard installations.
- One-click GTM auto-configuration — connect your Google account, pick a container, and TagPilot creates the full set of Data Layer variables, custom event triggers, and GA4 event tags for you via the Tag Manager API v2.
- Full GA4 Enhanced Ecommerce — 15 events out of the box:
page_view,view_item,view_item_list,select_item,add_to_cart,remove_from_cart,view_cart,begin_checkout,add_shipping_info,add_payment_info,purchase,refund,login,sign_up,search. - Server-side purchase tracking via GA4 Measurement Protocol — with strict Consent Mode enforcement (never sends without a real gtag session) and session stitching (real
client_id+session_idfrom browser cookies, no fabrication). - Enhanced Conversions — user data (email, phone in E.164, first / last name, postal code, country) attached to
purchasefor higher Google Ads match rate. Values are pushed raw; gtag hashes them client-side per Google's spec. - Consent Mode v2 ready — designed to interoperate with any CMP that emits
gtag('consent', 'default' | 'update', {...}). Works out of the box with the sister module ConsentFlow but does not require it. - DataLayer + Order logs — every event stored in the database with an inspector UI. Diagnose live traffic without touching Tag Assistant.
- Symfony admin, PSR-4 autoloading, PS 8 / 9 compatible — modern architecture, not a legacy
ModuleAdminControllerport.
- PrestaShop 8.0 – 9.x
- PHP 8.1+
- A GA4 property (Measurement ID
G-XXXXXXXXXX) — free, create one here - Optional (for auto-config): a Google Tag Manager container and a Google account with edit access to it
- Optional (for server-side purchase): a GA4 Measurement Protocol API secret — created in GA4 → Admin → Data streams → your stream → Measurement Protocol API secrets
- Download the latest release zip (or
git clonethis repo) - Rename the folder to
tagpilotif needed - Upload to
<your-shop>/modules/tagpilot/ - Run
composer install --no-devinsidemodules/tagpilot/(installs Google API client used by the auto-configurator) - In PrestaShop Back Office: Modules → Module Catalog → Upload a module (if uploading zip) OR just install from Modules → Module Manager if you copied files directly
- Open TagPilot in the admin sidebar
Not yet — the module currently lives here on GitHub only.
TagPilot ships with a 3-step wizard. Open the module in the admin and click GTM Setup:
- Connect — sign in with your Google account (OAuth 2.0,
tagmanager.edit.containers+analytics.readonlyscopes) - Choose — pick your GTM account + container, and paste your GA4 Measurement ID (+ optional Google Ads Conversion ID / Label if you also want an Ads tag)
- Activate — TagPilot creates in your GTM container:
- 16 Data Layer variables (
ecommerce.*,user_data.*,pageCategory,user_id, etc.) - 1 User-Provided Data variable (for Enhanced Conversions)
- 15 Custom Event triggers
- 1 Google Tag configuration
- 15 GA4 event tags (page_view, purchase, etc.)
- Optionally: Google Ads Conversion + Remarketing tags
- Publishes the container automatically
- 16 Data Layer variables (
No manual GTM work required. If you already have tags in your container, TagPilot creates its own alongside them — nothing gets overwritten.
Server-side Measurement Protocol acts as a fallback for adblock users — it fires from PHP directly to GA4, bypassing the browser. To enable:
- In your GA4 property: Admin → Data streams → your stream → Measurement Protocol API secrets → Create
- Copy the secret
- In TagPilot: Configuration → GA4 → paste the secret
- Save
TagPilot's server-side path is Consent-Mode-aware — it will only fire when the visitor's flavor_cookie_consent cookie (or your CMP's equivalent) confirms analytics = true AND real _ga / _ga_<STREAM> cookies exist. It never fabricates a client_id, never sends without a session_id. This guarantees your purchase events stitch to the visitor's real session and never pollute the "Unassigned" channel.
TagPilot follows Google's Advanced Consent Mode contract:
- The Google Tag configuration fires on All Pages with
consentStatus: notNeeded— meaning it initializes gtag regardless of consent, so cookieless pings can be sent for modeling. - Individual GA4 event tags inherit consent from the Google Tag config.
- TagPilot itself does NOT emit
gtag('consent', 'default', ...)— that's the CMP's job. Install a CMP (like ConsentFlow or any other) that emits the default state in<head>before GTM loads.
If you don't have a CMP: consent defaults to granted in gtag's fallback, which is not GDPR-compliant in the EU. Install a CMP.
- Facebook Pixel / Meta CAPI — separate concern, use a dedicated module
- TikTok / Pinterest / other ad networks — same
- Server-side GTM (sGTM) container hosting — TagPilot uses browser-side GTM + direct MP calls; sGTM is a separate infra decision
- Cookie banner / CMP UI — that's what ConsentFlow is for
- Bugs / feature requests — open an issue
- Questions — start a discussion
- Pull requests welcome — please describe what you're solving and reference an issue if there is one
TagPilot is completely free. If it saved you time or money, consider supporting further development:
Every coffee funds bug fixes, PS9 compatibility work, and new features.
Released under the Academic Free License 3.0 (AFL-3.0) — see LICENSE file.
You can use it commercially, modify it, redistribute it. Contributions must be under the same license.
Built by Marcin Gajewski for the PrestaShop community.