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

feat: add google analytics (ga4) and cookie consent. #186

Merged
merged 3 commits into from
Nov 29, 2022

Conversation

white-gorilla
Copy link
Contributor

@white-gorilla white-gorilla commented Nov 21, 2022

This PR adds GA4 and consent to cookies.

To log into the Google Analytics account, the credentials of the open.kernl.ai@gmail.com account are stored in bitwarden.
To run the site locally, you must refer to /docs/README.md.

warn: In order to comply with GDPR, users must be able to change their cookie settings at any time. For this, a link "Change cookie settings" has been added in the footer (see video #167).

Note that the cookie manager proposes to activate or not a github cookie. This material is needed to get the information from github for the link on the top right : squidfunk/mkdocs-material#4666

Tests performed tests performed on Chrome, FFX desktop and Safari iOS.

  • creation of ga cookies, or not, depending on consent: OK.
  • send data to ga4: OK.
  • reception in ga4 (acquisition, page views, geoloc, search terms, etc.): OK.

Note: Tracking is more and more complicated to test as our devices are now equipped with anti-trackers (e.g. on my iPhone, even in non-private browsing, a lot of information is no longer transmitted, or are false).

fix #167

@white-gorilla white-gorilla marked this pull request as draft November 21, 2022 13:12
@white-gorilla white-gorilla self-assigned this Nov 21, 2022
@github-actions github-actions bot added feature and removed feature labels Nov 21, 2022
@white-gorilla white-gorilla marked this pull request as ready for review November 22, 2022 08:41
@github-actions github-actions bot added feature and removed feature labels Nov 22, 2022
Copy link
Collaborator

@jonathlela jonathlela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine with me and firefox.

@keaoner
Copy link

keaoner commented Nov 28, 2022

Works for me with chrome and firefox and in the GA4 dashboard

@white-gorilla white-gorilla merged commit ae1d7b5 into main Nov 29, 2022
@white-gorilla white-gorilla deleted the feat/add-google-analytics branch November 29, 2022 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FRONT] Add analytics to static site (GA4).
3 participants