select_item
RecommendedThis event signifies an item was selected from a list.
- Platforms
- web, app
- When it fires
- You send it when the action happens.
Parameters (3)
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| item_list_id | string | No | The ID of the list in which the item was presented to the user. Ignored if set at the item-level. | related_products |
| item_list_name | string | No | The name of the list in which the item was presented to the user. Ignored if set at the item-level. | Related products |
| items | Array<Item> | Yes* | The items for the event. * The items array is expected to have a single element, representing the selected item. If multiple elements are provided, only the first element in items will be used. | - |
Example
gtag.js
gtag('event', 'select_item', {
items: [{ item_id: 'SKU_12345', item_name: 'Stan and Friends Tee', price: 9.99, quantity: 1 }],
item_list_id: 'related_products',
item_list_name: 'Related products',
});GTM dataLayer
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'select_item',
items: [{ item_id: 'SKU_12345', item_name: 'Stan and Friends Tee', price: 9.99, quantity: 1 }],
item_list_id: 'related_products',
item_list_name: 'Related products',
});