humanswitch / consentcookie

Open source AVG solution for websites
Apache License 2.0
27 stars 10 forks source link

Script cc id multiple ids #82

Closed rockxwre closed 6 years ago

rockxwre commented 6 years ago

Problem

Application scripts, like the one for Google Analytics, can be turned off by default, by setting the type of the script tag to text\plain and adding the attribute cc-id to the tag with a value that matches its application id or purpose id. When ConsentCookie finds a matching consent, it will turn on the script. See also: https://www.consentcookie.nl/knowledgebase/integratie-van-consentcookie-met-trackingscripts/ Till now, only one cc-id value is possible. For example cc-id="ccp-6". But what to do with applications that have multiple purposes? For this, we need multiple cc-id values.

Solution

ConsentCookie now supports multiple cc-id's. You can now add multiple values by separating them with a comma. For example: cc-id="ccp-4,ccp-6". This means that this script will be turned on, only if both ccp-4 and ccp-6 consent are given.