How to enable Merchandising Reporting
Merchandising reporting lets you track the performance of your strategies (views, clicks, conversions) directly in Google Analytics 4 (GA4). To do this, you just need to make sure that Merch events are sent to your website’s DataLayer through the AB Tasty tag.
Enabling Merchandising reporting
If you want to know more about the Merchandising strategy reporting dashboard with metrics like views, clicks, conversion rate, and top products, read Merchandising Reporting
How to setup HTML on your website ?
To allow the AB Tasty tag to detect and send Merch events automatically, your merchandising banners must include specific HTML attributes.
If AB Tasty does not manage your frontend (custom site or CMS), your development team must add these attributes directly in the HTML of your merchandising banners. Each product container should include these attributes so the AB Tasty tag can detect and send events.
Required attributes
data-category-id
Category identifier
<div data-category-id="jeans-homme">
data-item-id
Product identifier
<div data-item-id="SKU123">
data-reco-click
User interaction type
<button data-reco-click="add_to_cart_item">
data-reco-debug="true" (optional)
Enables debug mode in console
<div data-category-id="jeans-homme" data-reco-debug="true">
Event Actions available
show
When the banner appears in the DOM
go_to_page
When a product in the banner is clicked
add_to_cart_item
When a user adds one product to cart
add_to_cart_items
When the user adds all recommended products (e.g. bundles)
convert_xxx
When a conversion button is clicked
Important note
The tag automatically sends a show event as soon as an element with a data-category-id appears in the DOM.
If you fill it asynchronously, make sure to add this attribute only after the items are rendered, otherwise the event will fire empty.
How to configure GTM / GA4 ?
The configuration is exactly the same as for Recommendations tracking. If you already have Recommendation analytics events in GA4 → nothing else to set up.
Otherwise, follow these steps:
Example event in the DataLayer
Show event
{
"event": "ab_recos_12345",
"recos": {
"category_id": "jeans-homme",
"action_id": "show",
"item_ids": "[\"SKU123\",\"SKU456\"]",
"debug_mode": false
}
}Click event
{
"event": "ab_recos_67890",
"recos": {
"category_id": "jeans-homme",
"action_id": "go_to_page",
"item_id": "SKU123",
"item_ids": "[\"SKU123\",\"SKU456\"]"
}
}How to test my reporting tracking ?
Open your website
Open the browser console
Type:
console.log(dataLayer)You should see events like
ab_recos_xxxxcontainingcategory_id,action_id, anditem_ids.
Notes & Limitations
Merch Analytics is currently available only for GA4.
Piano Analytics and Matomo are supported for Recommendations only.
Merch and Reco events share the same event name (
ab_recos.*) and GTM configuration.Activating this does not interfere with your existing analytics setup.
Last updated
Was this helpful?

