Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for cookie consent with Google Analytics 4 #34

Merged
merged 3 commits into from May 23, 2023

Conversation

FraBle
Copy link
Contributor

@FraBle FraBle commented May 22, 2023

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)

@FraBle FraBle changed the title Add support for cookie consent and with GA4 Add support for cookie consent with Google Analytics 4 May 22, 2023
@ojroques
Copy link
Owner

Thanks!

@ojroques ojroques merged commit c4321da into ojroques:master May 23, 2023
ojroques added a commit that referenced this pull request Dec 27, 2023
Add support for cookie consent with Google Analytics 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants