User event data specifications
HOME
, LAND
Event Types
HOME
, LAND
Event TypesThese event types’ JSON payloads are identical.
HOME
event type is when a shopper views your website's main or home page.LAND
event type is when a shopper is visiting your website from an external source (ex. Google Shopping).
JSON body parameters
Name | Data Type | Required or Recommended | Description |
---|---|---|---|
id | String (up to 128 characters) | Required | Unique ID of a User Event generated by the Platform. Moloco Commerce Media uses it for various purposes, like data deduplication. |
event_type | string | Required | Set value as HOME or LAND |
timestamp | string | Required | Unix timestamp in milliseconds– not seconds – that the event happened at. (e.g., 1617870506121 ) |
channel_type | string | Required | Use APP if the data source was a mobile app.Use SITE if it was from a web app. |
page_id | string (up to 128 characters) | Recommended | Page ID should be a uniquely assigned value for each page in the app or website. Provide a string that can identify the context of the event, such as electronics , categories/12312 , azd911d or /classes/foo/lectures/bar . Any value will be acceptable if it helps identify unique pages. |
user_id | string (up to 128 characters) | Required | Logged-in user ID of the platform. Do not use this field if the user is not logged in. We recommended hashing the user ID before sending. |
device.persistent_id | string (up to 128 characters) | Required | Identifier for tracking users regardless of sign-in status. Please follow Generating persistent identifiers for more details. |
referrer_page_id | string (up to 128 characters) | Recommended | Similar to the referrer in HTTP, this value indicates from which page the user came to the current page. |
device | object | Recommended | Device information that the user event generated from. |
JSON body parameter example
{
"id": "164686671692740224564",
"event_type": "HOME",
"timestamp": "1692740224564",
"channel_type": "APP",
"user_id": "yKDTEr",
"session_id": "617949A9D05448498064F878AE85740E1692740027697",
"referrer_page_id": "https://mycommerce.com/category/furniture",
"device": {
"os": "iOS",
"os_version": "14.4.1",
"advertising_id": "7acefbed-d1f6-4e4e-aa26-74e93dd017e4",
"persistent_id": "617949A9-D054-4849-8064-F878AE85740E",
"model": "iPhone 11 Pro",
"ua": "Mozilla/5.0",
"language": "en",
"ip": "216.212.237.213"
}
}
ITEM_PAGE_VIEW
, ADD_TO_CART
, and ADD_TO_WISHLIST
Event Types
ITEM_PAGE_VIEW
, ADD_TO_CART
, and ADD_TO_WISHLIST
Event TypesThree event types’ JSON payloads are identical.
ITEM_PAGE_VIEW
event type is when a shopper visits a product detail page.ADD_TO_CART
event type is when a shopper adds an item to the cart.ADD_TO_WISHLIST
event type is when a shopper puts an item into the wish list.
JSON body parameters
Name | Data Type | Required or Recommended | Description |
---|---|---|---|
id | String (up to 128 characters) | Required | Unique ID of a User Event generated by the Platform. Moloco Commerce Media uses it for various purposes, like data deduplication. |
event_type | string | Required | Set value as ITEM_PAGE_VIEW, ADD_TO_CART , or ADD_TO_WISHLIST . |
timestamp | string | Required | Unix timestamp in milliseconds– not seconds – that the event happened at. (e.g., 1617870506121 ) |
channel_type | string | Required | Use APP if the data source was a mobile app.Use SITE if it was from a web app. |
items | array of objects | Required | Set the item id information as a JSON object [{ "id": "173762" }] |
page_id | String (up to 128 characters) | Recommended | Page ID should be a uniquely assigned value for each page in the app or website. Provide a string that can identify the context of the event, such as electronics , categories/12312 , azd911d or /classes/foo/lectures/bar . Any value will be acceptable if it helps identify unique pages. |
user_id | String (up to 128 characters) | Required | Logged-in user ID of the platform. Do not use this field if the user is not logged in. We recommend hashing the user id before sending. |
device.persistent_id | String (up to 128 characters) | Required | Identifier for tracking users regardless of sign-in status. Please follow Generating persistent identifiers for more details. |
referrer_page_id | String (up to 128 characters) | Recommended | Similar to the referrer in HTTP, this value indicates from which page the user came to the current page. |
device | object | Recommended | Device information that the user event generated from. |
JSON body parameter example
{
"id": "164686671692740224564",
"event_type": "ITEM_PAGE_VIEW",
"timestamp": "1692740224564",
"channel_type": "APP",
"items": [
{
"id": "173762"
}
],
"user_id": "yKDTEr",
"session_id": "617949A9D05448498064F878AE85740E1692740027697",
"referrer_page_id": "https://mycommerce.com/category/furniture",
"device": {
"os": "iOS",
"os_version": "14.4.1",
"advertising_id": "7acefbed-d1f6-4e4e-aa26-74e93dd017e4",
"persistent_id": "617949A9-D054-4849-8064-F878AE85740E",
"model": "iPhone 11 Pro",
"ua": "Mozilla/5.0",
"language": "en",
"ip": "216.212.237.213"
}
}
SEARCH
Event Type
SEARCH
Event TypeSEARCH
event type is when a shopper searches items with keywords or phrases from your site.
JSON body parameters
Name | Data Type | Required or Recommended | Description |
---|---|---|---|
id | String (up to 128 characters) | Required | Unique ID of a User Event generated by the Platform. Moloco Commerce Media uses it for various purposes, like data deduplication. |
event_type | string | Required | Set value as SEARCH |
timestamp | string | Required | Unix timestamp in milliseconds– not seconds – that the event happened at. (e.g., 1617870506121 ) |
channel_type | string | Required | Use APP if the data source was a mobile app.Use SITE if it was from a web app. |
search_query | string | Required | Query string for the search. |
page_id | string (up to 128 characters) | Recommended | Page ID should be a uniquely assigned value for each page in the app or website. Provide a string that can identify the context of the event, such as electronics , categories/12312 , azd911d or /classes/foo/lectures/bar . Any value will be acceptable if it helps identify unique pages. |
user_id | String (up to 128 characters) | Required | Logged-in user ID of the platform. Do not use this field if the user is not logged in. We recommended hashing the user id before sending. |
device.persistent_id | String (up to 128 characters) | Required | Identifier for tracking users regardless of sign-in status. Please follow Generating persistent identifiers for more details. |
referrer_page_id | String (up to 128 characters) | Recommended | Similar to the referrer in HTTP, this value indicates from which page the user came to the current page. |
device | object | Recommended | Device information that the user event generated from. |
JSON body parameter example
{
"id": "164686671692740224564",
"event_type": "SEARCH",
"timestamp": "1692740224564",
"channel_type": "APP",
"search_query": "microwave ovens",
"user_id": "yKDTEr",
"session_id": "617949A9D05448498064F878AE85740E1692740027697",
"referrer_page_id": "https://mycommerce.com/category/furniture",
"device": {
"os": "iOS",
"os_version": "14.4.1",
"advertising_id": "7acefbed-d1f6-4e4e-aa26-74e93dd017e4",
"persistent_id": "617949A9-D054-4849-8064-F878AE85740E",
"model": "iPhone 11 Pro",
"ua": "Mozilla/5.0",
"language": "en",
"ip": "216.212.237.213"
}
}
PAGE_VIEW
Event Type
PAGE_VIEW
Event TypePAGE_VIEW
event type is when a shopper visits a page other than the product detail pages or the home page of your site.
JSON body parameters
Name | Data Type | Required or Recommended | Description |
---|---|---|---|
id | String (up to 128 characters) | Required | Unique ID of a User Event generated by the Platform. Moloco Commerce Media uses it for various purposes, like data deduplication. |
event_type | string | Required | Set value as PAGE_VIEW |
timestamp | string | Required | Unix timestamp in milliseconds– not seconds – that the event happened at. (e.g., 1617870506121 ) |
channel_type | string | Required | Use APP if the data source was a mobile app.Use SITE if it was from a web app. |
page_id | String (up to 128 characters) | Required | Page ID should be a uniquely assigned value for each page in the app or website. Provide a string that can identify the context of the event, such as "electronics ", "categories/12312" , "azd911d" or "/classes/foo/lectures/bar". Any value will be acceptable if it helps identify unique pages. |
user_id | String (up to 128 characters) | Required | Logged-in user ID of the platform. Do not use this field if the user is not logged in. We recommended hashing the user ID before sending. |
device.persistent_id | String (up to 128 characters) | Required | Identifier for tracking users regardless of sign-in status. Please follow Generating persistent identifiers for more details. |
referrer_page_id | String (up to 128 characters) | Recommended | Similar to the HTTP referrer, this value indicates from which page the user came to the current page. |
device | Object | Recommended | Device information that the user event generated from. |
JSON body parameter example
{
"id": "164686671692740224564",
"event_type": "PAGE_VIEW",
"timestamp": "1692740224564",
"channel_type": "APP",
"page_id": "electronics",
"user_id": "yKDTEr",
"session_id": "617949A9D05448498064F878AE85740E1692740027697",
"referrer_page_id": "https://mycommerce.com/category/furniture",
"device": {
"os": "iOS",
"os_version": "14.4.1",
"advertising_id": "7acefbed-d1f6-4e4e-aa26-74e93dd017e4",
"persistent_id": "617949A9-D054-4849-8064-F878AE85740E",
"model": "iPhone 11 Pro",
"ua": "Mozilla/5.0",
"language": "en",
"ip": "216.212.237.213"
}
}
PURCHASE
Event Type
PURCHASE
Event TypePURCHASE
event type is when a shopper purchases a product.
JSON body parameters
Name | Data Type | Required or Recommended | Description |
---|---|---|---|
id | String (up to 128 characters) | Required | Unique ID of a User Event generated by the Platform. Moloco Commerce Media uses it for various purposes, like data deduplication. |
event_type | String | Required | Set value as PURCHASE |
timestamp | String | Required | Unix timestamp in milliseconds– not seconds – that the event happened at. (e.g., 1617870506121 ) |
channel_type | String | Required | Use APP if the data source was a mobile app.Use SITE if it was from a web app. |
items | Array of Objects | Required | List of items with item ID and price information. Example: "items": [{ "id": "396172", "price": { "currency": "USD", "amount": "429.98" }, "quantity": "1" }] |
revenue | Object | Required | The total amount of the purchase translation. The amount would be equal to or less than the sum of the item prices, depending on whether you want to represent the price discounts in the sales attribution. Example: "revenue": { "currency": "USD", "amount": "429.98" } |
shipping_charge | Object | Recommended | The shipping cost of the PURCHASE event. Ignore the field if there is no shipping charge.Example: "shipping_charge": { "currency": "USD", "amount": 9.99 } |
user_id | String (up to 128 characters) | Required | Logged-in user ID of the platform. Do not use this field if the user is not logged in. We recommended hashing the user ID before sending. |
device.persistent_id | String (up to 128 characters) | Required | Identifier for tracking users regardless of sign-in status. Please follow Generating persistent identifiers for more details. |
referrer_page_id | String (up to 128 characters) | Recommended | Similar to the referrer in HTTP, this value indicates which page the user came to the current page from. |
device | Object | Recommended | Device information that the user event generated from. |
decision_track_id | String | Optional | A custom attribution tracking field. Please ignore it unless the Moloco team recommends sending the parameter. |
JSON body parameter example
{
"id": "164686671692740224564",
"event_type": "PURCHASE",
"timestamp": "1692740224564",
"channel_type": "APP",
"user_id": "yKDTEr",
"session_id": "617949A9D05448498064F878AE85740E1692740027697",
"referrer_page_id": "https://mycommerce.com/category/furniture",
"items": [
{
"id": "396172",
"price": {
"currency": "USD",
"amount": "429.98"
},
"quantity": "1"
}
],
"revenue": {
"currency": "USD",
"amount": "429.98"
},
"shipping_charge": {
"currency": "USD",
"amount": "11"
},
"device": {
"os": "iOS",
"os_version": "14.4.1",
"advertising_id": "7acefbed-d1f6-4e4e-aa26-74e93dd017e4",
"persistent_id": "617949A9-D054-4849-8064-F878AE85740E",
"model": "iPhone 11 Pro",
"ua": "Mozilla/5.0",
"language": "en",
"ip": "216.212.237.213"
},
"decision_track_id": "208564fc-81af-11ee-b962-0242ac120002"
}
Device object
Device object is a common JSON object for mobile devices' User Event data
Name | Data Type | Required or Recommended | Description |
---|---|---|---|
os | String | Recommended | OS of the device. "iOS" or "Android" must be included for the App channel type. |
os_version | String | Recommended | The device OS version is taken from the device without manipulation or normalization. (e.g., "14.4.1" ) |
advertising_id | String | Recommended | For app traffic, IDFA of iOS or ADID of Android should be filled in this field. (e.g., 7acefbed-d1f6-4e4e-aa26-74e93dd017e4 ) |
device.persistent_id | String (up to 128 characters) | Required | Identifier for tracking users regardless of sign-in status. Please follow Generating persistent identifiers for more details. |
model | String | Recommended | The device model string is taken from the device without manipulation or normalization. (e.g., "iPhone 15 Pro" ) |
ua | String | Recommended | User Agent. (e.g. "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/111FFF" ) |
language | String | Recommended | ISO-639-1 alpha-2 language code. (e.g., "en" ) |
ip | String | Recommended | IP in IPv4 format. (e.g., 216.212.237.213 ) |
...
"device": {
"os": "iOS",
"os_version": "14.4.1",
"advertising_id": "7acefbed-d1f6-4e4e-aa26-74e93dd017e4",
"persistent_id": "617949A9-D054-4849-8064-F878AE85740E",
"model": "iPhone 11 Pro",
"ua": "Mozilla/5.0",
"language": "en",
"ip": "216.212.237.213"
}
...
Updated 29 days ago