Nuxt.js is a free and open-source web application framework based on Vue.js, Node.js, Webpack and Babel.js to which we provide an implementation as well.
CMPv3 Code
If you are using CMP V3 Settings-ID, please add the following code to your nuxt.config.js file, inside defineNuxtConfig, replacing XXXXXXX with your settingsId:
scripts: {
globals: {
ucLoader: {
src: "https://web.cmp.usercentrics.eu/ui/loader.js",
type: "application/javascript",
id: "usercentrics-cmp",
"data-settings-id": "XXXXXXX",
async: true,
},
},
},
CMPv2 Code
If you are using CMP V2 Settings-ID, please add the following code to your nuxt.config.js file, inside defineNuxtConfig, replacing XXXXXXX with your settingsId:
scripts: {
globals: {
ucLoader: {
type: "application/javascript",
src: "https://app.usercentrics.eu/browser-ui/latest/loader.js",
id: "usercentrics-cmp",
"data-settings-id": "XXXXXXX",
async: true,
},
},
},
TCF2 Code
If you are using TCF 2.2 Settings-ID, please add the following code to your nuxt.config.js file, inside defineNuxtConfig, replacing XXXXXXX with your settingsId :
CMP V2:
scripts: {
globals: {
ucLoader: {
type: "application/javascript",
src: "https://app.usercentrics.eu/browser-ui/latest/loader.js",
id: "usercentrics-cmp",
"data-settings-id": "XXXXXXX",
"data-tcf-enabled": true,
async: true,
},
},
},
- CMP V3:
scripts: {
globals: {
ucStub: {
src: "https://web.cmp.usercentrics.eu/tcf/stub.js",
type: "application/javascript",
},
ucLoader: {
src: "https://web.cmp.usercentrics.eu/ui/loader.js",
type: "application/javascript",
id: "usercentrics-cmp",
"data-settings-id": "hKTmJ4UVL",
"data-tcf-enabled": true,
async: true,
},
},
},
Do you need further help?
How can I get help with technical questions?