Knowledge Base

GDPR Consent

Including scripts

If you are loading 3rd party scripts into your website, you most probably need to ask permission from your visitors before you do so. You, or your webdeveloper, has embedded these scripts into you website at some point. the GDPR Consent plugin has a way to let let you load these scripts, but only when the correct permission has been given.

Create a new script

In your WordPress admin, go to ‘GDPR Consent’, then select ‘All Scripts’. You will see an overview of all scripts you have added so far.

Choose ‘Add New Script’

Main options

1. Script title
Keep the title short and clear. It is most useful to simply name what the script is; ‘Google Analytics’, ‘HubSpot’, ‘Facebook Pixel’, etc, etc

2. Header
If your third party has any scripts that should go in the header of the HTML page, paste them here.

3. Footer
If your third party has any scripts that should go in the footer of the HTML page, paste them here.

Now publish your script to make it available to the GDPR Consent plugin. To make the script actually run, it still needs to be connected to a consent.

Include a script in a consent

First be sure to have a consent set up. When editing a consent, you will have a section that allows you to set ‘Allowed scripts‘.

For each script that should be loaded when a visitor has agreed to the consent in question, tick the box.

Then publish your consent.

From now on, the script(s) will be loaded on every page, but only if the visitor has agreed to this specific consent.

>