Hello,
My application sends data to Google Analytics Realtime if it is run locally, but not if its deployed instance is accessed on shinyapps.io. This article was used as a reference for embedding the tracking code. A Property was created in Google Analytics with the tracking id and URL specified.