Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

API request with product performance metrics to manipulate the sorting of search result

alexanderg32535
Level 2
Level 2

Hi all

In order for us to optimize the sort of our search results, we are currently working on building an Analytics API request containing a segment, filters, a dimension and several metrics. Although we have access to the API documentation, it seems to lack information necessary for our objective.

Unfortunately the API Docu doesn't seem to explain how to filter by a dimension item. It is crucial that we filter by dimension item and not by segment as there is a difference in data precision between filtering by dimension item and by hit segment.

Following please find the current API request. I would be very grateful for your feedback in a timely manner.

Best

Alex

-------------------------------------------------------------

{

  "rsid": "dtodertourprod",

  "globalFilters":[

    {

      "type":"dateRange",

      "dateRange":"2018-05-09T00:00:00.000/2018-11-08T23:59:59.999"

    },

    {

      "type":"segment",

      "segmentId":"5be18f258907f823ceb10700"

    }

  ],

  "metricContainer":{

    "metrics":[

       {

         "columnId":"0",

         "id":"metrics/productinstances"

       },

       {

         "columnId":"1",

         "id":"metrics/orders"

       },

       {

         "columnId":"2",

         "id":"metrics/revenue"

       }

    ]

  },

  "dimension":"variables/product",

  "settings": {

    "limit": "50"

  }

}

-------------------------------------------------------------

0 Replies