Skip to main content
Product Category/Collection

Adding product collection to your custom embed integration and using that data to create audiences

Landon Anspach avatar
Written by Landon Anspach
Updated over 2 months ago

Only available for Custom Embed Integration stores on paid plans

For custom embed integration stores (non-Shopify), you may want to use a product Collection to create Audiences for both survey targeting and report filtering. Starting with the Universal Embed help doc, you can then use this help doc to expand on the basic integration, collect the correct Collection information, and create those Audiences.

Location in Script

The attribute product_category will be included in the order object within the window.Kno script definitions. This is the starting point for adding product_category to the existing order object in the Kno script for your store.

order: {
product_category: []
}

Product_category Format & Content

The attribute product_category needs to be passed into KnoCommerce as an array of objects, with each object corresponding to a product category or collection that is included on the order. They will need to be formatted similarly to the following example:

[
{
id: "12345678",
title: "Product Category 1",
product_id: "24680975"
},
{
id: "87654321",
title: "Product Category 2",
product_id: "13579086"
}
]

Syntax

Each object can accept the following attributes (also included are required data types). None of the attributes themselves are required, so you can choose which ones are helpful vs. not helpful.

  • id (string) - corresponds to the id of the product category/collection

  • title (string) - corresponds to the title or name of the product category/collection

  • product_id (string) - corresponds to the product id for the product that is connected to/included in the product category/collection


Use Case

The most important uses for product_category/collection are going to be in creating and using Audiences to either target surveys or filter report data.

  • The Product Category Title Audience uses the title field to create audiences/segments

  • The Product Category ID Audience uses the id field to create audiences/segments

Did this answer your question?