Title: Duplicate data-attribute
Last modified: May 24, 2024

---

# Duplicate data-attribute

 *  Resolved [Ivan Nugraha](https://wordpress.org/support/users/mangwp/)
 * (@mangwp)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/duplicate-data-attribute/)
 * 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.
 *     ```wp-block-code
       <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.
 *     ```wp-block-code
       <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](https://wordpress.org/support/users/daniub/)
 * (@daniub)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/duplicate-data-attribute/#post-17785615)
 * 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](https://prnt.sc/uwhxnZ1FACZV)
 * This is how we set up Complianz for injecting the Hotjar script [https://prnt.sc/N0zVx_TosgH5](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](https://wordpress.org/support/users/mangwp/)
 * (@mangwp)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/duplicate-data-attribute/#post-17797896)
 * 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 1 year, 10 months ago by [Ivan Nugraha](https://wordpress.org/support/users/mangwp/).
 *  Thread Starter [Ivan Nugraha](https://wordpress.org/support/users/mangwp/)
 * (@mangwp)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/duplicate-data-attribute/#post-17798199)
 * 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.

 * ![](https://ps.w.org/complianz-gdpr/assets/icon-256x256.png?rev=2881064)
 * [Complianz - GDPR/CCPA Cookie Consent](https://wordpress.org/plugins/complianz-gdpr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/complianz-gdpr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/complianz-gdpr/)
 * [Active Topics](https://wordpress.org/support/plugin/complianz-gdpr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/complianz-gdpr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/complianz-gdpr/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Ivan Nugraha](https://wordpress.org/support/users/mangwp/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/duplicate-data-attribute/#post-17798199)
 * Status: resolved