• Resolved Tina

    (@tinareisweb)


    Hi, I need to integrate the following script on my site and display a placeholder before consent, but the documentation for script center unfortunately didn’t fully help me.

    <div class="fundraisingbox-consent">
    <script type="text/javascript" src="https://secure.fundraisingbox.com/app/paymentJS?hash=473894775"></script><noscript>Bitte Javascript aktivieren</noscript><a target="_blank" href="https://www.fundraisingbox.com"><img border="0" style="border: 0 !important" src="https://secure.fundraisingbox.com/images/FundraisingBox-Logo-Widget.png" alt="FundraisingBox Logo" /></a>
    </div>

    I have “consent per service” on my site.

    What I tried is:

    In script center, I added a new script/plugin/iframe to block and added the .js file as URL to block:

    https://secure.fundraisingbox.com/app/paymentJS?hash=473894775

    I activated a placeholder and added the CSS class “fundraisingbox-consent”.

    On my page, I the code above in the div with the CSS class, as you can see above.

    That activates a placeholder, but when I click it, the code loads but without the JS. This part is missing:

    <script type="text/javascript" src="https://secure.fundraisingbox.com/app/paymentJS?hash=473894775"></script>

    When I whitelist the URL of the js file as I read somewhere in documentation, everything looks like it is working fine, but if you look into Storage, the cookies get set anyways, which means the javascript runs somehow in the background without being blocked before consent.

    Can you help?

    Thank you!

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

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

    (@jarnovos)

    Hi @tinareisweb,

    I will check for a method to correctly block & handle this script after consent, but when I tried testing with your exact code I got a “missing configuration” error (probably because my domain isn’t allowed to embed your specific code).

    I’ve requested an account on their platform to get my own embed code, but it seems that I have to wait for some manual verification on their end to proceed.

    I’ll let you know if there are any updates about this.

    Kind regards, Jarno

    Thread Starter Tina

    (@tinareisweb)

    Hi Jarno, thanks very much! Yes, the embed code is per domain. Let me know if I can help with anything else at all.

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @tinareisweb,

    I suspect that it occurs because this script tries using document.write, which can only be used while the page is still loading. Once the page has loaded, using document.write would overwrite the entire page, which is why browsers block it in asynchronously loaded scripts.

    My request for an account was rejected unfortunately, so I’m unable to test with your implementation on my end. But if the problem occurs when blocking their ‘main’ JavaScript, perhaps you’d need to take a different approach here.

    So, instead of blocking the JS URL you shared and adding a placeholder to fundraisingbox-consent:

    Could you try blocking the following URL instead, and indicating that “the blocked content is an iFrame”?

    secure.fundraisingbox.com/app/payment?

    Note that this might not prevent all of their resources from loading before consent is obtained, as the initial JS used to render the iFrame will still be loaded to prevent the described behavior from occurring (although the tool seems to just place a “CORS” related cookie, for security reasons).

    Kind regards, Jarno

    Thread Starter Tina

    (@tinareisweb)

    Hi Jarno,

    Thank you! That doesn’t do anything, I’m afraid – it loads without any blocking. I think I’ll have to see if we can load this before consent per legitimate interest or the like – thank you anyways! It’s a shame your request for an account was rejected.

    Best,

    Tina

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Integrate Fundraisingbox script after consent’ is closed to new replies.