moralab
Store foundations

How to set up Google Tag Manager on PrestaShop

To set up Google Tag Manager on PrestaShop, create a Web container and install it through a compatible module or a developer-maintained integration. Configure the tags you need, test them in Preview, then publish the container. Installing GTM alone does not set up GA4 or purchase tracking.

By the MoraLab team · Updated · 3 min read

1. Check the store and existing tags

Record your PrestaShop version, theme, checkout modules and consent solution. Check whether GTM or Analytics is already installed through a module or the theme. Save the current configuration and use a staging store for changes where possible.

We use Tag Pilot as an example and follow the supplier's documentation. Other modules may use different steps. Check with the supplier that your PrestaShop version, theme and checkout are supported before installing it.

2. Create a Web container

In Google Tag Manager, create an account for the business if needed, then a container for the store with Web as its target platform. If the store already has the right container, reuse it.

Keep the GTM- container ID available. It is different from a GA4 G- measurement ID. Give access to the people who maintain the setup without sharing one password.

Source: Google: Create an account and container

3. Install the container through the module

Follow your module supplier's installation instructions. In the documented Tag Pilot example, open its configuration from Module Manager and paste the two GTM installation snippets into the matching fields, then save. Other modules may ask only for the container ID.

Use the code from your own container. Do not also paste it into the theme. If there is already an installation, decide which integration owns it before enabling another. Clear the relevant store cache if changes are not visible.

Source: Tag Pilot: PrestaShop installation

4. Configure tags and shopping data

Choose what you want to measure before importing a supplier preset. Inspect the tags, triggers, destination IDs and consent settings it would add. Do not overwrite an existing container blindly.

For GA4 e-commerce measurement, the module or integration needs to supply suitable events and item data. Map the supplied event names to the intended tags. An event in the data layer does not by itself prove that Analytics received it.

Sources: Google: The data layer; Google: Recommended events

5. Preview, check and publish

Open Preview in GTM and connect to the store. Check a product page, the cart and an agreed test order. Confirm the expected tags run once and inspect purchase values, currency, items and transaction ID in the destination tool.

Test before a consent choice, after refusal and after acceptance against your intended consent configuration. When the checks pass, publish a named container version and repeat the journey outside Preview. Keep the previous version and module settings available for rollback.

Sources: Google: Preview and debug containers; Google: Set up consent mode

If the container works but purchases do not

Work through the chain: did the store provide the order event, did the trigger match, did the tag run and did the intended property receive it? Check each step before installing more tracking.

If GTM cannot connect to the store, check the container ID, module activation, cache, browser blocking and consent configuration. If results are duplicated, look for another module or theme installation. Do not send customer names, email addresses or delivery addresses in example event payloads.

Frequently asked questions

Can I install GTM by editing the theme?

A developer can maintain a direct integration, but it must survive theme changes and handle the required placement and data. Do not combine it with a module that inserts the same container.

Does GTM handle cookie consent automatically?

No. Your consent solution and tags must be configured together. Check their actual behavior; a banner being visible does not prove that the tags follow its choices.

Sources

  1. Google: Create an account and container
  2. Tag Pilot: PrestaShop installation
  3. Google: The data layer
  4. Google: Recommended events
  5. Google: Preview and debug containers
  6. Google: Set up consent mode

Sources checked 15 November 2026. Figures are reported as the publishers state them; where sources disagree, the article says so.

Better product pages, without rewriting every one by hand.

Book a 30-minute demo. We'll look at your store together and show how MoraLab helps you improve product descriptions, images and SEO.

Book a demo