I am trying to add a cookie consent banner from OneTrust. It's easy enough to add the banner, just include a js file in the tag and the script does the magic.
My problem is that the banner keeps reappearing everytime I navigate on my site. I have tried using another sites cookie consent script and get the same problem on my site, while on theirs the banner does not reappear on navigation after I accept. This leads me to believe that my umbraco instance is clearing cache somehow or not storing it properly for this script.
The debug-flag in my web.config is set to false, I don't know of anything else that would force a cache reload.
I have tried to browse the site on other computers/phones.
I tried hosting the script locally on the server and from a cdn.
Is anyone else using the consent script from OneTrust?
Does anyone recognize this type of issue?
Any help/tip is appreciated.
Umbraco isn't clearing cache or store cookie, you have full control over source control of pages. Maybe something with a domain name that is using in cookies, can you check what domain cookies are using?
This seems to be it. A quick search in the script and I found that it is looking at www.mysite.com, I have been browsing on mysite.com without the www. Browsing my site with the www added did not make the banner reappear.
OneTrust cookie concent
Hello.
I am trying to add a cookie consent banner from OneTrust. It's easy enough to add the banner, just include a js file in the tag and the script does the magic.
My problem is that the banner keeps reappearing everytime I navigate on my site. I have tried using another sites cookie consent script and get the same problem on my site, while on theirs the banner does not reappear on navigation after I accept. This leads me to believe that my umbraco instance is clearing cache somehow or not storing it properly for this script.
The debug-flag in my web.config is set to false, I don't know of anything else that would force a cache reload. I have tried to browse the site on other computers/phones. I tried hosting the script locally on the server and from a cdn.
Is anyone else using the consent script from OneTrust? Does anyone recognize this type of issue? Any help/tip is appreciated.
Hi Igor
Umbraco isn't clearing cache or store cookie, you have full control over source control of pages. Maybe something with a domain name that is using in cookies, can you check what domain cookies are using?
Alex
Hi Alex,
This seems to be it. A quick search in the script and I found that it is looking at www.mysite.com, I have been browsing on mysite.com without the www. Browsing my site with the www added did not make the banner reappear.
Thank you! This saved me a lot of headache.
You are welcome. Always post questions on this forum, our community is the best.
Have a great day!
Alex
is working on a reply...