zenodo / zenodo-docs-user

Zenodo User Documentation
https://zenodo.org
Other
7 stars 16 forks source link

Add cookie banner #115

Closed carlinmack closed 3 months ago

carlinmack commented 3 months ago

Close https://github.com/zenodo/zenodo-rdm/issues/759

Currently the Matomo tracking code is repeated in individual templates (base-about.html, base-blog.html, base-help.html etc)

This PR refactors these repeated code blocks into a macro which passes the site ID for the analytics and introduces tracking to the pages which had been forgotten.

Additionally the cookie banner from https://github.com/zenodo/zenodo-rdm/pull/766 is introduced. As we don't have Semantic UI, I have imported the minimal set of styles to make it look okay and adjusted the Javascript to not use Semanic UI's .fade. Finally we set the cookie on .zenodo.org rather than / so that the cookie works across domains.

Note: do we need to link to cookie policy on https://developers.zenodo.org/? I believe we don't use tracking cookies here

image