This will show how to change the category attached to products in Enhanced Ecommerce hits to use the native Shopify product type setting
This article shows how to send your Shopify product type as the enhanced ecommerce category. This requires changes to three places:
- thank you page script
Step 1: elevar-body-end.liquid changes
Inside of the Admin > Themes > Your Live theme > snippets > navigate to elevar-body-end.liquid.
You will then need to find the instances where we have the collection page URL set as the category that looks like this:
In total, there are:
- (2) productDetailView instances
- (1) addToCart instance
- (1) collectionImpression instance
It involves changing the area circled in red above to instead be:
This will then set your product type as the primary category shown in the product list reports so you can have the full CTR => purchase data for product & product type combinations.
Here are the 4 placements:
Step 2: elevar-checkout-end.liquid changes
Now you need to make a similar edit in the elevar-checkout-end.liquid file. Find the 'category' parameter and edit so it's the following:
Step 3: Thank You Page script changes
This should already be set by default to your product type, however you should double check to be certain. In the thank you page dataLayer script look for the following:
Which should be this:
Worried You’re Making Decisions on Data You Can’t Trust?
Check out our blog and discover Shopify Optimization & Analytics Tips from Elevar's data experts.