Skip to main content
Only follow these steps for product cards that are NOT rendered through the Depict UI (SDK)
We need to tell DPC about the product cards that you created using Depict data. Product cards rendered by Depict components (such as the SearchPage or RecommendationSlider) will automatically have this attached. However, if you render product cards yourself, you need to add a data attribute to the product card. In the response from all our API:s there’s an id inside each display. You need to add this id to your product card template as a data attribute. The ID is called different things based on different endpoints This step enables DPC to track clicks on the product cards — including clicks on add-to-cart buttons inside them. Cards added later (for example after client-side navigation or infinite scroll) are picked up automatically.

Examples

One attribute per card, named after the endpoint the display came from (see the table above). The value is the id from that display.
Collection or category page (/v3/listings/*)
Recommendations (/v3/recommend/products)
Search results (/v3/search/*)