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
<https://developers.google.com/google-ads/api/fields/v18/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'
"""
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/e6e804e1-7e1e-4854-919e-3a7e4c164faan%40googlegroups.com.