Ad Metrics Report

68 views
Skip to first unread message

Ben Miller

unread,
Mar 10, 2021, 3:27:36 PM3/10/21
to AdWords API and Google Ads API Forum
Can someone help with a request I'm trying to make?
I'm trying to get historical metric data for ads. Each request I make is coming in over 1 Gb.

I think I need to query a different resource but I'm not sure.

At the end of the day I need the following

allConversions,
averageCpm,
clicks,
conversions,
costMicros,
impressions,
averageCost,
averageCpc,
costPerConversion

Here is my query

SELECT segments.date,
metrics.clicks,
metrics.conversions,
metrics.impressions,
metrics.cost_micros,
metrics.all_conversions,
metrics.average_cpc,
metrics.average_cpe,
metrics.average_cpm,
metrics.average_cpv,
metrics.average_cost,
metrics.cost_per_conversion

FROM ad_group_ad
WHERE segments.date >= 'start_date' AND segments.date <= 'end_date'
ORDER BY segments.date ASC

Ideally I could add a GROUP BY segments.date and the request would come back grouped already.

Right now I loop through all the results and add to a huge array until everything is aggregated. I just need the results in a by day format for charting purposes.

Can someone please help?

Thanks,
Ben

Using: Google Ads API v6

Google Ads API Forum Advisor Prod

unread,
Mar 11, 2021, 11:07:07 AM3/11/21
to nowen...@gmail.com, adwor...@googlegroups.com
Hi Ben,

This issue appears to be caused by either the number of ads in your account and/or the duration of your date range. I'd recommend using a smaller date range and adding more filters in your report query. If you continue to face issues, please provide me the full report query and your CID.

Cheers,
Anthony

Google Logo
Anthony
Google Ads API Team
 


ref:_00D1U1174p._5004Q2DuTgU:ref

Ben Miller

unread,
Mar 11, 2021, 11:09:01 AM3/11/21
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com
Yeah I understand why it's happening. I'm trying to see if there's a better endpoint to call to get those stats.

Google Ads API Forum Advisor Prod

unread,
Mar 12, 2021, 2:21:21 PM3/12/21
to nowen...@gmail.com, adwor...@googlegroups.com
Hi Ben,

The ad_group_ad resource is the only way to get performance data on your ads through the API.

Regards,
Reply all
Reply to author
Forward
0 new messages