Item_category parameter is not pushed in the Stape dataLayer events

Hello team,
dataLayer events not carrying item_category on all the funnel events, from view collection_stape event till purchase_stape, items not carrying the item_category parameter in item object. There is an alternate Shopify/default dataLayer present on the site that has the item_category parameter so I think in the product details on the site code item_category is present but Stape dataLayer is not pushing the item_category parameter. What can we do in this case ? I need this parameter and essential for reporting. I’m sharing a few screenshots with the details.

Hey @db30

This means that the category parameter you have in your products is not in a standard field or something similar. Stape plugin only covers standard data layer methods and uses Shopify Pixel API to get data about events and their parameters. So in your case it looks like this data is not available there and unfortunately neither Stape nor you can do anything about it.

But there is nothing stopping you from using another data layer (which it looks like you have and customise the event based on it).

In that case, you can use custom code from customer events. I think it will be solve

@db30

a) that’s not a native or alternate dataLayer, it’s not strictly speaking a dataLayer at all.Those are gtag pushes from the native GA4 integration. Emphasis is on native, that’s how it grabs the category.

b) our app works with Shopify’s Pixel API (the Customer Events that were mentioned here) and within that, there’s no category datapoint to push, you can check for yourself here: product_added_to_cart our app will attempt to pull category from data.cartLine.merchandise.product.type

@shakilahmedsamim which is the reason why using a custom pixel as you suggested would not help.

Yes correct, maybe it is not available category.
At first, he has to add category with products