Hello,
In AdWords api it is possible to fetch CAMPAIGN_PERFORMANCE_REPORT with field InvalidClicks segmented by Device, but when we try to get using new api we are getting error PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE with message "Cannot select the following segments because at least one unsupported metric is found in SELECT or WHERE clause: 'segments.device'(unsupported metrics: 'invalid_clicks').". It looks like GoogleAds api does not allow to segment campaign report the same way as AdWords api when field invalid_clicks is used.
Working AWQL query for AdWords api:
SELECT
CampaignId,
Cost,
InvalidClicks,
Clicks,
Device,
Date
FROM
CAMPAIGN_PERFORMANCE_REPORT
WHERE
CampaignStatus IN ["ENABLED", "PAUSED"]
DURING
LAST_30_DAYS
GoogleAds query resulting in error:
SELECT
campaign.id,
metrics.cost_micros,
metrics.invalid_clicks,
metrics.clicks,
segments.device,
segments.date,
FROM campaign
WHERE campaign.status IN ("ENABLED", "PAUSED")
AND segments.date DURING LAST_30_DAYS
Is this change intended or is it a bug ? Or maybe there is another resource we can use to achieve invalid_clicks segmentation by device for campaigns ?
Regards
Radosław Pociecha