Retrieving correct data with CAMPAIGN_PERFORMANCE_REPORT

259 views
Skip to first unread message

Sune Christiansen

unread,
May 14, 2018, 9:21:07 PM5/14/18
to AdWords API and Google Ads API Forum
Hi there.

I have some problems with getting correct data with "CAMPAIGN_PERFORMANCE_REPORT".

I'm trying to retrieve the following information:


Through ACCOUNT_PERFORMANCE_REPORT I get the the total amount of each data point (CTR, conversion rate etc.).

The site I am working on, will have the ability to see the data sorted by campaigns as well, where CAMPAIGN_PERFORMANCE_REPORT comes in the picture.


My query is:

"SELECT Impressions, Clicks, Cost, CostPerAllConversion, AllConversionValue, AllConversions, AllConversionRate, ConversionValue, AverageCpc, CostPerConversion, Date 
FROM CAMPAIGN_PERFORMANCE_REPORT
WHERE AdvertisingChannelType = SHOPPING DURING 20180501,20180506"

This does not give me 1 return for each day, but 44-45 returns pr. day.


Do I miss something in my query or can you give me hint which report type to use, when I want the total values pr. campaign (display, shopping, search) like in ACCOUNT_PERFORMANCE_REPORT?

Thanks in advance


Peter Oliquino (AdWords API Team)

unread,
May 15, 2018, 4:12:40 AM5/15/18
to AdWords API and Google Ads API Forum
Hi Sune,

When including the Date field, it will automatically segment the rows by day on which statistics such as impressions and clicks were generated. If you wish to retrieve the total per AdvertisingChannelType, you would need to implement a way on your end to acquire its total.

Another way is to create a separate request per AdvertisingChannelType and you can just get the total amount as seen in the example below :

Sample query :

String query = "SELECT CampaignId, Clicks, Impressions, Date FROM CAMPAIGN_PERFORMANCE_REPORT WHERE AdvertisingChannelType = SHOPPING"
        + " DURING 20180501, 20180506";

Sample results :

Report successfully downloaded to: "CAMPAIGN_PERFORMANCE_REPORT (May 1, 2018-May 6, 2018)"
Campaign ID,Clicks,Impressions,Day
912419506,0,0,2018-05-01
912419506,0,0,2018-05-05
912419506,0,0,2018-05-06
1049904850,0,0,2018-05-06
1065825259,0,0,2018-05-03
1049904850,0,0,2018-05-03
1049904850,0,0,2018-05-04
1065825259,0,0,2018-05-05
912419506,0,0,2018-05-04
1049904850,0,0,2018-05-02
Total,0,0, --

Feel free to write back if the above is not what you were looking for. Also, regarding the "44-45 returns per day" that you mentioned, could you further elaborate or provide more information about this?

Best regards,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages