Analyze Your Buy with Prime Metrics

πŸ“˜

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.

To gain insight into shopper behavior, you can track user events such as page views and clicks. You choose which user events to track, and then they are processed and stored in your Buy with Prime account within fifteen minutes of receiving the event. The Buy with Prime API can capture up to 50 events in a single call.

You can use the resulting events to calculate metrics such as click-through rate, checkout-abandonment rate, and conversion for Buy with Prime-enabled products on your site to include in business reports or dashboards.

You can track user events in the following ways:

  • Server-side: This is the tracking method we recommend. In this method, your server sends events to the Buy with Prime API. This approach is the most reliable and the easiest to maintain, because the server is an environment that you control. As such, you can add tracking in one place (your servers) rather than in diverse places (web, iOS, Android). However, server-side tracking has limitations with respect to capturing certain shopper interactions. A server-side event can be captured when a page loads, but it might not be able to determine if the page was actually rendered. Similarly, not every click, hover, or scrolling action leads to a back-end service call, and therefore can’t be captured with server-side tracking alone.
  • Client-side: In this method, events are generated on the shopper's desktop or mobile device and sent to the Buy with Prime API. It can capture granular interactions like clicks, hovers, and scrolling. Client-side tracking is less reliable than server-side because it may be obstructed by ad-blockers, browser settings and network issues. It's also harder to maintain across multiple platforms, because it might involve redeploying your app to web and mobile clients. We therefore recommend that you track everything you can by using your servers, and only supplement that with client-side tracking when necessary.

Regardless of whether you send server-side or client-side events, we recommend that you call the sendUserEvents mutation asynchronously so that you can track events in a non-blocking way. The following example shows a non-blocking API call.

// Async client trackEventsMutation = async(mutation) => { const res = await fetch(buyWithPrimeUrl, { method: "POST", headers: buyWithPrimeHeaders, mutation }); return res.json(); }

For examples, see Send User Events for Buy with Prime. Every user event has its own schema, which contains a list of fields that the user event can capture based on the user event type. For details, see Analytics Event Schema.

To get the user event data that you generate, reach out to your Buy with Prime solutions architect.

API operations

You use the following mutations, queries, and events to analyze metrics.

Mutations

NameDescription
sendUserEventsSend user events to analytics.

Queries

None.

Events

None.

Related topics


Did this page help you?