What does the Google Tag Manager dataLayer include?
The Google Tag Manager module for PrestaShop pushes GA4-format ecommerce events into dataLayer, so tags inside your GTM container can read structured shop data without editing theme templates.

The module emits browser-side ecommerce events including view_item, add_to_cart, remove_from_cart, view_cart, begin_checkout and purchase. It also supports simple non-ecommerce events such as search, login and sign-up, plus configurable custom dataLayer rules. Before each ecommerce event it pushes {ecommerce: null}, which is the GA4-safe reset pattern.
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({'ecommerce': null});
window.dataLayer.push({
'event': 'purchase',
'ecommerce': {
'transaction_id': 'ABCDXYZ',
'affiliation': 'Example Shop',
'value': 129.90,
'tax': 21.65,
'shipping': 4.90,
'currency': 'EUR',
'coupon': 'WELCOME10',
'items': [{
'item_id': '42',
'item_name': 'Premium Shower Tray',
'item_brand': 'Example Brand',
'item_category': 'Bathroom',
'item_variant': '90x90',
'price': 125.00,
'quantity': 1
}]
}
});The GTM container script is injected in the page header, and the noscript iframe is injected after the opening body tag when the theme exposes that hook. Consent Mode handling is designed to work with mprcookiesrevolution: when that CMP is installed, the module moves its header hook after the CMP; when no CMP is present, it can emit a default denied Consent Mode v2 fallback before GTM loads.
Tracking is skipped for non-front requests, known bots, logged-in employees when that option is enabled, and visitors with the mpr_notrack=1 opt-out cookie. The optional server-side Measurement Protocol fallback sends purchase data on actionValidateOrder when a valid GA4 Measurement ID and API Secret are configured; GA4 deduplicates by transaction_id.
Was this answer helpful?
Related products
Still have questions?
Can't find what you're looking for? Send us your question and we'll get back to you.