How to place OnSite-Tracking Code in Header Section properly

[ad_1]

Hi @mathiaspriebe,

You can still place these scripts on the desired location, i.e. in the <head> of the site. You’d just have to adjust these <script> elements for consent in Complianz.

Adjusting the <script></script> tags of these tools as shown below, and then adding these modified variants to the <head> of the site, will do the trick.

<!-- Consent Levels - Complianz -->
// Functional
<script type="text/javascript" data-category="functional"></script>
// Statistics
<script type="text/plain" data-category="statistics"></script>
// Marketing
<script type="text/plain" data-category="marketing"></script>

Kind regards, Jarno

Thank you @jarnovos! I got this. Just for confirmation: If placed like this into header section, Complianz will still recognize it. Within the plugin the tracking code wouldn’t be needed anymore. Am I right?

Hi @mathiaspriebe,

Correct indeed!

Just a quick addition, I noticed that you included the // Marketing comments as well, but it’s not necessary to do so; these are just some comments that we added for clarification.

Kind regards, Jarno

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer