Skip to main content
ryanpraski
Level 4
Sep 3, 2016 12:45 PM UTC
Solved

Are Two or more filter possible in Adobe Analytics API Query?

Is it possible to have 2 or more filters in an Adobe Analytics v1.4 API query or can you only have one filter per query. 

Thanks,

Ryan Praskievicz

www.ryanpraski.com

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ryanpraski
ryanpraskiAccepted solution
Level 4
Sep 6, 2016 4:56 PM UTC

Thanks a lot for the help. I was able to use your example to apply multiple filters to my Adobe Analytics API v 1.4 Real-time query. The code example I used is below.

{ "reportDescription":{ "source": "realtime", "reportSuiteID":"RSID", "metrics":[ {"id":"pageviews"} ], "elements": [ { "id": "page", "search": { "type": "AND", "searches": [ { "type": "OR", "keywords": [ "YYYY", "CCCCCCC" ] }, { "type": "NOT", "keywords": [ "XXXXX" ] } ] } } ] } } 

3 replies

Hyder_Ziaee
Adobe Employee
Adobe Employee
Sep 5, 2016 10:53 AM UTC

Hi Ryan,

The API allows multiple filters as well. Here is an example request:

{ "reportDescription": { "dateFrom": "YYYY-MM-DD", "dateTo": "YYYY-MM-DD", "reportSuiteID": "RSID", "elements": [ { "id": "page", "search": { "type": "or", "searches": [ { "type": "or", "keywords": [ "women", "men" ] }, { "type": "and", "keywords": [ "home" ] } ] } } ] } }
Translate
ryanpraski
ryanpraskiAuthorAccepted solution
Level 4
Sep 6, 2016 4:56 PM UTC

Thanks a lot for the help. I was able to use your example to apply multiple filters to my Adobe Analytics API v 1.4 Real-time query. The code example I used is below.

{ "reportDescription":{ "source": "realtime", "reportSuiteID":"RSID", "metrics":[ {"id":"pageviews"} ], "elements": [ { "id": "page", "search": { "type": "AND", "searches": [ { "type": "OR", "keywords": [ "YYYY", "CCCCCCC" ] }, { "type": "NOT", "keywords": [ "XXXXX" ] } ] } } ] } } 
Translate
Hyder_Ziaee
Adobe Employee
Adobe Employee
Sep 6, 2016 7:36 PM UTC

That's great to know!

Translate