The e-commerce dataLayer
Kixell Tag fills the dataLayer on every page, in the Google Analytics 4 e-commerce format. This page gives its structure: the push order, the data blocks and the fields of a product.
Read this page to build your own tags or variables in Google Tag Manager from the module's data. The dataLayer is the list of JavaScript objects (window.dataLayer) that Google Tag Manager reads: all the tags of the provided containers rely on it. Each event is detailed in dataLayer events.
Push order #
When a page loads, the module pushes into the dataLayer, in this order:
- if the banner is turned on, the Consent Mode state: the default, then the visitor's choice if they have already made one;
- the page data, with no event (the blocks described below);
- a consent event:
kixelltag_consent_readyif the visitor has already chosen,kixelltag_consent_waitingotherwise; kixelltag_page_view;- the page's e-commerce events:
view_itemon a product page,view_carton the cart,purchaseon the order confirmation…
The visitor's actions then push their own events: add to cart, click on a product, carrier choice. The choice made in the banner pushes the events described in Triggering consent events.
Warning
Since version 4.6.0, each e-commerce event carries its own ecommerce data. A custom tag that reads ecommerce on a plain page load must now fire on these events instead.
Data blocks #
| Key | Content |
|---|---|
ecommerce |
The event data: currency, items, and on purchase transaction_id, value, tax, shipping |
s |
The page: page type (s.pt), language (s.cl), currency (s.cc), HTTP status code (s.ps), product ID on a product page (s.pi) |
ud |
The visitor: logged in or not, new or returning customer, customer group, data used by enhanced conversions |
pixels |
The IDs and settings of the platforms turned on in the module: the containers read them here |
kixelltag |
Consent: selected partners, accepted (vendors_consent) and refused (vendors_denied) |
search |
On the search results page, the search term (search.term) |
kixelltag_custom_params |
The name and parameters of a custom event |
Product fields #
Each e-commerce event carries an ecommerce.items array, one object per product.
ecommerce: {
currency: "EUR",
items: [{
item_id: "REF-123",
item_name: "Organic cotton T-shirt",
item_id_product: 123,
item_id_variant: 456,
item_brand: "My Brand",
item_category: "Clothing",
item_category2: "T-shirts",
item_variant: "Blue, M",
item_list_id: 42,
item_list_name: "T-shirts",
index: 3,
price: 19.9,
quantity: 1
}]
}
| Field | Content |
|---|---|
item_id |
The product ID for GA4, built from the Product Configuration part of the Google Analytics tile |
item_name, item_brand |
The name and the brand |
item_variant |
The combination: its attributes, separated by a comma. Add attribute group name, in the Google Analytics tile, puts each group name before its attribute |
item_category to item_category5 |
The product's category levels |
price, quantity |
The unit price and the quantity. The price excludes or includes tax depending on Revenue and prices excluding taxes?, in the Google Tag Manager tile |
item_list_id, item_list_name, index |
The list the product comes from (for example the category ID and name) and its position |
item_id_product, item_id_variant |
The PrestaShop IDs of the product and the combination |
item_ref, item_ref_variant, item_ean, item_upc, item_mpn, item_isbn |
The product's references and codes |
price_tax_exc, price_tax_inc |
The unit price excluding and including tax |
item_meta, item_pinterest, item_tiktok, item_snapchat, item_reddit, item_openai_ads, item_gmc, item_kelkoo, item_criteo |
The product ID in each platform's format, following the product settings of its tile |
GA4 tags receive the items without the internal fields: PrestaShop IDs, item_ref, prices excluding and including tax, IDs for the other platforms.
Make the dataLayer lighter
In the Google Analytics tile, Fields to remove from dataLayer products removes the ticked fields from every product. Only fields that no container tag uses are offered. Check that none of the tags you added yourself uses them.
To add your own fields to the products:
- without code, from the DataLayer item enrichment tab of the Google Tag Manager tile: see Google Tag Manager;
- from a PrestaShop module: see Server-side enrichment.
Product lists #
view_item_listis sent when a list page that shows products loads. A page with no product does not send it.- It is sent again when new products appear after a filter, a page change or a sort. The selectors of the Product selection and listing tab of the Google Tag Manager tile must match your theme: see Google Tag Manager.
- The number of products sent is capped by Maximum products in product list impressions, in the Google Analytics tile: from 1 to 200.
Missing or wrong information? Tell the support team