I'm trying to pull the ad schedules for all of our ads which are run on a schedule to create an alert which will check whether ads are activated when they are supposed to.
Following
this post I came up with the following solution:
I'm trying to pull this info using the following report definition (Ruby format, minimalized for debugging):
criterion_definition = {
selector: {
fields: ['Criteria', 'CriteriaType'],
predicates: [{
field: 'CriteriaType',
operator: 'EQUALS',
values: ['AD_SCHEDULE']
}]
},
report_name: 'ad_schedule_test',
report_type: 'CRITERIA_PERFORMANCE_REPORT',
download_format: 'CSV',
date_range_type: 'ALL_TIME',
}
When I leave out the predicate for selecting only AD_SCHEDULE it returns a large amount of results, with CriteriaTypes such as Keyword, Age, User Interest. However, it won't return any Ad_Schedule despite the fact that we have quite a few campaigns using ad schedule, as shown in the screenshot. Is there an issue with the report definition I'm using? Or is there a different report type that would work better for my intended use case?