rstudio / shiny-server

Host Shiny applications over the web.
https://rstudio.com/shiny/server
Other
712 stars 291 forks source link

google_analytics_id is using an old Google Analytics that is about to get deprecated #554

Closed daattali closed 12 months ago

daattali commented 1 year ago

Here is the code that is used to support Google Analytics

https://github.com/rstudio/shiny-server/blob/8d94d5d2543de5c33839354ae66facf07605b8e9/python/SockJSAdapter.py#L93-L105

This style of Google Analytics supports "Universal Analytics" which is Google's very old analytics platform. You can identify it by the string UA- that prepends the ID (the current documentation also gives an example of using a US- ID). However, Universal Analytics is being removed on July 1 2023 and will no longer be supported. Google Analytics 4 uses different javascript code and must be used for all web pages after July 1 2023.

daattali commented 1 year ago

I've raised this issue 2.5 years ago but now it's becoming very urgent so I chose to open a new issue https://github.com/rstudio/shiny-server/issues/469