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?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/37ed7287-7efa-498c-85dc-2362a2c10b6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... hiromi hishida
    • ... 'Luis Xander Talag (AdWords API Team)' via AdWords API and Google Ads API Forum
      • ... hiromi hishida

Reply via email to