banboo-data/r4googleads

Labels

Opened this issue · 3 comments

Hey.

I have a little bit of an issue that I haven't been able to fix yet. Therefore, I would really appreciate your help.
I'm trying to pull various data out but it seems to fail whenever I include labels.

My query looks like this:
g_query <- "SELECT
customer.descriptive_name,
customer.currency_code,
customer.id,
metrics.impressions,
metrics.clicks,
metrics.ctr,
metrics.average_cpc,
metrics.cost_micros,
campaign.labels
FROM campaign
WHERE segments.date DURING LAST_MONTH
AND metrics.impressions > 0
PARAMETERS include_drafts=true"

If I remove the campaign.labels it works just fine. And I've been able to do like this:
labels <- "SELECT campaign.labels FROM campaign".

The error respond is: "The error code is not in this version". Am I missing something or is it simply not possible?
I've checked with the Google query migration tool. Everything should be fine.

Thanks in advance.
Joakim

@joggopops What version of r4googleads do you use? Please make sure to run with v 0.1.1. Otherwise, install remotes::install_github("banboo-data/r4googleads")
Your query just works fine with my installation and ads account.

I have one guess: Could you remove PARAMETERS include_drafts=true from your query and test again.
This works for me:

SELECT
customer.descriptive_name,
customer.currency_code,
customer.id,
metrics.impressions,
metrics.clicks,
metrics.ctr,
metrics.average_cpc,
metrics.cost_micros,
campaign.labels
FROM campaign
WHERE segments.date DURING LAST_MONTH
AND metrics.impressions > 0

Thanks! This works.
The labels are however extracted as ids. In the old AdWords API you'd get the actually label names. Is that impossible here?