Product details page view event
The Sitecore Discover beacon usually sends page visits. However, if the beacon is absent or if specific information like fitment is required, then you must send the product details page view
(view:pdp
) event when a user views a product on the site.
This event is used in:
-
Viewing metrics in product and category analytics.
-
Generating datasets like top-viewed, co-viewed, and view-buy.
-
Search ranking based on views.
The following table lists the properties of the product details page view
event:
Name |
Type |
Description |
Value |
---|---|---|---|
|
string |
Required. Type of the event. |
|
|
string |
Required. Name of the event, usually the type of the pdp page. |
|
|
array |
Required. Products array with a single product object that was viewed by the user. |
n/a |
|
string |
Required. SKU of the product that the user viewed. Used to attribute views to a specific product in the catalog. |
n/a |
|
array |
Required if site supports fitments. An array of fitment objects. |
n/a |
|
object |
Required if the site is set up with locale configuration. Adds page-specific information (including locale information) under the page object. |
n/a |
|
object |
Optional. A locale object. This attribute is deprecated. We suggest you use the page object for locale data. |
n/a |
Sample event specification
The following is an example of a product details page view
event object. This example is in the new format, which means it contains a context
object.
{
"type": "view",
"name": "pdp",
"value": {
"context": {
"page": {
"locale_country": "<country code, 2 letters, lowercase, e.g. fr>",
"locale_language": "<language code 2 letters, lowercase, e.g. en>",
"locale_currency": "<currency code, 3 letters, lowercase, e.g. eur>"
}
},
"products": [
{
"sku": "191258",
"fitment": {
"ids": [
"2222"
]
}
}
]
}
}