Get gender field from GENDER_PERFORMANCE_REPORT

24 views
Skip to first unread message

Michael Mastroianni

unread,
Aug 7, 2017, 1:58:08 AM8/7/17
to AdWords API Forum
I'm new to the ruby api and am trying to get the gender report to work for me

if I do this

  def get_report_definition_request(report_name, min_date, max_date)
     selector = {
        :fields => ['CampaignName', 'Clicks', 'Cost', 'Impressions'],
        :date_range => {
            :min => min_date.strftime('%Y%m%d'),
            :max => max_date.strftime('%Y%m%d')
        }
    }

    return {
        :selector => selector,
        :report_name => report_name,
        :report_type => "GENDER_PERFORMANCE_REPORT",
        :download_format => "XML",
        :date_range_type => "CUSTOM_DATE"
    }
  end

I get no gender info in the xml that comes back. If I try to put 'Gender' in the fields list I get an error that there is no Gender field for this report. What am I doing wrong here?


Thanks for any help

adwordsapiad...@google.com

unread,
Aug 7, 2017, 3:03:08 AM8/7/17
to AdWords API Forum
Hi Michael,

You can check here for the list of all attributes and metrics of the Gender Performance Report. For the gender field (Male/Female), you can add the Criteria attribute in the report. Additionally, you can check here for more reporting examples in Ruby.

Let us know if you have further clarifications.

Thanks,
Vincent
AdWords API Team
Reply all
Reply to author
Forward
0 new messages