Analytics 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.

This topic shows the fields that you include in events that you send to the Buy with Prime Analytics interface. Some fields are provided by default. You can emit additional optional properties in the additionalProperties list within the event.

Schema

This section shows the schema for the events that you send by using the sendUserEvents mutation. The required fields must be in a particular format; failure to conform to the suggested format leads to a validation exception, and the event is dropped.

The optional properties suggest a format for the given value but are not strictly validated against the suggested format. Some of the optional properties might not be applicable to the way you track events. For example, server-side events might not contain screen height or width level information as part of the event.

If you don't specify a schemaName, the schema defaults to a schema with all attributes. If you don't specify a schemaVersion, the event is validated against the latest default schema, which contains all possible fields.

Fields

Field NameData TypeRequired?Description
eventNameStringYes

Type of event. Valid values:

  • page-load: After putting Buy with Prime products in their cart and successfully logging in to their Amazon account, the shopper views the pre-order review page or the post-order confirmation page.
  • click: The shopper adds a Buy with Prime product to their cart or they click the Buy with Prime button to start checkout.
  • widget-viewed: The Prime badge is loaded and rendered on a page.
  • bwp-widget-promise-loaded: The Buy with Prime delivery estimate is loaded or the shopper switches to a different variant within the same product detail page.
eventIdStringYesUUID (v4) for each event emitted. This ID doesn't need to be globally unique across clients.
timestampDateTimeYesDate-time string for 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 for representation of dates and times using the Gregorian calendar.
clientTypeEnumYesType of client. Valid values: ClientType.WEB_CLIENT, ClientType.SERVER_CLIENT, ClientType.ANDROID, ClientType.IOS.
clientVersionStringYesVersion number of the client. Example: 10.
applicationIdStringYesDescriptive string of the application that publishes the event. Valid values: STORE_FRONT_WEBSITE,SHOPIFY_STOREFRONT, SFCC_STOREFRONT (for Salesforce Commerce Cloud).
schemaNameStringNoName of the schema. If not specified, the schema defaults to a schema with all attributes.
schemaVersionStringNoVersion number of the schema. If not specified, the version number defaults to the latest schema version.
additionalPropertiesProperty TupleNoAny additional properties that you add to the 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 event.

Field NameData TypeRequired?Description
ipStringNoClient network IP address.
currentUrlStringNo(Web-generated 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.
referrerStringNo(Web-generated 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.
pageViewIdStringNoUnique ID for each page view and subsequent custom events fired from the same page.
userAgentStringNoRaw user agent HTTP value.
ubidStringNoRandom 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.
sessionIdStringNoUnique identifier for a web session.
screenHeightStringNoBrowser screen height.
screenWidthStringNoBrowser screen width.
initialReferrerStringNoInitial URL or URI that referred the user to the current URL.
pageTypeStringNoType of page. Examples: cart, checkout, pdp (product detail page).
pageActionStringNoAction taken on the page. Examples: bwp-button-clicked, checkout-clicked.

Related topics