Auto-discover report aggregation fields

17 views
Skip to first unread message

Dror Bar

unread,
Sep 26, 2017, 5:02:56 PM9/26/17
to AdWords API Forum
Hi,

From what I understand about the API, each report_type has some field\combination of fields which the data is being aggregated by beside the attributes\segments the user chose.
I was wondering if there is a way to get the field(s) which the report is being aggregated by for each report.
For example: 
If I chose to create the report (through the API): `keywords-performance-report` with the fields: `date, impressions` without the `keyword` field I will get data which look like this:
Date, Count
1/1/17, 15
1/1/17.25 


Which means that the report is doing some kind of aggregation beside the attributes\segements I chose (which is date), and that the actual report should have been:
Date, Count, keyword
1/1/17, 15, a
1/1/17.25 , b

So for this example, I would like to know that I need to add the field: `keyword` to my requests.
Is there a way to get this info by code or documentation?

Thanks in advance 

Peter Oliquino

unread,
Sep 27, 2017, 1:14:12 AM9/27/17
to AdWords API Forum
Hi,

Yes you are correct, AdWords API reports are aggregated at a specific level or a combination of objects. Further segmentation will depend on which fields you include in your SELECT query. As for the Keywords Performance Report, it is aggregated at the keyword level by default, meaning one keyword per row.

The reason you might be getting two dates with different impressions is possibly due to two separate keywords generating impressions on the same date. I would recommend that you include other fields (IdCriteria) in your SELECT query to accurately identify each row from the rest and see if there are any discrepancies such as duplicates.

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