Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devOpifex/shinymetrics
:straight_ruler: Analytics and telemetry for Shiny applications.
https://github.com/devOpifex/shinymetrics
Last synced: about 2 months ago
JSON representation
:straight_ruler: Analytics and telemetry for Shiny applications.
- Host: GitHub
- URL: https://github.com/devOpifex/shinymetrics
- Owner: devOpifex
- License: gpl-2.0
- Created: 2023-06-21T23:19:04.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-24T01:22:40.000Z (about 1 year ago)
- Last Synced: 2024-08-04T03:07:09.216Z (5 months ago)
- Language: R
- Homepage: https://pkg.shinymetrics.com
- Size: 4.65 MB
- Stars: 33
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-shiny-extensions - shinymetrics - Track shiny applications with Shinymetrics, providing analytics and telemetry for Shiny applications. (Developer Tools / Monitoring and Analytics)
- jimsghstars - devOpifex/shinymetrics - :straight_ruler: Analytics and telemetry for Shiny applications. (R)
README
R package to track shiny applications with Shinymetrics.
[site](https://shinymetrics.com) | [docs](https.//pkg.shinymetrics.com)
## Installation
You can install the development version of shinymetrics from [GitHub](https://github.com/) with:
``` r
# install.packages("remotes")
remotes::install_github("devOpifex/shinymetrics")
```## How it works
Place your token for your registered application in your `.Renviron`
(or elsewhere as environment variable) as `SHINYMETRICS_TOKEN`.1. Create a tracker with the `Shinymetrics` class
2. Include the tracker in the UI
3. (Optional but recommended) include the server-side function `shinymetrics_server()` for useful information```r
library(shiny)
library(shinymetrics)# initialise the tracker
tracker <- Shinymetrics$new()$track_recommended()ui <- fluidPage(
tracker$include(), # include in the UI
trackingModalBS3() # consent prompt
)server <- function(input, output, session) {
shinymetrics_server() # (optional) print information on tracking
}shinyApp(ui, server)
```[](man/figures/default.png)
## Prompts
The package comes with prompts to help developers collect consent from
users to enable or disable tracking.
These prompts toggle tracking and cookies on and off but DO NOT store consent,
if that is required you must implemented it yourself.