General Data Protection Regulation (GDPR) affects every company that does business with an EU citizen. In order to comply with GDPR, you are able to classify the scripts (install/embed) in the “Includes” section (either for logged-in or logged-out users) based on the cookie preferences of the users who visit your school.

We are introducing two pseudo-attributes:

1. type: this is the script type that would be used. The following values can be used:

a. text/javascript (if your school does not need to be GDPR compliant)

b. text/plain (if your school needs to be GDPR compliant)

Note: text/javascript is the default in case the attribute is not added in the <script> tag.

2. data-accept-cookie: this is the privacy category to which the script belongs (let us say once again that this can only be used if the type of the script is text/plain)

The acceptable values are:

a. analytics

b. marketing

c. functional


In order to add your code snippet, navigate to Site Builder → Custom Code.

If your school is not going to be GDPR-compliant, then your code snippet could be like this: <script type="text/javascript">.

In the opposite case (GDPR-compliant school), you have to add to your script both properties type="text/plain" and data-accept-cookie="YYY".

If you want to add an "analytics" or a "functional" code snippet, you just replace the "marketing" value with "analytics" or "functional" respectively. 

Note: For the specific example, the code will be executed if the users have accepted the Marketing Cookies.

GDPR is here to stay and, here in LearnWorlds, we want to help you each step of the way.