User Event Schema
Buy with Prime API is now available for early access
Sign up for early access to the Buy with Prime API using the 'Sign Up' button below. The API may change as Amazon receives feedback and iterates on it.
User events that you send to your Buy with Prime account to Get User Engagement Data use the required schema. If you send an event that doesn't conform to the required format for elements, the user event is dropped and you get a validation exception.
In the user event, if you don't specify a schemaName
and schemaVersion
, the Buy with Prime API uses the latest default schema.
Fields
Field Name | Data Type | Required? | Description |
---|---|---|---|
eventType | String | Yes | Type of user event. Valid values:
|
eventId | String | Yes | UUID (v4) for each user event emitted. This ID doesn't need to be globally unique across clients. |
eventTime | DateTime | Yes | The date and time when the user event was generated in UTC, such as 2007-12-03T10:15:30Z , compliant with the date-time format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard. |
clientType | Enum | Yes | Type of client. Valid values: ClientType.WEBSITE_CLIENT or ClientType.SERVER_CLIENT . |
clientVersion | String | Yes | Version number of the client. Example: 10 . |
schemaName | String | No | Name of the schema. If not specified, the schema defaults to a schema with all attributes. |
schemaVersion | String | No | Version number of the schema. If not specified, the version number defaults to the latest schema version. |
additionalProperties | Property Tuple | No | Any additional properties that you add to the user event. You pass these as a list tuple that contains the property names and values. For the fields, see Additional properties. |
Additional properties
You can include the following optional fields in the additionalProperties
list of the user event.
Field Name | Data Type | Required? | Description |
---|---|---|---|
ip | String | No | Client network IP address. |
currentUrl | String | No | (Web-generated user events only) Web address that the shopper visited. We recommend that you encode this value as a URL and include the complete value of the URL parameters without truncation. |
referrer | String | No | (Web-generated user events only) Web page previously visited before the current page. For example, if a shopper was on http://example.com/product-1 and then clicked a link or button and navigated to another page, the referrer property value is http://example.com/product-1 . In some cases, this value can be a URI. If the shopper visits the web page directly, the value of the property should be $direct . |
pageViewId | String | No | Unique ID for each page view and subsequent custom user events fired from the same page. |
userAgent | String | No | Raw user agent HTTP value. |
ubid | String | No | Random string that persists on user cookies to identify the user's device and anonymous users. This value doesn't change unless the browser cookies are cleared. |
sessionId | String | No | Unique identifier for a web session. |
screenHeight | String | No | Browser screen height. |
screenWidth | String | No | Browser screen width. |
initialReferrer | String | No | Initial URL or URI that referred the user to the current URL. |
pageType | String | No | Type of page. Examples: cart , checkout , pdp (product detail page). |
pageAction | String | No | Action taken on the page. Examples: bwp-button-clicked , checkout-clicked . |
Related topics
Updated 2 days ago