Usercentrics - PUBLIC

Nuxt.js

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.

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.


CMPv1 Code

Add the following two scripts to the <head>-section of your nuxt.config.js file for CMP V1 Settings-ID:


CMPv2 Code

If you are using CMP V2 Settings-ID, please add these below two scripts to the <head>-section of your nuxt.config.js file:

script: [ { type: 'application/javascript', src: 'usercentrics-helper.js'}, { type: 'application/javascript', src: 'https://app.usercentrics.eu/browser-ui/latest/loader.js', id: 'usercentrics-cmp', 'data-settings-id':'XXXXXXX'} ],

TCF2 Code

If you are using TCF 2.0 Settings-ID, please add these below two scripts to the <head>-section of your nuxt.config.js file:

script: [ { type: 'application/javascript', src: 'usercentrics-helper.js'}, { type: 'application/javascript', src: 'https://app.usercentrics.eu/browser-ui/latest/loader.js', id: 'usercentrics-cmp', 'data-settings-id':'XXXXXXX', 'data-tcf-enabled': true } ],

Implementation

  1. Replace “XXXXXX” with your Usercentrics SettingsID.

  2. Add a “usercentrics-helper.js” file to your “./static” directory.

  3. Insert the following code into the “usercentrics-helper.js” file:

    window.usercentrics = { settingsId: 'XXXXXX' }; window["usercentrics"] = { paths: { "bundle": "https://app.usercentrics.eu/latest/bundle.js", }, settingsIds: 'XXXXXX', settingsVersionOverwrite: 'preview', };
  4. Replace “XXXXXX” with your Usercentrics SettingsID.


Do you need further help?

How can I get help with technical questions?

 

Usercentrics - PUBLIC