We are trying to retrive and aggregate data using the Google Ads API (v5). The goal is the following:
*Retrieve and/or calculate aggregate Search Impression Share (and Top Impression %, Abs Top Impression %), segmented by campaign type (Search, Shopping, and a Total Aggregate).*
Note that this is not an outlandish thing to do, basically we are looking for the data available on the Google Ads online interface, right at the bottom of the campaigns table, in the dropdown of "Total: Account": "Total: Search", "Total: Shopping", "Total: Display" and so on.
Now, the customer resource is often used to query aggregate data at the account level. Clicks, Impressions, CTR and the like. But the cutomer resource does NOT have advertising_channel_type available as a resource field. It would have been too easy.
Ok, the campaign resource comes to the rescue. After all, this resource does have advertising_channel_type, and it is fairly easy to sum clicks, impressions, costs. It is also possible to work out CTR and CPC by calculating Clicks/Impressions and Cost/Clicks on the summed data. But what about search impression share?
- Averaging search impression share across campaigns is an obvious no-no.
- Using impressions-weighted averages seems to be the right thing to do, and it does seem to work for search campaigns, but falls short for shopping campaigns and account totals.
So, to sum things up...
Do you have any idea how we can get the following data (everything in red, but particularly the ones in black) using the Google Ads API:
In preferably as few steps and as few (and as small) queries as possible?
Thanks for your help!