Reputation: 8791
I'm trying to use rga library but I'm getting this error:
Error in parseJSON(txt) : lexical error: invalid char in json text.
<!DOCTYPE html> <html lang=en>
(right here) ------^
This is my code:
rga.open()
profiles<-ga$getProfiles()
ids<-profiles[1]
data <- ga$getData(ids[1],
start.date = "2014-12-01",
end.date = "2014-12-04",
metrics = "ga:sessions",
dimensions = "ga:date",
max = 1500,
sort="",
filters="")
I tested the query in https://ga-dev-tools.appspot.com/explorer/ and it's working
What is wrong with the code?
Upvotes: 1
Views: 182
Reputation: 9423
The rga package not maintained now. Please try RGA
or RGoogleAnalytics
from CRAN.
Upvotes: 1