Hello,
Some of our customers need date or device segmented report only for some specific campaigns.
For example, when the raw data is look like this:
Campaign, Date, Impressions
A01_Campaign1, 2018-05-01, 100
A01_Campaign2, 2018-05-01, 50
B01_Campaign3, 2018-05-01, 60
A01_Campaign1, 2018-05-02, 200
A01_Campaign2, 2018-05-02, 50
B01_Campaign3, 2018-05-02, 60
The desired output is like this:
Date, Impressions
2018-05-02, 150
2018-05-02, 250
In current AdWords API, this kind of reports are not supported, I suppose.
(I am doing this manually from CAMPAIGN_PERFORMANCE_REPORT)
New Google Ads API beta seems to support this. (I read through
https://developers.google.com/google-ads/api/docs/fields/v0/campaign#campaignname and found
campaign.name marked as Filterable.)
So I tried Google Ads Query Language with Ruby sdk.
query: SELECT date, metrics.impressions FROM customer WHERE date DURING LAST_30_DAYS AND
campaign.name LIKE 'A01%'
result(error message): The following field must be present in SELECT clause: '
campaign.name'.
query: SELECT date, metrics.impressions,
campaign.name FROM customer WHERE date DURING LAST_30_DAYS AND
campaign.name LIKE 'A01%'
result(error message): Cannot select fields from the following resource: 'CAMPAIGN', since the resource is incompatible with the resource in FROM clause.
query: SELECT
campaign.name, date, metrics.impressions FROM campaign WHERE date DURING LAST_30_DAYS AND
campaign.name LIKE 'A01%'
result: Succeeded, but the output was not what I expected.
Campaign, Date, Impressions
A01_Campaign1, 2018-05-01, 100
A01_Campaign2, 2018-05-01, 50
A01_Campaign1, 2018-05-02, 100
A01_Campaign2, 2018-05-02, 50
I want GAQL to support queries like following:
"SELECT date, metrics.impressions FROM customer WHERE date DURING LAST_30_DAYS AND
campaign.name LIKE 'A01%'"
or
"SELECT
campaign.name, date, metrics.impressions FROM campaign WHERE date DURING LAST_30_DAYS AND
campaign.name LIKE 'A01%' GROUP BY
campaign.name"
I posted the same question on the Webinar last week, and Adam told me to post here for troubleshooting.
Can anybody help?