Created
February 13, 2020 05:44
-
-
Save webtoffee-git/e71e99c8c573d8e0b15dd25d392e30a2 to your computer and use it in GitHub Desktop.
CookieYes render custom script based on consent - www.cookieyes.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| function getCookie(name) { | |
| var re = new RegExp(name + "=([^;]+)"); | |
| var value = re.exec(document.cookie); | |
| return (value != null) ? unescape(value[1]) : 'no'; | |
| } | |
| if (getCookie('cky-consent') == 'yes' && getCookie('cookieyes-analytics') == 'yes') { | |
| // Enable my Analytics tracking as the analytics category consent and overall consent is granted | |
| // Add anlytics script here | |
| } | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment