SDK Event Details
Here are the details and descriptions for each event JSON object in all versions of the Monetate SDK.
- monetate:context:ipAddress
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:context:ipAddress). |
ipAddress: String | Yes | The IP address to send. |
Code Example
{
"eventType": "monetate:context:IpAddress",
"ipAddress": "198.51.100.0"
}- monetate:context:PageView
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:context:PageView). |
path: String | Required if url isn't included. | The path portion of the URL for the page viewed. |
url: String | Required if path isn't included. | The complete URL for the page viewed. |
pageType: String | Yes | The type of page viewed (for example, "index" or "PDP"). |
categories: Array | Optional | Categories to filter against. Only matching actions are evaluated. |
breadcrumbs: Array | Optional | Breadcrumbs to filter against. Only matching actions are evaluated. |
Code Example
{
"eventType": "monetate:context:PageView",
"url": "http://www.monetate.com/index.html",
"pageType": "home",
"categories": ["category"],
"breadcrumbs": ["breadcrumb"]
}- monetate:context:Cart
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:context:Cart). |
cartLines: Array[cartLine] | Yes | The contents of the cart. Refer to cartLine for details. |
Code Example
{
"eventType": "monetate:context:Cart",
"cartLines": [{
"sku": "SKU1",
"pid": "PID1",
"quantity": 2,
"currency": "USD",
"value": "24.00"
}]
}- monetate:context:AddToCart
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:context:AddToCart). |
cartLines: Array[cartLine] | Yes | The contents of the cart. Refer to cartLine for details. |
Code Example
{
"eventType": "monetate:context:Cart",
"cartLines": [{
"sku": "SKU1",
"pid": "PID1",
"quantity": 2,
"currency": "USD",
"value": "24.00"
}]
}- monetate:context:Purchase
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:context:Purchase). |
account: String | — | The account ID. Deprecated. |
domain: String | — | The account domain (for example, fifthlevelfashion.com). Deprecated. |
instance: String | — | The type of instance (for example, p for production). Deprecated. |
purchaseId: String | Yes | The unique identifier for the purchase. |
purchaseLines: Array[purchaseLine] | Yes | The contents of the purchase. Refer to purchaseLine for details. |
Code Example
{
"eventType": "monetate:context:Purchase",
"purchaseId": "1b2c3d",
"purchaseLines": [{
"sku": "SKU1",
"pid": "PID1"
"quantity": 2,
"currency": "USD",
"value": "24.00"
}]
}- monetate:context:Metadata
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:context:Metadata). |
metadata: Object [language] | Yes | Additional custom data to send. |
language: String | Yes | The language of the device or app. |
Code Example
{
"eventType": "monetate:context:Metadata",
"metadata": {
"language": "en-GB"
}
}- monetate:context:ProductDetailView
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:context:ProductDetailView). |
products: Array[product] | Yes | The list of products viewed on a product detail page. Refer to product for details. |
Code Example
{
"eventType": "monetate:context:ProductDetailView",
"products": [
{
"productId": "product72",
"sku": "product72-large-green",
},
{
"productId": "product43",
"sku": "product43-medium-striped"
}
]
}- monetate:context:ProductThumbnailView
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:context:ProductThumbnailView). |
products: Array[String] | Yes | The list of product thumbnails viewed on a product list page. Refer to product for details. |
Code Example
{
"eventType": "monetate:context:ProductThumbnailView",
"products": ["product72", "product43", "product42"]
}- monetate:context:Coordinates
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:context:Coordinates). |
latitude: String | Yes | The device user's latitude coordinates in decimal degrees. |
longitutde: String | Yes | The device user's longitude coordinates in decimal degrees. |
Code Example
{
"eventType": "monetate:context:Coordinates",
"latitude": "49.566667",
"longitude": "10.883333"
}- monetate:context:ScreenSize
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:context:ScreenSize). |
height: Number | Yes | The height of the device. |
width: Number | Yes | The width of the device. |
Code Example
{
"eventType": "monetate:context:ScreenSize",
"height": 762,
"width": 1024
}- monetate:context:CustomVariables
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:context:CustomVariables). |
customVariables: Array[customVariables] | Yes | An array of custom variables. Refer to CustomVariables for more Details |
Code Example
{
"eventType": "monetate:context:CustomVariables",
"customVariables": [{
"variable": "favoriteTeam",
"value": "Blue Hens"
}]
}- monetate:context:UserAgent
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:context:UserAgent). |
userAgent: String | Yes | The User-Agent header value. |
Code Example
{
"eventType": "monetate:context:UserAgent",
"userAgent": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/522.11 (KHTML, like Gecko) Safari/3.0.2"
}- monetate:context:Referrer
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:context:Referrer). |
referrer: String | Yes | The referring URL. |
Code Example
{
"eventType": "monetate:context:Referrer",
"referrer": "http://www.example.com"
}- monetate:record:PageEvents
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:record:PageEvents). |
pageEvents: Array[String] | Yes | The array of page events. |
Code Example
{
"eventType": "monetate:record:PageEvents",
"pageEvents": ["myEvent"]
}- monetate:record:Impressions
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:record:Impressions). |
impressionsIds: Array[String] | Yes | The list of impression identifier strings. |
Code Example
{
"eventType": "monetate:record:Impressions",
"impressionIds": [
"3.MS4xLjE1MTQ4MDg5MDAuMDAwMDAw"
]
}- monetate:record:RecClicks
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:record:RecClicks). |
recClicks: Array[String] | Yes | The array of recommendation click tokens to record. |
Code Example
{
"eventType": "monetate:record:RecClicks",
"recClicks": ["rt.1.xxx", "rt.1.yyy"]
}- monetate:record:RecImpressions
Attribute | Required | Description |
|---|---|---|
eventType: String | Yes | Identifies the type of event. Use the name of this event (monetate:record:RecImpressions). |
recImpressions: Array[String] | Yes | The array of recommendation impression tokens to be recorded. |
Code Example
{
"eventType": "monetate:record:RecImpressions",
"recImpressions": ["rt.1.xxx", "rt.1.yyy"]
}cartLine
Attribute | Required | Description |
|---|---|---|
sku: String | Yes | The unique identifier for the product. |
pid: String | Yes | The parent identifier for a related set of SKUs. |
quantity: Number | Yes | The number of items in the cart. |
currency: String | Yes | The currency of the purchase value. |
value: String | Yes | The total value of the items in the specified currency. |
purchaseLine
Attribute | Required | Description |
|---|---|---|
sku: String | Yes | The unique identifier for the product. |
pid: String | Yes | The parent identifier for a related set of SKUs. |
quantity: Number | Yes | The number of items purchased. |
currency: String | Yes | The currency of the purchase value. |
value: String | Yes | The total value of the items in the specified currency. |
product
Attribute | Required | Description |
|---|---|---|
productId: String | Yes | The product ID. |
sku: String | Optional | The unique identifier for the product. |
customVariable
Attribute | Required | Description |
|---|---|---|
variable: String | Yes | The name of the custom variable. |
value: String | Yes | The value of the custom variable. |