Cookies consent examples, using CookieConsent OSS library
The consent popup has been enabled only on this page and the terms page to avoid undesired popups popping everywhere. Note that the consent implementation makes you opt-in to analytics tracking by default unless you manually refuse it.
Make sure to check CookieConsent OSS library. User consent regarding cookies has become a must-have for many businesses, and it very, very complicated. The laws depends on the end-user's country, which means you need to use a geo-location system to know which laws apply.
This implementation is based on open source and free software, and is configured to properly handle consent for simple applications. It's not meant to be used as-it for any business that process personal or identifiable information. NRN doesn't process any personal/identifiable information, and it makes the job much simpler.
Also, you can (more or less easily) switch from the current implementation to Osano vendor , if you wish or need to. The OSS and Business versions seem to share part of their API (unsure about that), but they're two different pieces of software.
Amplitude has been configured to stop tracking all kind of analytics as soon as the user opts-out from analytics tracking.
Also, the current behaviour has been configured to automatically opt-in into all analytics tracking by default. We've made this choice because no personal data are being processed in any way, and thus it should be safe for most apps that don't process personal data to have such default behaviour. (it's safe to be used as-it in France (CNIL + GDPR), which is very tough to deal with regarding privacy, so it should be safe to use this behaviour in most countries)
User consent is stored on Amplitude, and tagged with the time and message that were displayed to the user at the time of consent. Denies are stored as well for analytics purposes. (but you can easily disable this behaviour if you wish)
The CookieConsent OSS library is not perfect, it kinda does the job but feel free to replace it with something better if you wish. Also, it most likely won't cover all legal requirements for all regulations for all countries. But it's a start, and a free one.
Feel free to propose your help to improve it a bit, either by sending a PR to CookieConsent or NRN directly.