Next.js Discord

Discord Forum

OneTrust Cookie Banner Reappearing on Page Refresh

Unanswered
Transylvanian Hound posted this in #help-forum
Open in Discord
Transylvanian HoundOP
I'm using OneTrust for cookie consent in our project, but the cookie banner keeps reappearing every time I refresh the page, even after clicking the "Accept All Cookies" button.

Here's the relevant script I'm using:

// onetrust.js
// Imported this script file in layout.tsx
function OptanonWrapper() { }


Has anyone encountered this issue before? Any suggestions on how to fix it?

Thanks in advance for your help!

0 Replies