[Google Ads Api] Getting Labels information for the Campaigns Reports

581 views
Skip to first unread message

R Perez

unread,
Jan 7, 2020, 4:56:52 PM1/7/20
to AdWords API and Google Ads API Forum
I'm working on a migration process from AdWords API to  the Google Ads API. 

I'm having problems to get the `labels` for the Campaigns report(or the Label data does not match/is not the same),

I'm using the Ruby Client, so I tried to get the labels from the "Campaign" object(Google::Ads::GoogleAds::V2::Resources::Campaign), but I got an empty list, the same report using Adwords api IS NOT empty.

I've also read the Migration Docs, and I could not understand what I need to do. I don't know if the `campaign.labels` should return the resource(s) path, or should I make another query?
Screenshot 2020-01-07 at 18.43.26.png




I also think the description above(found on the Migration docs) is not clear. And looks conflicting with the docs found here and here.

If I add the `campaign.labels` in the query, I got the following error(using Ruby Client):

```
Error: 'GaxError Exception occurred in retry method that was not classified as transient, caused by 13:Internal error encountered.'
        Cause: '13:Internal error encountered.'
        Code: 13
        Details: 'Internal error encountered.'
```

I've also tried to get the labels from `ad_group_ad_label`  and `campaign_label` and also I didn't succeed getting the same information.

Google Ads API Forum Advisor Prod

unread,
Jan 8, 2020, 3:18:33 PM1/8/20
to ricard...@forward3d.com, adwor...@googlegroups.com

Hello,

Thank you for reaching out. With regards to your concern, you could use the label resource as well as the campaign resource to retrieve labels via Google Ads API. You could use Interactive Query Builder to build report query to make API calls. Please refer to the sample report query below for reference. If you are still observing discrepancy or facing the issue, could you please share the complete request and response logs along with the client customer id for both AdWords API as well as Google Ads API for me to investigate this further on my end and assist you better?

"SELECT campaign.id,campaign.name,campaign.labels FROM campaign LIMIT 100"

P.S. Please use Reply privately to author option while sharing the details.

Regards,
Nikisha Patel, Google Ads API Team



ref:_00D1U1174p._5001UOGF7V:ref
Reply all
Reply to author
Forward
0 new messages