These steps apply to product cards you render yourself. Cards rendered by a
legacy Depict UI SDK already carry these attributes.
/v3/search/suggestions returns no displays, so there is nothing to tag for it.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/*)
Product card impressions
A click data attribute does not prove that impression tracking is active. When you render cards yourself, add visibility tracking for search, listing and recommendation cards. Check the events your installed DPC version sends before you add a second sender. Send a card impression when the card becomes visible. Send it from the browser, after rendering. Do not send an impression only because the server rendered a card in HTML. A custom sender can usePOST https://api.depict.ai/create-events with a JSON
array. Each event requires tenant, market, type and at least one identity
field: session_id, user_id or dsid. For an impression, set type to
element_visible. Include the result ID from the visible display and its
selected variant’s product_id.
product_listing_result_id instead of search_result_id.
For recommendation cards, use recommendation_id. Include exactly the result
ID for the card’s source. A custom click sender uses the same endpoint and
identity fields, with type: "click" and the card’s result ID.
/create-events uses tenant, although v3 serving requests use merchant.
Use the same session ID in serving requests, DPC and custom events. Configure
DPC with setSessionId.
The ID guide
explains the 10-minute result ID lifetime and event validation.
Check the HTTP status when sending events. A 200 response with
{"message": "ok"} confirms that the batch passed validation. It does not
prove that result IDs matched. Confirm event arrival and product matching in
the portal’s Tracking status tab.
