This (and other packages) need to be executed at client, so they can store a cookie, that consent has been dismissed, so it isn't shown on the web indefinitely.
When you go through step-by-step guide to config the cookieconsent, you'll end up with an easy solution:
However, I don't know where to place the code in Nuxt app. Let me elaborate
The problem is that this should be executed at client, not at a server as the templates are usually executed in Nuxt. Here's a very slight hint on what can be done about it in Nuxt Docs
Context
We need to inform a user, that some cookies are being stored. Simple message + link to privacy policy + button to dismiss cookies
Problem
This (and other packages) need to be executed at client, so they can store a cookie, that consent has been dismissed, so it isn't shown on the web indefinitely. When you go through step-by-step guide to config the cookieconsent, you'll end up with an easy solution:
However, I don't know where to place the code in Nuxt app. Let me elaborate
Load script/style in the Head
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" />
Place js config somewhere
The problem is where to place this:
The problem is that this should be executed at client, not at a server as the templates are usually executed in Nuxt. Here's a very slight hint on what can be done about it in Nuxt Docs