---
title: 'Kowal Data Layer'
url: 'https://info.srv.kowal.co/docs/magento/modules/data-layer'
markdown: 'https://info.srv.kowal.co/docs/magento/modules/data-layer.md'
lang: en
date: '2026-11-29'
description: 'Choose the product ID sent to Google Tag Manager. In GTM Preview, check the item ID, price and quantity when a shopper views a product and adds it to the cart.'
taxonomy:
  category:
    - docs
    - Magento
    - Modules
  tag:
    - analytics
    - ecommerce
---

# Kowal Data Layer

**Composer** `kowal/module-datalayer` · **Version** 0.1.33

## Product page

[Kowal Data Layer — kowal.co](https://kowal.co/kowal-data-layer-for-magento-2)

## Description

Publish store events to window.dataLayer so a Google Tag Manager container can read product, cart and purchase data.

## For whom

For analytics teams measuring the journey from viewing a product to placing an order.

## Features

- Individual event switches, including view\_item, add\_to\_cart and purchase.
- Map the product identifier, brand and category.
- Optionally retain first-touch and last-touch attribution with the order.

## Installation

From the Magento root, with Composer access to the Kowal package, run

```sh
composer require kowal/module-datalayer
bin/magento module:enable Kowal_DataLayer
bin/magento setup:upgrade
bin/magento cache:clean
```

## Configuration

1. Enable the module under **Stores → Configuration → Kowal → Kowal Data Layer → General**.
2. In **Product Mapping**, select the product identifier used by your analytics setup. Enable the events you need under **Events**.
3. Under **Integrations**, check how the GTM container is loaded. If the theme or another module already embeds it, leave **Render GTM From DataLayer Module** off.

## Requirements / notes

The package requires PHP matching `^8.1` and Kowal Base. The browser event supplies data for a tag. Delivery to an analytics service depends on the container configuration and the user’s consent.

## FAQ

**How do I check which product identifier analytics receives?**

Find a `view_item` event and compare the `item_id` in `ecommerce.items` with the attribute selected in **Product Mapping**.

## Verify the installation

```sh
bin/magento module:status Kowal_DataLayer
```

In a test session, view a product and add it to the cart. Locate `view_item` and `add_to_cart` in GTM Preview and check the identifier, price and quantity for the same item.

## Components included in Kowal Data Layer

 [ **Kowal Data Layer Hyvä** Keep ecommerce tracking in sync when a Hyvä storefront refreshes private customer data or replaces a product list after filtering. ](https://info.srv.kowal.co/docs/magento/modules/data-layer/data-layer-hyva)

---

## Navigation

- Parent: [Magento 2 Extensions](https://info.srv.kowal.co/docs/magento/modules.md)
- Previous: [Omnibus Price Tracker](https://info.srv.kowal.co/docs/magento/modules/omnibus-price.md)
- Next: [Purge Varnish Cache](https://info.srv.kowal.co/docs/magento/modules/purge-varnish-cache.md)
- Children:
  - [Kowal Data Layer Hyvä](https://info.srv.kowal.co/docs/magento/modules/data-layer/data-layer-hyva.md)
