• Resolved ulicgn

    (@ulicgn)


    The <script> tag that is being generated by this plugin does not adhere to the recommended way of implementing manual consent as described in the documentation. See script output below .

    Details:

    We have set up Cookiebot with the WordPress plugin on our site , and we have configured MANUAL blocking and have enabled the Google Tagmanager integration.
    For Tagmanager, we have configured the preferences,marketing and stats categories to be mandatory:

    The code that is now generated by the plugin in the frontend does not follow the documentation . While the data-Attributes data-cookieconsent are set correctly, the script tag remains without the recommended attribute type=text/plain to make it run only if consent is detected.


    So the settings we made in the configuration are not transferred correctly to the generated frontend code. The consequence of this bug is that GTM is loaded even if no consent is given. Due to our internal policies an our interpretation of our local data protection laws, that is something we have to avoid.

    <script data-cookieconsent="preferences, statistics, marketing">
    // SHOULD BE: script type=text/plain according to documentation!
    (function (w, d, s, l, i) {
    w[l] = w[l] || []; w[l].push({'gtm.start':new Date().getTime(), event: 'gtm.js'});
    var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l !== 'dataLayer' ? '&l=' + l : '';
    j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
    f.parentNode.insertBefore(j, f);})(
    window,
    document,
    'script',
    'dataLayer',
    'GTM-PHH9RFZ3'
    );
    </script>

    Will this be fixed? If not, do we have to disable GTM in the Plugin settings and add the code manually with the text/plain attribute?

    Regards, Ulrich

    • This topic was modified 1 year, 4 months ago by ulicgn.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Hanna

    (@hannausercentrics)

    Hi Ulrich,
    Thank you for bringing this issue to our attention.
    A task has been created for our plugin development team to address this as soon as possible. We greatly appreciate your patience while we work on resolving the bug.

    Once it’s fixed, I’ll make sure to update you.
    Thank you for your understanding!

    Plugin Support Hanna

    (@hannausercentrics)

    Hi @ulicgn ,
    Thank you for your patience.

    We’re pleased to inform you that our developers have resolved the GTM script issue, and the fix has been included in the latest release of the Cookiebot plugin for WordPress (version 4.4.0).

    To address the error, please update to this version.

    Thread Starter ulicgn

    (@ulicgn)

    Wow, that was fixed very quickly – it looks OK in the frontend output now, Thanks!!

    Plugin Support Hanna

    (@hannausercentrics)

    You’re very welcome! 😊
    Our developers put in their best efforts to fix the issue as quickly as possible.
    If you ever need anything else, just let us know — happy to help!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Tagmanager Script tag is created incorrectly’ is closed to new replies.