Page view event
The page view
event (view:page
) must be sent when a user views a page on the site. Sitecore Discover beacon usually sends page visits but if the beacon is absent, then the customer must send this event.
This event is used in:
-
Overall page view metrics.
-
Search Ranking based on views.
The following table lists the properties of the page view
event:
Name |
Type |
Description |
Value |
---|---|---|---|
|
string |
Required. Type of the event. |
|
|
string |
Required. Name of the event. |
|
|
string |
Required. URI of the page that the user visited. |
n/a |
|
string |
Optional. The title of the page. |
n/a |
|
string |
Required if the page URL was clicked from a referrer channel. Channel referrer that led the user to click on this URL. Used to trigger rules based on referrer URL. |
n/a |
|
object |
Required if the site is set up with locale configuration. A page object containing page-specific information, including locale. |
n/a |
Sample event specification
The following is an example of a page view
event object. This example is in the new format, which means it contains a context
object.
{
"type": "view",
"name": "page",
"value": {
"context": {
"page": {
"uri": "/rfk/collection/handbags",
"title": "Handbags",
"referrer": "https://www.google.com/",
"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>"
}
}
}
}