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

Function to initialise google analytics html script #4

Closed rmbielby closed 1 month ago

rmbielby commented 9 months ago

Adding a script to create a basic google-analyics.html file with a provided GA4 key.

The function initialise_analytics() creates the script and I've added some validation to check he provided key at least looks like a genuine GA4 key. I've also added some tests to make sure that validation is working.

rmbielby commented 4 months ago

Few minor things in comments, some lintr things to either dismiss or address, plus a couple of notes returned when running devtools::check() locally, I've commented on some in line, but there's one more too:

Not 100% sure on this, but worth a quick check if we're doing something wrong?

Think I've covered everything above if you want to have another look through.

cjrace commented 1 month ago

Analytics initialisation function