dfe-analytical-services / dfeshiny

R package containing preferred methods for creating official DfE R Shiny dashboards
https://dfe-analytical-services.github.io/dfeshiny/
GNU General Public License v3.0
4 stars 1 forks source link

Cookie module #19

Closed rmbielby closed 6 months ago

rmbielby commented 6 months ago

Adding a module to make it easier to add cookie consent tracking to dashboards.

The module covers the following:

This can be added to a dashboard with just two lines of code in the ui.R and one line in server.R, plus copying the js file to the www/ folder.

As part of testing, I've set up a demo / test dashboard in the tests folder and added some basic shiny tests to check the cookie consent control is working as it should do. Does a basic cycle of clear consent -> accept cookies -> clear consent -> reject cookies.