Reports with 0-impressions and a device filter

82 views
Skip to first unread message

Léon Gersen

unread,
May 19, 2021, 3:23:27 AM5/19/21
to AdWords API and Google Ads API Forum
In the AdWords API, it was possible to request a report (for example, the "keywords performance report") using the `includeZeroImpressions` header and a `device` predicate. This would result in a report including all keywords, with the metrics filtered down by device.

In the new Google Ads API query language, a filter (WHERE) on `device` requires a selecting (segmenting) for device as well:

```
SELECT
ad_group_criterion.criterion_id,
segments.device,
metrics.impressions,
metrics.clicks,
metrics.cost_micros
FROM keyword_view
WHERE segments.date = '2021-05-18'
AND segments.device = 'DESKTOP'
```

The results of this query will *NOT* include keywords without impressions, whereas it *WILL* when removing the device filter.

How can I query keyword performance, including keywords without impressions, filtered by device in the new API?

Léon Gersen

unread,
May 19, 2021, 3:41:23 AM5/19/21
to AdWords API and Google Ads API Forum
Similarly, this makes it impossible to express queries such as "keywords that had zero tablet impressions in a given period" in the Google Ads API, while they were possible in the AdWords API.

Google Ads API Forum Advisor Prod

unread,
May 19, 2021, 11:08:14 AM5/19/21
to leong...@gmail.com, adwor...@googlegroups.com
Hi Leon,

With Google Ads API, anytime segments are added to a report query, it will exclude any zero impression rows. More details can be found here.

Regards,
Anthony

Google Logo
Anthony
Google Ads API Team
 


ref:_00D1U1174p._5004Q2HC1Hf:ref

Léon Gersen

unread,
May 21, 2021, 3:10:26 AM5/21/21
to AdWords API and Google Ads API Forum
Hi Anthony,

Thanks for following up on this. I am aware that queries with segments will not include zero impression rows. In order to filter by device, however, this segment is required, while not desired.

This limitation blocks me in migration some reports from the AdWords API to the Google Ads API, such as:

- Keywords that had no clicks on desktop devices (select metrics.clicks, segments.device WHERE segments.device = 'DESKTOP' cannot be used, as this omits words without impressions).

Requesting this report was trivial in the AdWords API, but now requires making two queries, and manually intersecting the results.

-- Léon

Google Ads API Forum Advisor Prod

unread,
May 24, 2021, 2:59:24 AM5/24/21
to leong...@gmail.com, adwor...@googlegroups.com
Hi Léon,

I work with Anthony and let me provide support to your concern.

Could you try to add more metrics to the report? I suggested it because according to this document, if any metric is non-zero, a row will be returned.

If there are rows that will not be returned while some of its metrics are non-zero, then please provide the complete request and response logs with request ID generated on your end to investigate.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2HC1Hf:ref
Reply all
Reply to author
Forward
0 new messages