Campaign Criteria Report

102 views
Skip to first unread message

james...@netnatives.co.uk

unread,
Oct 26, 2017, 9:43:02 AM10/26/17
to AdWords API Forum
Hello,

Does anybody have a working example of pulling a CAMPAIGN_CRITERIA_REPORT?

I'm looking to send the data to BigQuery but have come across no working examples of the report. I'm particularly interested in whether I can filter out certain CriteriaTypes.

The python API has this example:

selector = {
'fields': ['CampaignId', 'Id', 'CriteriaType', 'PlatformName',
'LanguageName', 'LocationName', 'KeywordText'],
'predicates': [{
'field': 'CriteriaType',
'operator': 'IN',
'values': ['KEYWORD', 'LANGUAGE', 'LOCATION', 'PLATFORM']
}],
'paging': {
'startIndex': str(offset),
'numberResults': str(PAGE_SIZE)
}
}

But I can't bring through the fields 'LocationName' / 'KeywordText' etc when using the AdWords Scripts equivalent.

Any advice much appreciated.


Sreelakshmi Sasidharan (AdWords API Team)

unread,
Oct 26, 2017, 2:47:08 PM10/26/17
to AdWords API Forum
Hi James, 

You can use CriteriaType and Criteria fields to get the type and the description of the campaign criterion. Please check the report definition given below for reference: 

 report = {
     
'reportName': 'Last 7 days CAMPAIGN_CRITERIA_REPORT',
     
'dateRangeType': 'LAST_7_DAYS',
     
'reportType': 'CAMPAIGN_CRITERIA_REPORT',
     
'downloadFormat': 'CSV',
     
'selector': {
         
'fields': ['CampaignId','Id', 'CriteriaType', 'Criteria'],

         
'predicates': [{
         
'field': 'CriteriaType',
         
'operator': 'IN',
         
'values': ['KEYWORD', 'LANGUAGE', 'LOCATION', 'PLATFORM']
     
}]
     
}
 
}


Also, the fields 'PlatformName','LanguageName', 'LocationName', 'KeywordText' are not supported for CAMPAIGN_CRITERIA_REPORT. You can find the supported fields here. If you have any questions specific to AdWords Scripts, could you please post that in the AdWords Scripts forum?

Thanks,
Sreelakshmi, AdWords API Team
Reply all
Reply to author
Forward
0 new messages