Hi Google Ads API team,

Business need  
I’m building a reporting tool that lists metrics (impressions, clicks, 
conversions, cost, etc.) per audience segment.  
For every segment we must show the same friendly name the Google Ads UI 
displays.

Current workflow (API v20)

1.  Metrics per audience criterion

    ```gaql
    SELECT
      ad_group_criterion.criterion_id,
      metrics.impressions,
      metrics.clicks,
      metrics.conversions,
      metrics.cost_micros
    FROM ad_group_audience_view
    WHERE campaign.id = <CAMPAIGN_ID>
      AND segments.date BETWEEN 'YYYY-MM-DD' AND 'YYYY-MM-DD'
    ```

2.  Attempt to map each `criterion_id` to a label

    ```gaql
    SELECT
      ad_group_criterion.criterion_id,
      ad_group_criterion.user_list.user_list,
      ad_group_criterion.display_name
    FROM ad_group_criterion
    WHERE campaign.id = <CAMPAIGN_ID>
      AND ad_group_criterion.type = AUDIENCE
    ```

3.  Translate numeric topic IDs (placeholders like “Audience #123 …”)

    ```gaql
    SELECT
      vertical_constant.resource_name,
      vertical_constant.name
    FROM vertical_constant
    WHERE vertical_constant.resource_name IN ('verticalConstants/123', ...)
    ```

Processing logic  
• use `display_name` when it’s non-empty  
• look up user lists by resource name to get their `.name`  
• replace “Audience #<n>” with the returned `vertical_constant.name`  
• tidy Google’s auto-generated strings `AdGroupPersona_<hash>_<ts>`

Problem  
After all steps many criteria still show only “Audience #<ID>”.  
Those same criteria display a friendly name in the Google Ads UI.

What we tried (and failed)  
• Adding `ad_group_criterion.user_interest`, `.custom_audience`, 
`.combined_audience` to SELECT → GAQL error: “field may not be used in 
SELECT clause”.  
• Querying `user_interest`, `custom_audience`, `combined_audience` tables 
directly – we have only numeric `criterion_id`, no resource names.  
• Granting “Audience Manager” UI permissions is not possible for every 
customer.

Questions

1. Is there any supported way to convert **every** audience `criterion_id` 
to the same human-readable label the UI shows, especially when 
`display_name` is just “Audience #<ID>”?  
2. Do the orphan numeric IDs map to an internal taxonomy that isn’t exposed 
via `vertical_constant`? If yes, what fallback should we show?  
3. Are there other fields/services (GoogleAdsFieldService, etc.) that let 
us resolve names for user-interest, custom-audience, or combined-audience 
criteria programmatically?

Thanks for any guidance—our users need meaningful audience names and we’d 
like to avoid scraping or static mapping tables.

Thank you.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/adwords-api/f528e945-0ee7-46d9-8998-b87a75e47f6bn%40googlegroups.com.
  • Ho... Mark Ignacio
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
        • ... Mark Ignacio

Reply via email to