SDK Event Details

This article provides details and descriptions for the event JSON objects.

Required attributes are in bold.

monetate:context:ipAddress

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
ipAddress: String The IP address to send.

Example

{
  "eventType": "monetate:context:IpAddress",
  "ipAddress": "198.51.100.0"
}

monetate:context:PageView

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
url: String The complete URL for the page viewed. Optional if pageType is specified.
pageType: String The path of the URL for the page viewed. Optional if URL is specified.
categories: Array Categories to filter against. Only matching actions are evaluated.
breadcrumbs: Array Breadcrumbs to filter against. Only matching actions are evaluated.

Example

{
  "eventType": "monetate:context:PageView",
  "url": "http://www.monetate.com/index.html",
  "pageType": "home",
  "categories": ["category"],
  "breadcrumbs": ["breadcrumb"]
}

monetate:context:Cart

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
cartLines: Array[cartLine] The contents of the cart. Refer to cartLine for details.

Example

{
  "eventType": "monetate:context:Cart",
  "cartLines": [{
    "sku": "SKU1",
    "pid": "PID1",
    "quantity": 2,
    "currency": "USD",
    "value": "24.00"
  }]
}

monetate:context:AddToCart

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
cartLines: Array[cartLine] The item to add to the cart. Refer to cartLine for details.

Example

{
  "eventType": "monetate:context:Cart",
  "cartLines": [{
    "sku": "SKU1",
    "pid": "PID1",
    "quantity": 2,
    "currency": "USD",
    "value": "24.00"
  }]
}

monetate:context:Purchase

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
account: String The account ID.
domain: String The account domain.
instance: String The type of instance.
purchaseId: String The unique identifier for the purchase.
purchaseLines: Array[purchaseLine] The contents of the purchase. Refer to purchaseLine for details.

Example

{
  "eventType": "monetate:context:Purchase",
  "account": "3",
  "domain": "example.com",
  "instance": "p",
  "purchaseId": "1b2c3d",
  "purchaseLines": [{
    "sku": "SKU1",
    "pid": "PID1"
    "quantity": 2,
    "currency": "USD",
    "value": "24.00"
  }]
}

monetate:context:Metadata

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
metadata: Object Additional custom data to send.
language: String The language of the device or app.

Example

{
  "eventType": "monetate:context:Metadata",
  "metadata": {
    "language": "en-GB"
  }
}

monetate:context:ProductDetailView

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
products: Array[product] The list of products to display. Refer to product for details.

Example

{
  "eventType": "monetate:context:ProductView",
  "products": ["product72", "product43", "product42"]
}

monetate:context:ProductThumbnailView

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
products: Array[product] The list of products to display. Refer to product for details.

Example

{
  "eventType": "monetate:context:ProductThumbnailView",
  "products": ["product72", "product43", "product42"]
}

monetate:context:Coordinates

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
latitude: String The latitude of the user.
longitutde: String The longitude of the user.

Example

{
  "eventType": "monetate:context:Coordinates",
  "latitude": "49.566667",
  "longitude": "10.883333" 
}

monetate:context:ScreenSize

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
height: Number The height of the device.
width: Number The width of the device.

Example

{
  "eventType": "monetate:context:ScreenSize",
  "height": 762,
  "width": 1024
}

monetate:context:CustomVariables

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
customVariables: Array[CustomVariables] An array of custom variables.
variable: String The name of the custom variable
value: String The value of the custom variable.

Example

{
  "eventType": "monetate:context:CustomVariables",
  "customVariables": [{
    "variable": "favoriteTeam",
    "value": "Blue Hens"
  }]
}

monetate:context:UserAgent

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
userAgent: String The user agent header value.

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 Description
eventType: String Identifies the type of event. Use the name of this event.
referrer: String The referring URL.

Example

{
  "eventType": "monetate:context:Referrer",
  "referrer": "http://www.example.com"
}

monetate:context:ClosedSession

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
closedSession: Object The closed session object retrieved from the closed session stream.
version: String The version of the closed session object.

Example

{
  "eventType": "monetate:context:ClosedSession",
  "closedSession": {"account_id": 123, "has_cart": "t", "has_purchase": "f", ...}
  "version": "2.0"
}

monetate:record:PageEvents

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
pageEvents: Array[String] The array of page events.

Example

{
  "eventType": "monetate:record:PageEvents",
  "pageEvents": ["myEvent"]
}

monetate:record:Impressions

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
impressionsIds: Array[String] The list of impression identifier strings.

Example

{
  "eventType": "monetate:record:Impressions",
  "impressionIds": [
    "3.MS4xLjE1MTQ4MDg5MDAuMDAwMDAw"
  ]
}

monetate:record:RecClicks

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
recClicks: Array[String] The array of recommendation click tokens to record.

Example

{
  "eventType": "monetate:record:RecClicks",
  "recClicks": ["rt.1.xxx", "rt.1.yyy"]
}

monetate:record:RecImpressions

Attribute Description
eventType: String Identifies the type of event. Use the name of this event.
recImpressions: Array[String] The array of recommendation impression tokens to be recorded.

Example

{
  "eventType": "monetate:record:RecImpressions",
  "recImpressions": ["rt.1.xxx", "rt.1.yyy"]
}

cartLine

Attribute Description
sku: String The unique identifier for the product.
pid: String The parent identifier for a related set of SKUs.
quantity: Number The number of items in the cart.
currency: String The currency type of the purchase value.
value: String The total value of the items in the specified currency.

purchaseLine

Attribute Description
sku: String The unique identifier for the product.
pid: String The parent identifier for a related set of SKUs.
quantity: Number The number of items in the cart.
currency: String The currency type of the purchase value.
value: String The total value of the items in the specified currency.

product

Attribute Description
productId: String The product ID.
sku: String The unique identifier for the product.