-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ga_adwords_list failing to parse data correctly #322
Comments
Anything I replaced will be marked with {{brackets}} |
I took a look at this, and I think the issue comes from the adwords data having multiple Link Groups, and some of those Link Groups have more than one Linked Accounts. In my example above, I have 4 groups, one group has 7 accounts, one has 2 and the remaining only have one account (for 11 accounts total). I think that's where the error |
I believe that in the end, the only function I changed was the parse_ga_adwords_list function to be the following: parse_ga_adwords_list <- function(x){ aaa <- Reduce(bind_rows, x$items$adWordsAccounts) if(is.null(o)){ o } |
This is great thanks, makes sense it's altering the parsing of that function. |
Give it a go now with the GitHub dev version |
It's working for all of my use cases. Thanks for adding this into the package! |
We need to check if the adwords info is null sooner (otherwise it breaks seq_len(nrow(o)) aaa <- Reduce(bind_rows, x$items$adWordsAccounts) if(is.null(o)){ n.times <- as_vector(lapply(x$items$adWordsAccounts, nrow)) o } |
What goes wrong
Trying to pull in a list of all the GA adwords accounts connected to a property, and nothing gets returned
Steps to reproduce the problem
I just ran the code with my accountID and proprtyID passed into the function
Expected output
Some sort of table with info about the adwords accounts?
Actual output
Error message:
Error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 4, 11
Error: API Data failed to parse.
Wrote diagnostic object to 'gar_parse_error.rds', use googleAuthR::gar_debug_parsing('gar_parse_error.rds') to
debug the data_parse_function.
Before you run your code, please run:
options(googleAuthR.verbose=2)
and copy-paste the console output here.Check it doesn't include any sensitive info like auth tokens or accountIds - you can usually just edit those out manually and replace with say
XXX
'API Data failed to parse' diagnostics
If you have an error starting with:
API Data failed to parse.
gar_parse_error.rds
to your working directory.Session Info
Please run
sessionInfo()
so we can check what versions of packages you have installedgoogleAnalyticsR_0.8.0
The text was updated successfully, but these errors were encountered: