I am trying to retrieve a report from google ads api of a metric over time in hourly increments. Is this possible?
You can select a date range and set the dimensions to hourly, for example:
SELECT campaign.name, metrics.impressions, FROM product_group_view WHERE segments.date DURING LAST_30_DAYS AND metrics.impressions > 0
Will get the impressions for 30days, but the data is aggregated across the 30days. Can I retrieve it as a time series?
In facebook, they have me?fields=id,name,insights.fields(impressions).breakdowns(aggregate_by_hourly_audience_timezones).time_increment(1)
This breaks the impressions
data down into hourly increments for each day in the date range (not aggregated - 24 values regardless of date range).
I've searched throught the documentation for a few days now and can't seem to find what I'm looking for.
Edit: So searching through the last 3 days would produce something like the following output (structure of the data not as relevant):
// based on Dorian's example SELECT campaign.name, metrics.clicks, segments.date, segments.hour FROM campaign WHERE segments.date DURING LAST_3_DAYS // OUTPUT {"data": [ "2021-03-08": {0: {clicks: 20}, 1: {clicks: 43}, ...} (out to 23 - 1/ hour) ), "2021-03-09": {0: {clicks: 18}, 1: {clicks: 33}, ...} "2021-03-10": {0: {clicks: 18}, 1: {clicks: 33}, ...} ]}