KainosSoftwareLtd / project-dashboard

Digital Project Dashboard.
MIT License
1 stars 1 forks source link

55 - Add google analytics to allow tracking of usage #61

Closed Rory80Hz closed 7 years ago

Rory80Hz commented 7 years ago

Closes #55

Who can review?

Anyone but Rory.

How to review?

Eyeball code.

Follow readme to configure environment variable. Run.

What changed?

Google analytics has been added so we can better track usage of the dashboard. Previously we didn't know if it was actively being used.

To allow all views to make use of analytics we added it to scripts.html which itself is included in all layouts. We made use of app.locals to add the value 'globally' so it could be referenced in the scripts.html.

If you don't have the GA_ID set in your environment variables it won't include the tracking code.