• Resolved Jestemzmiasta

    (@jestemzmiasta)


    Hello!

    The answer posted here helped me a lot: https://wordpress.org/support/topic/block-custom-script-before-cookie-agree/. I know that when I insert a script and add <script type=”text/plain” data-category=”preferences”> to it, it will lock it nicely without consent. However, I have a script from a third party that has the src=”” specified in its structure. And I can’t use type=”text/plain”. The problem is that complianz doesn’t block script if I have text/javascript. So it only blocks at text/plane. Please help. Thank You.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Antonio Candela

    (@antoiub)

    Hello @jestemzmiasta ,

    In this case, you can overcome this by implementing the script with a plugin like WP Code and blocking it before consent. Use the “Block a script, iframe or plugin” feature of the Script Center to block it prior to consent, using the URL inside the src attribute. You can learn more about the features of the script center at this link: https://complianz.io/integrating-plugins/

    Hope this helps.

    Thread Starter Jestemzmiasta

    (@jestemzmiasta)

    You gave me a fantastic thought. I simply used “Block script, iframe or plugin” and provided the address from the url. And it works as it should!

    I only have one more request. There are only two categories to choose from – Statistics and Marketing. I rather consider the cookies I have to be in the preferences category. I have just assigned <script type=”text/plain” data-category=”preferences”> to set them in preferences and in the second sollution by locking url I cannot select the prefs option. Can we do anything about it? Thank you very much!

    P.S. i know the prefs options are treated as technical cookies and most common do not require consent. The problem is that I may want to use Marketing and Statistics in the future and I prefer not to use them for this particular case.

    Plugin Support Antonio Candela

    (@antoiub)

    Hello @jestemzmiasta ,

    I’m glad this helped you right away. I’m sorry to inform you that it is not possible to assign the Preferences category when blocking the script in the Script Center due to how it’s designed to work.

    I hope this will still help you.

    Thread Starter Jestemzmiasta

    (@jestemzmiasta)

    It helped me a lot. Thank You!

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

The topic ‘Block custom script before cookie agree with type=”text/javascript”’ is closed to new replies.