Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Guidance on Aggregating Gender Metrics in Google Ads API Query

25 views
Skip to first unread message

DK

unread,
Apr 27, 2025, 9:27:58 PMApr 27
to Google Ads API and AdWords API Forum

Hi,

I am working on creating a table of metrics broken down by gender type and came across the following cookbook link:
https://developers.google.com/google-ads/api/docs/query/cookbook#gender_demographics.

The suggested query works but returns multiple records for each gender type, depending on the number of campaigns and ad groups.
I would like to aggregate these metrics so that I have a single summarized row per gender, for example:

GENDER, clicks, ctr, average_cpc 
FEMALE, 1000, 10.24, 154.47
MALE, 2000, 20.24, 454.47

One challenge I am facing is that simply averaging fields like CTR and Average CPC across rows would not produce correct results, as they require weighted averages. However, the query results do not provide the necessary weights for each row.

Could you please advise on the best way to correctly aggregate these metrics by gender?

GAQL query suggested by quick book -
 SELECT ad_group_criterion.gender.type,
    campaign.name,
    ad_group.name,
    ad_group_criterion.system_serving_status,
    ad_group_criterion.bid_modifier,
    metrics.clicks,
    metrics.impressions,
    metrics.ctr,
    metrics.average_cpc,
    metrics.cost_micros,
    campaign.advertising_channel_type
  FROM gender_view
  WHERE segments.date DURING LAST_7_DAYS



Google Ads API Forum Advisor

unread,
Apr 28, 2025, 3:25:25 AMApr 28
to karwand...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

There is no field/feature in the Google Ads API that can help you aggregate the metrics from gender_view based on the gender. You will have to do some additional processing at your end to get this data.

I hope this clarifies.
 

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-04-28 07:24:39Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qV8Kb:ref" (ADR-00302448)



Reply all
Reply to author
Forward
0 new messages