We'll show you how to use product.categories correctly to avoid issues in emission of the product event.
DANGER: It is critical that the following information is adhered to when implementing product.categories
.
product.categories
is used on product and listing pages to identify the product categories that a product belongs to.
The following snippet is a good example of using product category:
[
'Clothing > Sweaters > Short Sleeve Sweaters',
'New Arrivals > Clothing'
]
This product appears in 2 categories: Clothing > Sweaters > Short Sleeve Sweaters
and also a New Arrivals > Clothing
.
Do provide different categories on different pages, to match the context.
For example, it is acceptable to send New Arrivals > Clothing if visitors arrived via the New Arrivals menu item, and also acceptable to send Clothing > Sweaters > Short Sleeve Sweaters if visitors arrived via the Clothing menu item
View all
in your category structure, for example Tops > View all
. Instead, use Tops
Refer to the following examples of a correct implementation of product.categories
['Clothing > Sweaters > Short Sleeve Sweaters']
['Clothing > Tops > Blouses']
['New Arrivals > Clothing']
['Clothing > Sweaters > Short Sleeve Sweaters', 'New Arrivals > Clothing']
['Clothing > Leggings', 'Sale > Clothing']
['Clothing > Leggings', 'Sale']
['Men > Clothing > Shirts', 'Designers > Moncler > Shirts']
['Activity > Run > Running Pants', 'Activity > Yoga > Yoga Pants', 'Clothing >Pants']
Refer to the following examples of an incorrect implementation of product.categories
['Clothing > All clothing']
['Clothing > Clothing']
['All clothing']
Home
:['Home > Clothing > Sweaters']
['Blouses']
['Skirts']
['457']
['SHOP/NW/CL']
['B_CLOTHING']
['CLOTHING > ALL CLOTHING']
['clothing > Sweaters > short sleeve Sweaters']
>
surrounded by spaces as the separator:['Clothing', 'Tops', 'Blouses']
['Clothing>Tops>Blouses']
['Tops > View all']