This PR adds support for Cookie Consent based on the Hugo Addon by Hugo Codex. It does so by moving the Hugo-internal Google Analytics template into the partials of the theme and only loading the Google Analytics JavaScript code once the user provided the consent.
I extended the plugin from Hugo Codex to allow loading from external sources (e.g. directly from Google) in addition to the original local loading from (/js)
This PR adds support for Cookie Consent based on the Hugo Addon by Hugo Codex. It does so by moving the Hugo-internal Google Analytics template into the partials of the theme and only loading the Google Analytics JavaScript code once the user provided the consent.
I extended the plugin from Hugo Codex to allow loading from external sources (e.g. directly from Google) in addition to the original local loading from (
/js
)