{{gdprScriptBlocker}} helper

Helper for generating a proper type attribute value in <script> tags.

Syntax:

<script type="{{ gdprScriptBlocker "analytical" }}"></script>

Above code will generate a script which will be activated only if user will allow scripts from cookies group named "analytical" in the GDPR popup.

Warning! You must place your scripts which uses this helper BEFORE {{{ publiiFooter }}} fragment in your theme code (usually in footer.hbs file). Because files placed after this fragment won't be handled properly by cookie banner settings.

Create your first website with Publii

Join thousands of creators who chose independence. Create content locally and publish lightning-fast, secure websites on your own terms.

Download Publii

Free and open source. Windows, macOS and Linux.

Read the getting started guide