For your Shopping Assistant to function correctly, from product recommendations through to add-to-cart and sales tracking, a single product identifier must flow consistently across four distinct integration points. Any discrepancy between these identifiers causes malfunctions: product not found, failed add-to-cart, or incorrect conversion attribution.
This article centralises the unification constraints that must be strictly followed during your integration.
Principle: one identifier, four integration points
iAdvize uses the product identifier as a join key between its various components. The value defined in the product catalogue is the absolute reference: it must be reproduced identically across the three other integration points.
The four points concerned are:
-
The product catalogue:
idfield -
The custom data
product_id: sent via the GTM tag or the main iAdvize tag on the product page -
The transaction tag: product identifiers transmitted at the time of purchase (via
products[].idin manual integration, or via the dataLayer in GTM) - Add-to-Cart: identifier transmitted to the native API of your e-commerce platform
1. The product catalogue: defining the reference value
Role of the id field
The id field in your product catalogue is the reference identifier. This is the value the iAdvize system uses to find and display the product page in the Assistant.
- It must be unique per product (or per variant, depending on your business logic).
- It is defined when your feed is indexed (CSV, Google Shopping XML, Lengow, SmartFeeds, Channable…).
- Once assigned to a product in the catalogue, this identifier can no longer be reused for another product.
id. In a Google Shopping XML feed, it corresponds to the <g:id> tag. Regardless of the import method, the value must be identical to the one transmitted across the other integration points.
Special case: variant management
If your catalogue is structured at the variant level (size, colour, format, etc.), the id must correspond to the identifier of the variant, not the parent product.
/cart/add.js. This constraint therefore applies to all four integration points described in this article.
2. The custom data product_id: signalling the product being viewed
On every product page of your site, the iAdvize tag must receive the identifier of the product currently being viewed by the visitor. This information is transmitted via custom data.
The system uses this value to match the product being viewed with the corresponding entry in the catalogue. If the values do not match, the Assistant cannot access the product information and the engagement notification cannot be personalised.
The transmission method depends on your integration approach:
-
Manual integration: the custom data
product_idis included directly in the main iAdvize tag.
→ Integrate the main tag manually
-
GTM integration: the custom data
product_idis transmitted via the dedicated "iAdvize - Custom Data tag".
→ Install iAdvize via Google Tag Manager
product_id. It must match the configuration set in your iAdvize knowledge source (the "Product identification" field when creating the source). If you use a different key, make sure that your knowledge source configuration is aligned accordingly.
3. The transaction tag: measuring conversions
Role in sales attribution
For iAdvize to attribute sales generated after a conversation with the Assistant and identify which products were purchased, the product identifiers transmitted at the time of the transaction must match those indexed in the catalogue.
The transmission method depends on your integration approach:
-
Manual integration: product identifiers are transmitted directly in the transaction tag, via the
products[].idarray of theiAdvize.recordTransaction()method.
→ Integrate the transaction tag manually
-
GTM integration: the "iAdvize - Transaction tag" template transmits only the order identifier and amount. Product identifiers are captured automatically by the main iAdvize tag, which monitors the dataLayer and extracts products from the GA4
purchaseevent (fieldecommerce.items[].item_id). No additional configuration is required.
→ Install iAdvize via Google Tag Manager
4. Add-to-Cart: passing the identifier to your platform
When a visitor clicks the "Add to Cart" button in a conversation with the Assistant, iAdvize triggers a JavaScript callback on your site. This callback receives the productId of the recommended product — i.e. the value of the id field defined in your product catalogue.
Your callback implementation is responsible for passing this identifier to the add-to-cart API of your e-commerce platform.
→ Add-to-Cart installation guide
The identifier transmitted by iAdvize via the productId is the one indexed in the catalogue. Your e-commerce platform must be able to accept it as-is for the add-to-cart to work.