checkCookieConsentAndShowPopup.js on GitHub.
It’s a simple and versatile solution that allows you to show a banner with configurable content once the user has given their consent.
These variables determine the names of the cookies used to check if the user has accepted cookie consent and if the banner has been displayed. You can adjust these names according to your requirements.
COOKIE_POPUP_CLASSis the CSS class name for the custom banner, which you can style to match your website’s design.
COOKIE_POPUP_LINKis the URL to which users will be redirected when they click the “Accept” button on the custom banner. You can customize this URL to suit your needs.
This object contains the content for your custom banner, including the title, text, and labels for the “Accept” and “Reject” buttons. You can personalize these elements to align with your website’s branding and message.
To integrate this code into your website to display a custom banner after cookie consent, follow these steps:
- Include the
checkCookieConsentAndShowPopup.jsscript in your website’s HTML file.
COOKIE_POPUP_LINK, and the content within the