Getting the audience names from campaign_audience_view

47 views
Skip to first unread message

Roger Smith

unread,
Mar 8, 2025, 4:22:17 AMMar 8
to Google Ads API and AdWords API Forum
Hi team,

I'm currently struggling to understand something. 

Function below/query below is working nicely. It returns the data I expect. However, this field: campaign_audience_view.resource_name according to the documentation takes the following value:

customers/{customer_id}/campaignAudienceViews/{campaign_id}~{criterion_id}

However, how do I translate this to an actual audience name? 

Does the criterion_id correspond with campaign criterion? If so, it seems that user_list and user_interest are applicable.

Do I match user_interest_id (from resource name) and user_list_id (also from resource name) with the criterion IDs?

    def get_campaign_audience_view_query(self, start_date: date, end_date: date) -> str:
        """Generate query to fetch campaign audience view data"""
        return f"""
            SELECT
                customer.descriptive_name,
                campaign.name,
                campaign.id,
                metrics.clicks,
                metrics.impressions,
                metrics.conversions,
                metrics.conversions_value,
                metrics.cost_micros,
                segments.date,
                campaign_audience_view.resource_name,
                campaign_criterion.criterion_id
            FROM campaign_audience_view
            WHERE
                segments.date BETWEEN '{start_date}' AND '{end_date}'
                AND metrics.impressions >= {ProcessingConfig.MIN_IMPRESSIONS}
                AND campaign.status = 'ENABLED'
        """

Roger Smith

unread,
Mar 8, 2025, 4:36:12 AMMar 8
to Google Ads API and AdWords API Forum
With audience name, I am expecting values like such:
chrome_ZdxuQtMAg5.png

Google Ads API Forum Advisor

unread,
Mar 10, 2025, 2:37:11 AMMar 10
to acol...@gmail.com, adwor...@googlegroups.com

Hi,

Please note that retrieving the actual audience segment names from campaign_audience_view resource through the Google Ads API is not yet supported in the Google Ads API. I will raise a request to add this feature to be available in the Google Ads API. We cannot provide a scheduled timeline for the availability of this feature in the Google Ads API. I would recommend you to follow our Release Notes and Blog Post for future updates.

Kindly note that the criterion_id that you are getting is corresponding to the campaign_criterion and also note that the user_interest and user_list are applicable to the campaign_criterion resource. Please note that the USER_INTEREST criterion ID and USER_LIST criterion ID should match with the campaignAudienceViews criterion IDS.


Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-03-10 06:36:35Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vH7Yn:ref" (ADR-00292615)



Reply all
Reply to author
Forward
0 new messages