KU cookie popup
Here is how to implement KU cookie popup on external sites.
* Note that all systems with a web interface for external users should use KU cookie solution so we only ask users once for cookie consent.
- Add the following references in
<head>:
<link href="https://cms.ku.dk/bootstrap/dist/css/ku-cookiepopup.min.css" rel="stylesheet">
<script src="https://cms.ku.dk/scripts_js/cookies/cookie_filters.js"></script> - Add the following script references right before
</body>:
<script>KUCookieFilters.output_popup_placeholder();</script><script src="https://cms.ku.dk/scripts_js/cookies/cookiedata.js"></script><script>KUCookieFilters.init(".someotherdomain.dk")</script><script>window.GLOBAL_cookieconf.liveStatsEndpoint = "https://www.ku.dk/:obvius/consent";</script><script src="https://cms.ku.dk/scripts_js/cookies/ccc.js"></script> -
Wrap your custom scripts or elements (that use statistical or marketing cookies) in the following function:
Example with scripts:
<script> KUCookieFilters.wrap_inline_script(function() { // Insert custom code here }, ["statistical", "marketing"]); </script>Add parameters
Example with element - in this case a Youtube video:"statistical"and/or"marketing"depending on the type of cookies used the script.<div class="cookiefilter cookiefiltercategory-statistical cookiefiltercategory-marketing" data-original-html="<iframe allowfullscreen="" src="//www.youtube.com/embed/zpOULjyy-n8?rel=0" title="Youtube video"></iframe>" id="cookiefilter-placeholder-1"> <div class="cookiefilter-header">Indhold ikke tilgængeligt på grund af cookie-valg</div> <p>Du kan ikke se indholdet i dette felt på grund af dine cookie-valg.</p> <p> <a class="open-cookie-dialog" href="#">Klik her for at redigere dine cookie-indstillinger.</a> </p> <p>Kategori: Statistik, Markedsføring</p> </div>The classes
cookiefiltercategory-*determine which content to display based on the user's cookie preferences in the cookie popup.