Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1420877

    Hi, i have make a multilanguage website and i’m using CookieBot.
    I’m trying to insert the script for generate the Cookie declaration in the single page but the script doesn’t appear.
    I have put it in Text block or Code block but the result is the same.
    Here is the code:
    <script>!function(de,cl,ar,at,i,o,n){let a=de.createElement(at),b=[/^\/([a-z]{2})([_-][a-z]{2})?(\/.*)?$/g.exec(cl),/^([a-z]{2})\./.exec(ar),/\.([a-z]{2,})$/.exec(ar)],c={at:"de",au:"en",ca:"en",cz:"cs",dk:"da",ee:"et",no:"nb",se:"sv",uk:"en"},d=de.scripts,e=d[d.length-1],f=0;for(f of b){b=f?f[1]:n;if(f)break}b=b.length!=2?o:b;b=c[b]?c[b]:b;a.id=i;a.dataset.culture=b;a.src=https://consent.cookiebot.com/${o}/cd.js;e.parentNode.insertBefore(a,e)}(document,location.pathname,location.hostname,"script","CookieDeclaration","820161df-2891-418d-92c8-6cf8e168a6a2","en");</script>

    Some ideas?
    Thanks!

    #1420910

    Hey officinaimmagine,

    Is there some kind of documentation on where the code in question is supposed to go? Do you want it on all pages, or only one?

    Best regards,
    Rikard

    #1420913

    Hi Rikard, the code goes in one single page.
    The Cookiebot support team told me to put the code directly in the text of the page.

    #1420950

    Hi,

    Thanks for the update. Could you post a link to where we can see the problem in question? Please note that our support for third party code is limited.

    Best regards,
    Rikard

    #1421103

    Hi Rikard, shure.
    I have make a test page when i have insert the code first in a Text Block and after in a Code Block.
    Let me know if you need more.
    Thanks!

    #1421137

    Hi,

    Thanks for that. I’m seeing error messages in the browser console, please see private. Are you sure that you copied the code correctly? You might want to reach out to the authors of the code for further help, as we can’t debug problems with third party code.

    Best regards,
    Rikard

    #1421142

    Hi, i copy exactly what the support team write me back.
    I send you the original message.
    Thanks

    #1421149

    Hi,

    Thank you for the update

    The errors are being generated from the https://consent.cookiebot.com/uc.js file. Unfortunately, we are not familiar with this script, so you will need to reach out to the script authors for more assistance.

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.