Open GoogleCodeExporter opened 8 years ago
Same exact scenario for me, following the ReadMe example code and all.
My error message is slightly different:
Error in fromJSON(api.response.json, method = "C") :
unexpected escaped character '\s' at pos 15
Version 1.4 (installed into RStudio 0.98.490 with R x64 3.0.2 installed) on a
Windows 7 64 bit
Given the error message, I even went through my GA account and renamed all of
my segments, replacing any possibly-sensitive characters (spaces, ampersands,
etc.) with dashes, hoping that would fix the issue, but that did not fix the
problem.
Original comment by eatmorg...@gmail.com
on 27 Dec 2013 at 3:14
I have the same problems.
someone has the solution?
Original comment by c...@noise-media.com
on 6 Jan 2014 at 2:08
It looks like it has to do with the encoding of segments that use regex.
I have a custom segment that is defined as this:
ga:hostname=~^m\.
It is encoded on
https://www.googleapis.com/analytics/v3/management/segments?access_token=...
like this:
ga:hostname=~^m\\.
I don't know how to fix it.
Original comment by jimmykgl...@gmail.com
on 9 Jan 2014 at 5:11
Here's a fix that appears to be working for me.
From the R Console:
fix(fromJSON)
Change the first line to this:
function (json_str, file, method = "C", unexpected.escape = "keep")
The original error was caused by having unexpected.escape = "error" I think
the error stems from how R handles/interprets backslashes in Windows.
Cheers!
Jimmy
Original comment by jimmykgl...@gmail.com
on 17 Jan 2014 at 4:32
Assign a segment for your query like this:
segment <- ga.segments$segmentId[22]
Original comment by jimmykgl...@gmail.com
on 17 Jan 2014 at 4:37
Original issue reported on code.google.com by
timvuell...@gmail.com
on 11 Nov 2013 at 7:30