'How can I get item views from ebay api for my seller account?

I have a seller and a developer account for the ebay api. I need to get traffic data, specifically the number of times one of my items was viewed. I think I can do this by retrieving my items with GetSellerList which should include a HitCount attribute, but it returns an empty ItemArray object even though I'm sure the seller account has items.

Here is the body of the request:

<?xml version="1.0" encoding="utf-8"?>
<GetSellerListRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
    <eBayAuthToken>access_token</eBayAuthToken>
  </RequesterCredentials>
  <!-- Call-specific Input Fields -->
  <AdminEndedItemsOnly>False</AdminEndedItemsOnly>
  <GranularityLevel>Medium</GranularityLevel>
  <IncludeVariations>True</IncludeVariations>
  <IncludeWatchCount>True</IncludeWatchCount>
  <Pagination> PaginationType
    <EntriesPerPage>100</EntriesPerPage>
    <PageNumber>1</PageNumber>
  </Pagination>
  <Sort>1</Sort>
  <StartTimeFrom>2022-04-15T19:09:02.768Z</StartTimeFrom>
  <StartTimeTo>2022-04-21T16:09:02.768Z</StartTimeTo>
  <!-- Standard Input Fields -->
  <DetailLevel>ReturnAll</DetailLevel>
  <!-- ... more DetailLevel values allowed here ... -->
  <ErrorLanguage> string </ErrorLanguage>
  <MessageID> string </MessageID>
  <WarningLevel>Low</WarningLevel>
</GetSellerListRequest>

Here are the headers:

X-EBAY-API-APP-NAME: app_name
X-EBAY-API-CALL-NAME: GetSellerList
X-EBAY-API-REQUEST-ENCODING: XML
X-EBAY-API-SITEID: 0
X-EBAY-API-DEV-NAME: some_code
X-EBAY-API-CERT-NAME: some code
X-EBAY-API-COMPATIBILITY-LEVEL: 825
Content-Type: text/xml

And the url : https://api.ebay.com/ws/api.dll

method: POST.

I can't figure out why I keep getting the following response with no items:

<?xml version="1.0" encoding="UTF-8"?>
<GetSellerListResponse xmlns="urn:ebay:apis:eBLBaseComponents">
    <Timestamp>2022-04-21T14:44:03.680Z</Timestamp>
    <Ack>Success</Ack>
    <CorrelationID> string </CorrelationID>
    <Version>1173</Version>
    <Build>E1173_CORE_APISELLING_19187371_R1</Build>
    <ItemArray/>
</GetSellerListResponse>

I have tried playing with the date range and the GranularityLevel, but I still get an empty ItemArray.

Any help would be much appreciated.



Solution 1:[1]

If your target is to get item view count of your item only, the easiest and best solution is to add a tracking pixel/web beacon in each listing in way to get not only the count of views but also date, time and location of viewer.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Joe