I am currently utilizing the Google Ads API to retrieve data from the Video table. Upon attempting to add the ad_group_ad.ad.type dimension in the SELECT clause, I have noticed an increase in the number of rows returned. However, after performing aggregation, the results remain unchanged. I am curious as to the reason for this behavior and if it is expected. Can you provide insight on this matter?
The query:
SELECT segments.date, customer.currency_code, campaign.id, campaign.name, ad_group.id, ad_group.name, metrics.clicks, metrics.cost_micros, metrics.engagements, metrics.impressions, video.duration_millis, metrics.video_quartile_p100_rate, metrics.video_quartile_p25_rate, metrics.video_quartile_p50_rate, metrics.video_quartile_p75_rate, metrics.video_views, segments.ad_network_type, ad_group_ad.ad.type FROM video
Hi Asad,
Thanks for reaching out to the Google Ads API Forum.
Since you mentioned attempting to add the ad_group_ad.ad.type dimension in the SELECT clause, an increase in the number of rows for your provided GAQL. I’ve checked your GAQL, and it’s not valid as seen below:
Upon checking, kindly note that the field ad_group_ad.ad.type is a segments field as report ad_group_ad is segmented to video report. You may check the following scenario if it is happening on your end:
Note that zero metrics campaigns records shown on Ads UI, however, Google Ads API excludes and does not pull when segmenting a report, provided all selected metrics are zero. You may check here for more information. Also, when any segments fields are added to a query with FROM ad_group_ad, that segment is telling the query to only get the rows of data that have said segments field, and remove any row that is not associated. These both scenarios may also affect in combination with each other. That being said, you may double check on your end if for the given dates in a date range, if there are zero metrics for a given date range, then the API doesn't pull the row if the row is segmented and has no metrics for that date range.
If the above scenario is not happening, then you may provide the following details via reply privately to author option:
Regards,
|
||||||