This topic describes how to configure a request to the getTrafficReport method.

You can generate two types of traffic reports:

  • A report that covers a date range.
  • A report that covers a set of listings.

Generating a report that covers a date range

To generate a traffic report that covers a specific period of time:

  • Set the dimension query parameter to DAY.
  • Using the filters query parameter:
    • Specify the marketplace you want to target with the marketplace_ids parameter.
    • Set the start and end dates for the report using the date_range parameter.
  • Specify the metrics you want returned using the metric query parameter.

The following example shows a request that returns a Traffic Report based on days:

GET https://api.ebay.com/sell/analytics/v1/traffic_report?
  dimension=DAY&
  filter=marketplace_ids:{EBAY_US},date_range:[20160814..20160824]&
  metric=LISTING_IMPRESSION_SEARCH_RESULTS_PAGE,LISTING_IMPRESSION_STORE

Note: When you make a call to getTrafficReport, all the parameter values in the request must be URL encoded, as described in URL parameters.

Generating a report that covers a set of listings

To generate a traffic report that returns data on specific listings, and sorts the response on a specific metric:

  • Set dimension query parameter to LISTING.
  • Using the filters query parameter:
    • Set the start and end dates for the report using the date_range parameter.
    • Specify the listings on which you want data returned using the listing_ids parameter.
  • Use the metric query parameter to specify the metrics you want returned in the report.
  • Use the sort query parameter to specify the metric upon which you want the report sorted.

The following example shows a request that returns a Traffic Report based on listings. Note that this snippet shows URL-encoded parameter values:

GET https://api.ebay.com/sell/analytics/v1/traffic_report?
  dimension=LISTING&
  filter=listing_ids:%7B1******31|12*****24|12*****51%7D,date_range:%5B20160814..20160824%5D&
  metric=LISTING_IMPRESSION_SEARCH_RESULTS_PAGE,LISTING_IMPRESSION_STORE,LISTING_IMPRESSION_TOTAL&
  sort=LISTING_IMPRESSION_TOTAL

Note: You must URL-encode the special characters that you use to specify lists ({ }) and ranges ([ ]) within the query parameters that you pass in the request. In the example above, this pertains to the listing_ids and date_range query parameters, respectively.

An example response

The response below shows a report that's based on a time range.

The body of the report contains metrics.key fields that show the metric being returned, with each records container holding the dimension and metric values for each of the metrics in the report.

The specified dimension value is returned in the dimensionKeys.key field of the response.

The following response has been edited to save space.

{
  "reportType": "TRAFFIC",
  "header": {
    "dimensionKeys": [  {
      "key": "DAY",
      "localizedName": "day",
      "dataType": "DATE" } ],
    "metrics": [ {
      "key": "LISTING_IMPRESSION_SEARCH_RESULTS_PAGE",
      "localizedName": "Listing impressions from the search results page",
      "dataType": "NUMBER"
    },
    {
      "key": "SALES_CONVERSION_RATE",
      "localizedName": "Sales conversion rate",
      "dataType": "NUMBER"
    }  ]  },
    "records": [
     {
       "dimensionValues": [
       {
         "value": "Wed Jun 01 00:00:00 GMT-07:00 2016",
         "applicable": true
	}  ],
       "metricValues": [
         {
	    "value": 655,
	    "applicable": true
	  },
	  {
	    "value": 125,
	    "applicable": true
	}  ],
  "startDate": "2016-06-01T07:00.00.000Z",
  "endDate": "2016-08-29T06:59.059Z",
  "lastUpdatedDate": "2016-09-02T06:59.059Z"
}

Using different metric parameters

To specify different metrics returned in the report, specify one or more metrics in a comma-separated list. For example:

metric=LISTING_IMPRESSION_SEARCH_RESULTS_PAGE,LISTING_IMPRESSION_STORE

Specify the metrics using any of the values in the following table.

Metric

Description

CLICK_THROUGH_RATE

The number of times an item displays on the search results page divided by the number of times buyers clicked through to its View Item page.

Localized name: Click through rate

LISTING_IMPRESSION_SEARCH_RESULTS_PAGE

The number of times the seller's listings displayed on the search results page. Note that the listing might not have been visible to the buyer due to its position on the page.

Localized name: Listing impressions from the search results page

LISTING_IMPRESSION_STORE

The number of times the seller's listings displayed on the seller's store. Note that the listing might not have been visible to the buyer due to its position on the page.

Localized name: Listing impressions from your Store

LISTING_IMPRESSION_TOTAL

The total number of times the seller's listings displayed on the search results page OR in the seller's store, which may or may not match the Seller Hub performance/traffic page.

The item is counted each time it displays on either page. Note that the listing might not have been visible to the buyer due to its position on the page.

This number sums: LISTING_IMPRESSION_SEARCH_RESULTS_PAGE + LISTING_IMPRESSION_STORE.

Localized name: Total listing impressions

Note: Use the TOTAL_IMPRESSION_TOTAL metric to retrieve the total number of times the seller's listings have displayed on any page or flow (which matches the Seller Hub performance/traffic page value).

LISTING_VIEWS_SOURCE_DIRECT

The number of times a View Item page was directly accessed, such as when a buyer navigates to the page using a bookmark.

This metric supports a two-year query range.

Localized name: Direct views

LISTING_VIEWS_SOURCE_OFF_EBAY

The number of times a View Item page was accessed via a site other than eBay, such as when a buyer clicks on a link to the listing from a search engine page.

Localized name: Off eBay views

LISTING_VIEWS_SOURCE_OTHER_EBAY

The number of times a View Item page was accessed from an eBay page that is not either the search results page or the seller's store.

Localized name: Views from non-search and non-store pages within eBay

LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE

The number of times the item displayed on the search results page.

Localized name: Views on the search results page

LISTING_VIEWS_SOURCE_STORE

The number of times a View Item page was accessed via the seller's store.

Localized name: Views from your Store

LISTING_VIEWS_TOTAL

Total number of listings viewed. This number sums:

LISTING_VIEWS_SOURCE_DIRECT +

LISTING_VIEWS_SOURCE_OFF_EBAY +

LISTING_VIEWS_SOURCE_OTHER_EBAY +

LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE +

LISTING_VIEWS_SOURCE_STORE

Localized name: Total views

SALES_CONVERSION_RATE

The number of completed transactions divided by the number of View Item page views. This number equals:

TRANSACTION / LISTING_VIEWS_TOTAL

Note: Sorting on the SALES_CONVERSION_RATE metric is not supported.

Localized name: Sales conversion rate

TOTAL_IMPRESSION_TOTAL

This value is the total number of times the seller's listings have displayed on any page or flow, and matches the value on the Seller Hub performance/traffic page. It includes the impressions from the LISTING_IMPRESSION_TOTAL metric plus any other impressions including those listings that display on pages other than search result and store.

The item is counted each time it displays on either page. Note that the listing might not have been visible to the buyer due to its position on the page.

Note: If the value returned for this metric does not match the value on the Seller Hub performance/traffic page, make sure your time zone has been specified through the date_range filter.

Localized name: Total impressions

TRANSACTION

The total number of completed transactions.

Note: The TRANSACTION metric can only be sorted in the descending order (sorting in the ascending order is not supported).

Localized name: Transaction count