Description:
I am facing an issue while trying to retrieve Google Ads campaigns and
their associated labels using the Google Ads API. The labels are created by
the MCC (manager account), but I cannot see them when querying the
campaigns for a customer account.
Details:
- Setup:
- Labels are created and assigned to campaigns by the MCC account.
- Campaigns belong to a normal customer account.
- The customer ID of the normal account is {account-customer-d}, and the
MCC account ID is {customer-d}.
- API Query:
- I am using the following query to fetch campaigns and their labels:
- GAQL
-
- SELECT campaign.id, campaign.name, campaign.labels FROM campaign
- However, this query does not return the labels that are created by the
MCC account.
- Example Query:
- sh
-
- curl --location --request POST
’https://googleads.googleapis.com/v16/customers/{account-customer-d}/googleAds:searchStream'
\ --header ‘developer-token: REDACTED’ \ --header ‘login-customer-id:
{mcc-customer-d}’ \ --header ‘x-goog-api-client:
gl-java/1.8.0_371__Oracle-Corporation gccl/30.0.0 gapic/30.0.0 gax/2.43.0
grpc/1.62.2’ \ --header ‘Content-Type: application/json’ \ --data-raw ‘{
“customer_id”: “{account-customer-d}“, “query”: “SELECT campaign.id,
campaign.name, campaign.labels FROM campaign” }’
- Issue:
- The query does not return any labels for the campaigns, even though
the labels are visible and associated with the campaigns in the Google Ads
UI.
Question:
How can I properly retrieve the labels for campaigns when the labels are
created by the MCC account? Is there a specific approach or workaround to
handle this scenario using the Google Ads API?
Any help or guidance on this issue would be greatly appreciated.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 on the web visit
https://groups.google.com/d/msgid/adwords-api/01ae95f0-0090-41ad-982d-7a99fce9819dn%40googlegroups.com.