• Resolved Ivan Nugraha

    (@mangwp)


    Hi, i have duplicate data-attribute tag in script for Hotjar and Google Tag Manager. This is what i do:


    For Hotjar

    • Added script through Integrations -> Script Center -> paste the script and choose category to statisctic
    • Synced with the Cookiesdatabase in Wizard -> Consent -> cookiedatabase.org

    Then i check the DOM and see that the Hotjar script tag has duplicate data-attribute.

    <script data-service="hotjar" data-category="marketing" type="text/plain" data-category="statistics">

    For Google Tag

    • Added Google Tag ID in Wizard -> Statistics Configuration -> Google Tag – Statistics Field.

    Then i check the DOM and see that the Google tag script tag has duplicate data-attribute.

    <script type="text/plain" data-service="google-analytics" data-category="statistics" async data-category="statistics" data-cmplz-src="https://www.googletagmanager.com/gtag/js?id=XXXXXXXXXXXX"></script>

    Any clue why is that happen? Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support daniub

    (@daniub)

    Hi,

    thank you for reaching out to us.

    We have tested it locally and we see that the behaviour is the one expected: https://prnt.sc/uwhxnZ1FACZV

    This is how we set up Complianz for injecting the Hotjar script https://prnt.sc/N0zVx_TosgH5

    So, regarding your case: unfortunately we can’t reproduce the issue.

    Can you please share with us the URL where you are installing our plugin so that we can see the hotjar script and the complianz configuration?

    Two hints for you:

    • if you were using the free version of the plugin and you installed the premium plugin, please delete the free version, since two different configurations can create a similar issue; But in this case if you use PRO version please reach us through the ticketing system;
    • please check under integrations -> plugins or in general the integration section and disable any possible duplicate configuration for Hotjar;
    • Usually if this happens it’s because of some other plugin/theme on the site, which results in a conflict. I would recommend to test if the problem persists with Complianz as the sole activated plugin & with a default WordPress theme.?If this works, re-enable plugins & theme one by one and keep testing until the wrong behaviour is reproducible again, at which point you’ll know exactly which one was the culprit.?

    Hope this helps

    Thread Starter Ivan Nugraha

    (@mangwp)

    Hi thanks for your feedback. Adding <script type=”text/javascript” class=”hotjar_script”> resulting js error SyntaxError: Unexpected token ‘<‘. The hotjar script code I use is similar to your code. I already check the hint you gave but still no luck. The only temp fix for duplicate attribute on hotjar custom is to not include it on Cookiesdatabase settings.

    • This reply was modified 9 months, 3 weeks ago by Ivan Nugraha.
    Thread Starter Ivan Nugraha

    (@mangwp)

    Oh ya have you tried to reproduce the google tag issues?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Duplicate data-attribute’ is closed to new replies.