The alternative would be to embed the necessary Javascript in your Shiny application directly. This isn't well-tested or official, but here's an example of doing that in one application: https://github.com/trestletech/shiny-sandbox/blob/master/grn/ui.R#L7. You would obviously want to change the GA ID you're using there.
My suspicion is that the rga package may be used to doing analysis on the traffic you've already collected in GA. So perhaps you'll find it useful after setting up the GA JavaScript on an app using one of the above techniques.
Best, Jeff
BadriNarayanan Srinivasan
unread,
Oct 16, 2013, 7:44:44 AM10/16/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to shiny-...@googlegroups.com
Hi Jeff -
I am not sure whether I explained my problem correctly.
I am 'not trying' to implement Google Analytics for my Shiny app.
The
application which I want to create should connect to Google Analytics
(using rga or other pacakges) of the user and pull the data for
analysis. rga uses OAuth 2.0 to connect to the Google Analytics.
Does it make sense?
Thanks,
Badri
Jeff Allen
unread,
Oct 16, 2013, 8:20:37 AM10/16/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to shiny-...@googlegroups.com
Ah, very good. In that case, there's no reason why you wouldn't be able to leverage this package from within Shiny. Just about anything you can do in R, you can do in a server.R file in Shiny. In the server, it's just R code running in an R process (albeit with some reactive sugar on top).
Jeff
BadriNarayanan Srinivasan
unread,
Oct 16, 2013, 11:59:54 PM10/16/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to shiny-...@googlegroups.com
Hmmm. Need to figure this one out. It would be so good if I get an example to connect to Google Analytics account from shiny application, can do wonders.