Skip to main content

Definition

The basket page displays the contents of a user’s current shopping cart, until the order is placed.

Parameters

event-type

Value: viewBasket Description: Indicates to the API that this is a view basket event. Required: Yes

page-id

Description: An identifier that tells Criteo which placements (if any) to return for the ad request. Placements are instantiated by your Technical Account Manager depending on your desired ad configuration. Below are the standard page-ids for this page type:
  • In Americas: Typically follows the structure [event-type]_API_[environment], e.g., viewBasket_API_desktop, viewBasket_API_mobile, viewBasket_API_iOS, viewBasket_API_android.
  • In EMEA: Typically follows the structure [event-type]Api[environment], e.g., viewBasketApiDesktop, viewBasketApiMobile, viewBasketApiAios, viewBasketApiAa.
Required: Yes

item

Description: The list of SKUs in the cart. Must match the parameter ID in the feed. Multiple items should be separated by a pipe | or %7C (URL encoded). In basket pages, these are used for targeting. Include all item ids in the cart, regardless of whether or not they are sponsored. Examples:
  • 123|456|789
  • 123%7C456%7C789
Required: Yes

quantity

Description: The pipe-separated quantities of each SKU within the user’s basket. Examples:
  • 4|1|2
  • 4%7C1%7C2
Required: Yes

Sample Calls

The header values in the sample calls are illustrative. Make sure to replace them with the appropriate values for your implementation.

AMER

curl -X GET "https://d.us.criteo.com/delivery/retailmedia" \
--data-urlencode "criteo-partner-id=12345" \
--data-urlencode "environment=d" \
--data-urlencode "retailer-visitor-id=a1b2c3d4e5" \
--data-urlencode "customer-id=123456789" \
--data-urlencode "page-id=viewBasket_API_desktop" \
--data-urlencode "event-type=viewBasket" \
--data-urlencode "item=123|456|789" \
--data-urlencode "quantity=4|1|2" \
-H "Referer: https://www.criteo.com" \
-H "X-Forwarded-For: 123.456.789.012" \
-H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"

EMEA

curl -X GET "https://d.eu.criteo.com/delivery/retailmedia" \
--data-urlencode "criteo-partner-id=12345" \
--data-urlencode "environment=d" \
--data-urlencode "retailer-visitor-id=a1b2c3d4e5" \
--data-urlencode "customer-id=123456789" \
--data-urlencode "page-id=viewBasketApiAios" \
--data-urlencode "event-type=viewBasket" \
--data-urlencode "item=123|456|789" \
--data-urlencode "quantity=4|1|2" \
-H "Referer: https://www.criteo.com" \
-H "X-Forwarded-For: 123.456.789.012" \
-H "User-Agent: app_ios 1.2.3"


What’s next