Skip to content

Instantly share code, notes, and snippets.

@Chuvisco88
Last active January 31, 2026 05:23
Show Gist options
  • Select an option

  • Save Chuvisco88/2b446a5c9190b77b41eaafab358223ec to your computer and use it in GitHub Desktop.

Select an option

Save Chuvisco88/2b446a5c9190b77b41eaafab358223ec to your computer and use it in GitHub Desktop.
An approach on how to add cookie consent to a jekyll page
@Chuvisco88
Copy link
Author

@inetbiz should be very much possible given you are using jekyll, yes

@Chuvisco88
Copy link
Author

@andreyka26-git you are mistaken, it is possible to disable the ip lookups. Have a look at https://github.com/osano/cookieconsent for reference of the options that can be passed with window.cookieconsent.initialise

@andreyka26-git
Copy link

sorry you are right, I misconfigured it. Thank you

@ansonl
Copy link

ansonl commented Jan 31, 2026

Thank you for this solution, if anyone else is integrating this into a mmistakes theme, it can replace the _include/google-analytics.html file and gtag('config', '{{ site.google_analytics }}') can be used so the ga id can be kept in the config.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment