Advanced Tutorials
Cookie Wall mode
10min
overview the cookie wall mode changes the behavior of the pubconsent panel, removing the end user’s ability to refuse consent to cookies by enabling this mode, the end user can accept cookies, continuing to browse subscribe to access the content the user can access the preferences management panel, but will only be able to modify the available choices without being able to refuse the cookies necessary for the delivery of advertising pubconsent does not manage login or subscription however, it provides configurations that lead to login and/or subscription pages or to open custom modals through dedicated apis for integration with external systems cookie wall mode configuration activation enable the “cookie wall mode” flag in the pubconsent configurator 2\ integration types simple integration insert the links to the login and subscription pages these will automatically be excluded from the banner rendering advanced integration (with hooks) by enabling the “use hooks” flag, it is possible to define custom behaviors through javascript functions pubtech cookie wall mode hooks { onlogin () => void, onrejectandsubscribe () => void, onwasrejected () => void | null, }; onlogin called on login click if there’s an error, it tries redirecting or logs the error onrejectandsubscribe called on clicking “reject” in case of error, it opens the link or logs the error onwasrejected called when returning to the site after a rejection requires the “save rejected consent” flag still set the login and subscription links as fallback or wrap your function logic inside a try catch to handle errors 3\ exclusion via cookie or url you can avoid displaying the popup using a specific cookie, or excluding certain urls both options can be configured in our configurator the acceptance apis remain active regardless acceptance api to offer the user an alternative to payment in a page or popup you configure when they click “reject and subscribe,” you can integrate a custom button that directly accepts cookies \<button onclick="window pubtech action accept all({isfromcustomerlayer true})" \> accept cookies \</button> the isfromcustomerlayer true parameter allows the cmp to track the action in the reporting dashboard managing subscribed users for already subscribed users, you can disable cookie wall mode via script window pub tech override cmp config = { cookiewallmode false }; this way, the cmp will retain all its configurations selected in the dashboard but cookie wall mode will be excluded, allowing your users to click “reject” for further customization of the parameters chosen in the configurator, you can refer to the configurations override (api) docid 0kcsyy09h1xzzrha0mjen page