/
Angular

Usercentrics - PUBLIC

Angular

For Angular Implementation, you will need to install Angular CLI globally on your machine. You can install it, by running it on the terminal:

npm install -g @angular/cli

We assume that you have node.js installed on your computer.


Assuming that you have an Angular App already working, you can implement our Usercentrics Script in the following way:

CMPv1 Implementation

  • Open index.html in your app directory

  • Add the following script to the <head> tag:

    //Change 'xxxxxx' to your settingsID <script> window.usercentrics = { settingsId: 'xxxxxx' }; window["usercentrics"] = { paths: { "bundle": "https://app.usercentrics.eu/latest/bundle.js", }, settingsIds: 'xxxxxx', settingsVersionOverwrite: 'preview', }; </script>

CMPv2 Implementation

  • Open index.html in your app directory

  • Add the following script to the <head> tag:

    //Change 'xxxxxx' to your settingsID //Normal Bundle <script id="usercentrics-cmp" data-settings-id="XXXXXXXX" src="https://app.usercentrics.eu/browser-ui/latest/loader.js" async></script>

Do you need further help?

How can I get help with technical questions?

 

Related content

React
More like this
Single Page Applications
Single Page Applications
Read with this
Usercentrics + Joomla! Implementation Guide (CMP v1 and v2)
Usercentrics + Joomla! Implementation Guide (CMP v1 and v2)
More like this
Vue.js
Read with this
Usercentrics WordPress Implementation Guide
Usercentrics WordPress Implementation Guide
More like this
Integration with third party tools
Integration with third party tools
Read with this

Usercentrics - PUBLIC