• Resolved falkemediawy

    (@falkemediawy)


    I was wondering how to block inline scripts or other tags without them being inserted at the end of the DOM when opting in.

    I found this page https://complianz.io/developers-guide-for-third-party-integrations/ explaining the data-category-Attributes. So I added the following data-category-Attribute to the script:
    <script async data-category="marketing" src="https://walls.io/js/wallsio-widget-1.2.js" … ></script>

    The script loads nevertheless. How do I make it work?

    Here is an example with a social wall from walls.io.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Jarno Vos

    (@jarnovos)

    Hi @falkemediawy,

    Can you adapt it slightly, to include the type=text/plain part as well?

    <script type="text/plain" async data-category="marketing" src="https://walls.io/js/wallsio-widget-1.2.js" … ></script>

    Kind regards,
    Jarno

    • This reply was modified 3 years, 5 months ago by Jarno Vos.
    Thread Starter falkemediawy

    (@falkemediawy)

    Hi @jarnovos,

    thanks for the quick response.

    type=text/plain is not working for Walls.IO and when I use type=text/javascript the script won’t be blocked.

    Thanks in advance.

    Plugin Contributor Jarno Vos

    (@jarnovos)

    Hi @falkemediawy,

    Seems that the JavaScript embed of WallsIO throws an error when Complianz modifies its script tags to wait for consent. I would switch to their iFrame embed instead.

    I’ve tested the iFrame embed (live example here), this works with the below configuration in the Script Center (Complianz > Integrations > Script Center > Block a script, iframe or plugin).

    Kind regards,
    Jarno

    Thread Starter falkemediawy

    (@falkemediawy)

    Hi @jarnovos,

    the iFrame embedding and blocking works properly, thanks!

    Are you saying that the script integration with type=text/javascript doesn’t work in general?

    Thanks in advance.

    Plugin Contributor Jarno Vos

    (@jarnovos)

    Hi @falkemediawy,

    Thanks for confirming, much appreciated.

    No, what I’m saying is that their JavaScript returns an error when I modify its <script> tags, and it doesn’t reload properly upon obtaining consent as a result. That’s why I’d recommend their iFrame implementation in this case, as it avoids that.

    I’ll mark the thread as resolved for now, but feel free to reach out if you have further questions about the plugin.

    Kind regards,
    Jarno

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

The topic ‘Block inline script or other tags’ is closed to new replies.