• Resolved Jestemzmiasta

    (@jestemzmiasta)


    I need help. I have the Tawk plugin installed, which inserts in the footer <script id=”tawk-script” type=”text/javascript”></script> that displays the chat. I want to run the script after user give consent to cookies.

    I understand well both variants that you provided here, but I have no idea how to apply them to my situation. If i was inserting plugin manually, I could apply your solution. But when it’s automatic generated…

    First of all, I can’t go into the footer editor and wrap code added by plugin with

    //Functional <script type="text/javascript" data-category="functional"></script> 

    because plugin inserts it only when the page is running. Please tell me how do I have to wrap the code inserted by the plugin with the upper code.

    I also don’t know how to do the second solution – adding the code to Script Center, because the code is inserted by a plugin. I assume that this Script Center will allow me to block the plugin if I paste the script through the Center myself?

    Please help. Thank you.

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

    (@jarnovos)

    Hi @jestemzmiasta,

    As you don’t have “control” over the script since it’s being placed by the Tawk plugin, in this case, you can use the “Block a script, iframe or plugin” field under Complianz -> Integrations -> Script Center to do that.

    Enter embed.tawk.to as the URL to block, and select the category that you want to require consent for. You don’t have to enable the async, placeholder or dependency options in this case.

    Kind regards, Jarno

    Thread Starter Jestemzmiasta

    (@jestemzmiasta)

    Thank you very much for help. Everything works as it should. I only have 2 additional questions.

    1. Is it possible to make a custom category next to Marketing and Statistics?

    2. How do you know that “embed.tawk.to” must have been entered in URL field? How? Is there an algorithm what to enter in this field if I have a problem with another plug-in in the future?

    I wish you all the best!

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @jestemzmiasta,

    Glad to hear it works!

    #1 is indeed not possible via the Script Center.

    For #2, you can determine this by taking a “unique” part of the script that you want to block, and using that as the “URL/part of script to block” in Complianz.

    Complianz will then find the scripts containing that exact text, and blocks them. In this case I used “embed.tawk.to” to block the script, but “Tawk_API” for example would’ve done the trick as well.

    Kind regards, Jarno

    • This reply was modified 1 year, 1 month ago by jarnovos.
    Thread Starter Jestemzmiasta

    (@jestemzmiasta)

    That was very helpfull. Thank You once again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Tawk. How to add consent to script added by plugin in footer’ is closed to new replies.