avatarNassuf Mmadi

Summary

The article explains how to get page views and sessions using Amazon SP-API.

Abstract

The article is about getting data such as page views and sessions from Amazon's Selling-Partner API (SP-API), which was released in September 2021. The author mentions that getting this data is not straightforward and provides a solution involving the GET_SALES_AND_TRAFFIC_REPORT report from the ReportAPI. The article also mentions that the official documentation is not up to date and recommends saving a different SP-API documentation. The process of getting the report involves 3 steps: create, check, download & decrypt. The report includes page views, sessions, and other data like units ordered, average units per order item for B2B, buy box percentage, negative feedbacks received, etc. The article also mentions a potential problem with the dataset for ASIN, which will be for all the period, and suggests generating one report per day to get daily data by product.

Opinions

  • The author expresses frustration with the difficulty of getting data from the SP-API.
  • The author recommends saving a different SP-API documentation that seems more up to date.
  • The author mentions that generating a report can take a lot of time.
  • The author suggests generating one report per day to get daily data by product.
  • The author encourages readers to share what they are building with the SP-API and offers help.

How to get page views and sessions using Amazon SP-API

Customizable reports from datamz.me

September 2021, Amazon release their Selling-Partner API ! A brand new one that is replacing their olding MWS API.

Getting data as basic as page views and sessions from a modern API should be easy right ? Well, I guess you are reading this because it’s not 😄

Here is the solution I finally found.

The short answer

Get the GET_SALES_AND_TRAFFIC_REPORT report from the ReportAPI

Read more…

Among the +1200 opened issues on their github today, you might seen this one. 30 developers, struggling like us to get this data !

Until a few weeks ago, it was just impossible to get. When I am writing this article, the official documentation is still not up to date. It doesn’t contain any information about how to get a product’s sessions and page views.

Thanks to @cccaimingjian I discovered there is another SP-API documentation, different than the official one.

Here it is: https://developer-docs.amazon.com/sp-api/docs/

I recommend you saving it as it seem more up to date.

Let’s get that report !

Getting a report from the SP-API involves 3 steps. Create, check, download & decrypt. If you are not familiar with those steps, you can read how to do so in this article.

This report includes page views, sessions and much more data like units ordered, average units per order item for B2B, buy box percentage, negative feedbacks received etc.

To get this report you will need to provide:

  • dataStartTime : > 2 years before
  • optionnal dataEndTime
  • dateGranularity option, that can be DAY, WEEK or MONTH
  • asinGranularity option among PARENT, CHILD, SKU

You will get all the data you need, for each day, week, or month depending on the dateGranularity you choose !

Problem ? 👀

The thing is, the dataset for ASIN will be for all the period.

Let's say you want to get your product sku’s daily buy box percentage since January 1st. You set dataStartTime to Jan 1st, dataGranularity to DAY, and asinGranularity to SKU. Well, you will get:

  • Your daily buy box percentage (+ other data) for ALL products
  • Your average buy box percentage FROM 1st Jan to know for each product.

If you want to know your daily data by product you will have to generate one report per day.

As generating a report means creating a report and waiting until it is processed, this process can take a lot of time.

Apart from that usecase, we are finally able to get pages views, sessions, shipped items and much more insights directly via the SP-API and that’s great !

What are you building ?

Let me know in the comment or by message what you are building with the SP-API. As I am working on things to make Amazon data easy to access, there is a chance I can help you !

Amazon Sp Api
API
Amazon Sellers
Amazon Fba
Recommended from ReadMedium