`customer_label` returning labels that don't exist in `label`

60 views
Skip to first unread message

Dorian Kind

unread,
Apr 19, 2022, 4:46:38 PM4/19/22
to Google Ads API and AdWords API Forum
Hi,

when downloading all applied account labels within a manager account using the `customer_label` resource and then comparing the returned IDs with the labels listed by the `label` resource, a small number of labels only exist in the former. Both requests use the same login-customer-id.
Checking the web UI, these additional labels also don't seem to show up in the interface.

For a specific example, running the query

SELECT customer_client.applied_labels, customer_client.id FROM customer_client WHERE customer_client.applied_labels CONTAINS ALL ('customers/5811963229/labels/2504104868')

lists around 165 accounts in our manager account which have label ID 2504104868 applied, but running the corresponding query

SELECT label.id, label.name, label.status FROM label
WHERE label.id = 2504104868

using the same login customer ID 5811963229 returns no results. Is there anything I'm missing?

Thanks & regards,
Dorian

Dorian Kind

unread,
Apr 19, 2022, 4:56:30 PM4/19/22
to Google Ads API and AdWords API Forum
As an addendum, I've checked a sample of accounts using `customer_label`, and the additional labels also don't show up in that resource. It seems to really only be `customer_client` that returns those label IDs.

Dorian Kind

unread,
Apr 20, 2022, 11:20:06 AM4/20/22
to Google Ads API and AdWords API Forum
The first sentence should of course be "...using the `customer_client` resource...". Apologies for the confusion.

On Tuesday, 19 April 2022 at 22:46:38 UTC+2 Dorian Kind wrote:

Google Ads API Forum Advisor

unread,
Apr 21, 2022, 4:44:02 AM4/21/22
to dor...@webrepublic.ch, adwor...@googlegroups.com
Hi Dorian,

Thank you for reaching out.

Regarding your follow up post, could you confirm whether what you meant is :

"As an addendum, I've checked a sample of accounts using `customer_client`, and the additional labels also don't show up in that resource. It seems to really only be `customer_label` that returns those label IDs."

If yes, then as per the documentation of the customer_label resource, it states that "Represents a relationship between a customer and a label. This customer may not have access to all the labels attached to it. Additional CustomerLabels may be returned by increasing permissions with login-customer-id.".

The label resource, on the other hand, should only return labels associated or created within the account or customer_id specified in the request. The customer_client should then return "the resource names of the labels owned by the requesting customer that are applied to the client customer.".

That said, so that our team can help identify as to where the additional labels (those from customer_label) are coming from, could you share the complete request and response logs of your customer_label resource request, and specify a sample of these labels that are not found anywhere else?

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2a4sbV:ref

Dorian Kind

unread,
Apr 21, 2022, 5:13:11 AM4/21/22
to Google Ads API and AdWords API Forum
Hi Peter,

thanks for reaching out. I've worded this issue terribly, apologies. Let me try and rephrase: There are label IDs which are being reported as applied to a specific client by querying the `customer_client` resource, let's take for example customer 929-857-9278.

SELECT
  customer_client.applied_labels, customer_client.id
FROM customer_client

This query returns five labels:

customer_client {
  resource_name: "customers/5811963229/customerClients/9298579278"
  id: 9298579278
  applied_labels: "customers/5811963229/labels/2504066243"
  applied_labels: "customers/5811963229/labels/2504104868"
  applied_labels: "customers/5811963229/labels/2504105044"
  applied_labels: "customers/5811963229/labels/2504105333"
  applied_labels: "customers/5811963229/labels/21583384862"
}

However, some of these labels don't seem to exist in the `customer_label` resource when querying:

SELECT customer.id, customer_label.label
FROM customer_label
WHERE
  customer_label.label IN (
    'customers/5811963229/labels/2504105044',
    'customers/5811963229/labels/2504066243',
    'customers/5811963229/labels/2504104868',
    'customers/5811963229/labels/2504105333',
    'customers/5811963229/labels/21583384862'
  )
  AND customer.id = 9298579278


This request only returns two labels:

customer {
  resource_name: "customers/9298579278"
  id: 9298579278
}
customer_label {
  resource_name: "customers/9298579278/customerLabels/2504066243"
  label: "customers/5811963229/labels/2504066243"
}

customer {
  resource_name: "customers/9298579278"
  id: 9298579278
}
customer_label {
  resource_name: "customers/9298579278/customerLabels/21583384862"
  label: "customers/5811963229/labels/21583384862"
}

Same behavior when using the `label` resource:

SELECT label.id, label.status FROM label
WHERE
label.id IN (
  2504105044,
  2504066243,
  2504104868,
  2504105333,
  21583384862
)


Only two labels returned, too:

label {
  resource_name: "customers/5811963229/labels/2504066243"
  status: ENABLED
  id: 2504066243
}

label {
  resource_name: "customers/5811963229/labels/21583384862"
  status: ENABLED
  id: 21583384862
}


I hope this makes the issue more understandable. I will be sending over request and response logs shortly.


Thanks again & best,
Dorian
Reply all
Reply to author
Forward
0 new messages