Getting empty criterion_id for placement performance report

28 views
Skip to first unread message

petros...@gmail.com

unread,
Nov 8, 2018, 6:46:27 PM11/8/18
to AdWords API and Google Ads API Forum
Hi,

As the title suggests, I'm getting back ' --' for criterion_id.

Here is my query:

    def get_placements_level_data(self, days_in_duration, till_days_ago):
        report_query = (adwords.ReportQueryBuilder()
                        .Select('AdGroupId', 'AllConversions', 'BiddingStrategyName', 'BiddingStrategyType',
                                'CampaignName', 'CampaignId', 'Clicks', 'Conversions', 'Cost', 'CpcBid',
                                'CpmBid', 'Criteria', 'Id', 'Impressions', 'IsNegative', 'IsRestrict',
                                'VideoViews')
                        .From('PLACEMENT_PERFORMANCE_REPORT')
                        .During(utils.generate_duration(days_in_duration, till_days_ago))
                        .Build())
        return self._get_adwords_metrics(report_query)

I'm working on version v201802.

I can't figure out why this is the case. In the ui, I can see the ids for the account I'm running this on.


petros...@gmail.com

unread,
Nov 8, 2018, 6:49:35 PM11/8/18
to AdWords API and Google Ads API Forum
for more context, the _get_adwords_metrics call this:

    def _get_adwords_metrics(self, report_query, zero_impressions=False):
        retry = 0
        while retry < RETRY_LIMIT:
            try:
                results = self.report_downloader.DownloadReportAsStringWithAwql(
                    report_query,
                    'CSV',
                    skip_report_header=True,
                    skip_column_header=False,
                    skip_report_summary=True,
                    include_zero_impressions=zero_impressions
                )
                return self._csv_to_list(results)
            except:
                self.logger.exception('download report failed. retrying... '
                                      'The query was {}'.format(report_query))
                retry += 1

and when i look at the result returned (the download string), I can see that there is an empty criterion_id.

Luis Xander Talag (AdWords API Team)

unread,
Nov 9, 2018, 1:47:05 AM11/9/18
to AdWords API and Google Ads API Forum
Hi Petros,

Can you provide your clientCustomerId as well so I can further investigate the issue on my end? You can send it to me via Reply privately to author.

Thanks,
Luis
AdWords API Team

On Friday, November 9, 2018 at 7:49:35 AM UTC+8, petrosdawit96 wrote:
for more context, the _get_adwords_metrics call this:

    def _get_adwords_metrics(self, report_query, zero_impressions=False):
        retry = 0
        while retry < RETRY_LIMIT:
            try:
                results = self.report_downloader.DownloadReportAsStringWithAwql(
                    report_query,
                    'CSV',
                    skip_report_header=True,
                    skip_column_header=False,
                    skip_report_summary=True,
                    include_zero_impressions=zero_impressions
                )
                return self._csv_to_list(results)
            except:
                self.logger.exception('download report failed. retrying... '
                                      'The query was {}'.format(report_query))
                retry += 1

and when i look at the result returned (the download string), I can see that there is an empty criterion_id.

petros...@gmail.com

unread,
Nov 9, 2018, 1:05:15 PM11/9/18
to AdWords API and Google Ads API Forum
Hi, I sent a private reply with a screenshot of the data being shown when I call the api and id. Let me know if you have received it. 

Luis Xander Talag (AdWords API Team)

unread,
Nov 12, 2018, 2:06:43 AM11/12/18
to AdWords API and Google Ads API Forum
Hi Petros,

Thank you for providing more details. Upon further investigation, it seems the reason that the Id Field (Criterion ID column) in Placement Performance Report has a '--' value is because the placement is an automatic placement. As you can see from this link, automatic placements will have IsNegative = FALSE and Id equal to two dashes (--).

Let me know if you have further clarifications.


Thanks,
Luis
AdWords API Team

Reply all
Reply to author
Forward
0 new messages