• Resolved Arno Kools

    (@arno-kools)


    I’ve used the third-party script blocks in the script center of the plugin to add the Google Analytics, LinkedIn and Meta tracking codes and pixels.

    However these scripts are ALWAYS injected in the page source. Even without consent. Shouldn’t these script be omitted if the visitor hasn’t consented?


    Also, how can these scripts be added to the head section of the page?
    Sure, it wouldn’t matter on the first visit while the visitor hasn’t consented yet, but after consent these code should preferable be loaded in the head section.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor jarnovos

    (@jarnovos)

    Hi @arno-kools,

    Those scripts are added with text/plain instead of a regular script (with text/javascript), thereby preventing these from being executed. Complianz converts these to text/javascript to load them after consent is obtained.

    You can also control the location manually, i.e. by manually adding the script to the <head> of the page, and using the “Block a script, iFrame or plugin” field to block it before consent.

    Or by directly including the consent parameters when adding the script to the header.

    <!-- 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

    Thread Starter Arno Kools

    (@arno-kools)

    Thanks for the clarification and fast response, Jarno!

    Your last solution is exactly what I was looking for.
    Just a moment ago a client of me asked to me to insert a varierty of tracking codes which have to be loaden on specific type of pages.
    This will not be any problem anymore with these parameters.

    I’m glad this can be realised so easily.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘third-party scripts are also injected into page without consent’ is closed to new replies.