jburkhardt / RAdwords

Loading Google Adwords Data into R
https://github.com/banboo-data/r4googleads
Other
99 stars 36 forks source link

getData() returns strange string #93

Closed thomiko closed 6 years ago

thomiko commented 6 years ago

We have created an authentication RData file with the API token of our company. Using this token the R script works flawlessly on the computers of two people when we retrieve a CAMPAIGN_PERFORMANCE_REPORT via RAdwords. On the computer of a third person we always get a strange string return value (after less than a second) when running exactly the same script (no matter if it's being run inside RStudio or called from a batch file):

radwords 1

This is the code being used to retrieve the CAMPAIGN_PERFORMANCE_REPORT:

radwords 2

Here's the result on the computers of the first two people:

radwords 3

Anyone any ideas what it means and why it happens? Thanks!

We are all using Windows 7.

jburkhardt commented 6 years ago

Hi @thomiko Thank you for the input! Could you please print the faulty variable Output in the R Console prompt and paste it here? Maybe it contains an error message from the Adwords API. Furthermore, what OS, R Version, R Studio Version and RAdwords Version do you use on the faulty computer? Maybe something is outdated. Moreover, did you make sure that read.csv2(...) imports and produces the correct object Accounts?

thomiko commented 6 years ago

Thanks for yor help! We actually sorted it out.

We all have R version 3.2.2 on our computers (all running Windows 7). It turned out that the RAdwords version on the "bad" computer (0.1.14) was lower than the RAdwords versions on the "good" computers (0.1.17). When I updated the RAdwords version on the "bad" computer to 0.1.17, it worked straight away! The auth file was generated with one of the "good" computers. Does RAdwords 0.1.14 expect a different structure of the auth file?

jburkhardt commented 6 years ago

Fine that you are set up now on all three machines! The auth file is still the same, however RAdwords 0.1.14 communicates with a deprecated Adwords API version. The Adwords API updates several times a year. To ensure that your code is running in future just make sure that you update to the latest RAdwords version regularly.