Hi Jonathan,
Thanks for reaching out to us.
In the UI's perspective, you may only filter on the Device category dimension by means of 'is any of' and 'is none of' which are two totally different filters. On the other hand, 'contains' and 'does not contain' filters on names or a specific word; thus making use of LIKE in that sense. In the API's perspective, filtering on IDs is highly recommended over filtering on names. Do keep in mind that if you're filtering on names, matching is case sensitive. More information on building statements here.
The ID of the Device category Smartphone is 30001 (can be retrieved by querying the Device_Category table from the PublisherQueryLanguageService) which you may filter on instead. To add further to that, if you'll try the filter syntax of 'contains' with the dimension DEVICE_CATEGORY_NAME, it will return the error INVALID_DIMENSION_FILTERS. That being said, kindly refer to the syntax I'll be showing below for your whole inquiry:
.where("DEVICE_CATEGORY_ID IN (30001) AND NOT AD_UNIT_NAME LIKE '%fansided%'");
Lastly, please note that the Ad Manager API only reflects the behaviour of the Ad Manager UI. I would recommend using the UI for this purpose by building the report queries there, as it's easier to check for compatibility issues, and retrieving them with the ReportService.getSavedQueriesByStatement method; also so you may find out the corresponding allowable filter or syntax.
Let me know how it goes or if you have any further clarifications regarding the API.
Regards,
|
||||||