10 min

Google Tag Manager PrestaShop: complete installation and configuration guide

Learn how to install Google Tag Manager on PrestaShop, set up advanced e-commerce tracking with GA4 and Meta Pixel, and understand why a server-side solution like Fullmetrix effectively complements this approach.

Google Tag Manager PrestaShop: complete installation and configuration guide

Why Google Tag Manager is essential for PrestaShop

Managing tracking scripts on a PrestaShop store without a centralized tool quickly leads to errors and performance issues. Every pixel, every Google Ads conversion tag, every analytics script must be manually added to the source code, updated with each version change, and coordinated between developers and marketing teams. Google Tag Manager (GTM) solves this problem by becoming the single control point for all your tags.

For a PrestaShop merchant, the stakes are concrete: precisely measuring conversions, feeding the advertising algorithms of Meta and Google Ads, and understanding visitor behavior on every product page, cart, and checkout funnel. Without a solid implementation, collected data is incomplete, campaigns are poorly optimized, and marketing decisions are biased.

i

What this guide covers

You will find here the complete installation of GTM on PrestaShop, e-commerce dataLayer configuration, essential tags to deploy, and important limitations to know before getting started.

What is Google Tag Manager and why use it on PrestaShop

Google Tag Manager is a tag management platform that allows you to deploy, modify, and disable tracking scripts on your site without touching the source code. It works via a single JavaScript container placed in your PrestaShop theme. This container then loads all the tags configured in the GTM interface according to defined triggers (page load, click, event, etc.).

The main advantage over hardcoded tags is operational flexibility. Marketing can deploy a new advertising pixel in minutes without waiting for technical intervention. Tag version testing becomes possible. And in case of an error, a tag can be instantly disabled from the interface, without code deployment.

  • Deploy tags without modifying PrestaShop source code
  • Centralized management of GA4, Meta Pixel, Google Ads, TikTok, and other tools
  • Versioning and change history for each container
  • Real-time preview (Preview mode) to validate before publishing
  • Consent management via CMP integration (Cookiebot, Axeptio, etc.)
  • Conditional triggers by URL, page type, variable, or event

How to install Google Tag Manager on PrestaShop

Installing GTM on PrestaShop can be done in two ways: via a dedicated module available on PrestaShop Addons, or manually by adding the code snippet to your theme. Both methods achieve the same result, but the manual method offers more precise control over tag placement.

1

Create a Google Tag Manager account and container

Go to tagmanager.google.com and sign in with your Google account. Create a new account (usually your company name), then a container selecting the Web type. GTM generates two code snippets: one for the head and one for the body.

2

Install GTM via a PrestaShop module

If you use a GTM module from PrestaShop Addons, install it from your back office, then paste your container ID (format GTM-XXXXXXX) in the module configuration. The module automatically injects the snippets in the correct theme locations.

3

Install GTM manually in the theme

Open the header.tpl file of your PrestaShop theme located in /themes/[your-theme]/templates/_partials/. Paste the first GTM snippet immediately after the opening head tag. Place the second snippet (noscript) immediately after the opening body tag.

4

Verify installation with Preview mode

In the GTM interface, click Preview. Enter your PrestaShop store URL and launch the connection. The Tag Assistant tool opens in a new tab and displays in real time which tags fire on each page. Verify that the container appears as connected.

5

Publish the container

Once verification is complete, return to GTM and click Submit. Give a descriptive version name, then publish. Your container is now active on your store.

!

Caution with custom themes

On some heavily customized PrestaShop themes, the header.tpl file may have a different name or location. Always verify that the GTM snippet appears in your homepage source code after installation by pressing Ctrl+U in the browser and searching for GTM-.

Configure advanced e-commerce tracking with GTM on PrestaShop

Advanced e-commerce tracking consists of sending structured events to GA4 and advertising platforms that describe user actions in the purchase funnel: product view, add to cart, checkout start, and completed purchase. These data transit via the dataLayer, a global JavaScript object that serves as the interface between PrestaShop and GTM.

  • view_item: triggered on product pages, contains the product name, ID, category, and price
  • add_to_cart: triggered when clicking the cart button, contains information about the added product
  • begin_checkout: triggered when entering the checkout funnel
  • purchase: triggered on the order confirmation page, contains transaction_id, revenue, tax, shipping, and the list of purchased products
T

Tip for the purchase event

Always configure deduplication on the purchase event using transaction_id as a unique identifier. Without this precaution, reloads of the confirmation page generate duplicate conversions in GA4 and your advertising platforms.

Essential tags to configure in GTM for PrestaShop

TagPurposeMain TriggerConsent Required
GA4 ConfigurationTraffic and user behavior trackingAll pagesAnalytics
GA4 Event - E-commerceSend purchase, add_to_cart events, etc.dataLayer eventsAnalytics
Meta PixelConversion tracking and Facebook/Instagram retargetingAll pages + PurchaseMarketing
Google Ads ConversionConversion tracking for Google AdsPurchase eventMarketing
Google Ads RemarketingGoogle retargeting audiencesAll pagesMarketing
TikTok PixelConversion tracking and TikTok Ads audiencesAll pages + PurchaseMarketing
Hotjar or Microsoft ClaritySession recordings and heatmapsAll pagesAnalytics

Limitations of GTM for e-commerce analytics on PrestaShop

  • Consent dependency: with GDPR and CMPs, between 30 and 60% of users refuse advertising cookies. All GTM tags blocked by this refusal collect no data, creating a significant blind spot in your reports.
  • Client-side only: GTM runs in the user's browser, making it vulnerable to ad blockers (AdBlock, uBlock Origin) and Safari ITP restrictions. Data can be underestimated by 15 to 40% depending on your audience.
  • No business data: GTM collects behavioral data and conversions, but has no access to PrestaShop's internal data (margin, cost price, returns, order statuses). You cannot calculate your real ROAS or net profit from GTM.
  • Maintenance complexity: a serious GTM implementation with complete e-commerce dataLayer requires significant initial development and regular maintenance with each PrestaShop or theme update.
  • Latency and performance: each tag added in GTM contributes to page load time. Without rigorous management, GTM can degrade Core Web Vitals scores.

Fullmetrix: server-side e-commerce analytics that does not depend on GTM

The limitations of GTM all point to the same fundamental problem: a client-side solution that runs in the browser cannot be the source of truth for running an e-commerce store. Fullmetrix takes a radically different approach by connecting directly to your PrestaShop database via its native connector.

100% of ordersFullmetrix captures all orders directly from PrestaShop, without depending on cookies, consent, or the user's browser.
  • P&L and net margin by product, category, and acquisition channel
  • ROAS and POAS calculated on real margin, not gross revenue
  • Automatic RFM segmentation (Recency, Frequency, Monetary) of your customer base
  • Retention cohorts and customer lifetime value (LTV) by acquisition source
  • Audience synchronization to Meta Ads, Google Ads, and TikTok Ads
  • Revenue forecasts based on sales history
  • Multi-store management with consolidated data in a single dashboard

Frequently asked questions about Google Tag Manager and PrestaShop

Does GTM slow down my PrestaShop site?

GTM itself adds very low latency (a few milliseconds to load the container). The real performance impact comes from the number and quality of tags deployed in that container. A poorly optimized tag that loads a heavy JavaScript library can significantly degrade load times. Best practice is to load non-critical tags asynchronously and limit the total number of active tags.

Do I need a specific PrestaShop module for GTM?

No, the basic GTM installation does not require a module: you just need to add the two code snippets to your theme. However, to benefit from advanced e-commerce tracking with the dataLayer, a dedicated module or custom development is necessary.

Is GTM GDPR compliant?

GTM as a container tool is not inherently problematic regarding GDPR. It is the tags it deploys that may be. Compliance is achieved by integrating GTM with a Consent Management Platform (CMP) such as Axeptio or Cookiebot, and conditioning each tag on the appropriate user consent.

What is the difference between GTM and Fullmetrix for measuring conversions?

GTM measures events on the browser side and its data is inherently incomplete (blockers, consent refusals, JavaScript errors). Fullmetrix connects directly to your PrestaShop database and reads all real orders without loss, while also accessing business data (margin, cost, status) that GTM cannot collect.


Run your PrestaShop store with complete data

Connect Fullmetrix to your PrestaShop in minutes and access your real margins, exact ROAS, and RFM segmentation of your customers, without depending on cookies or consent.

Try Fullmetrix for free
Mezri
MezriFounder of Fullmetrix

Founder of Fullmetrix. E-commerce acquisition and analytics expert, I help merchants turn their data into profitable decisions.

LinkedIn

Turn this insight into measurable revenue

Fullmetrix unifies your e-commerce stack to track profit, LTV, cohorts and ad ROI on PrestaShop, WooCommerce and Shopify.

Continue reading

Stop flying blind.

Connect your PrestaShop, WooCommerce or Shopify store in 5 minutes. Your first segments, WhatsApp automations and reports run themselves.

14-day free trial.