Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Jul 1, 2021. It is now read-only.
/boros-CMPPublic archive

GDPR CMP (Consent Managment Provider) implementation

License

NotificationsYou must be signed in to change notification settings

scm-spain/boros-CMP

Repository files navigation

Boros CMP

Build statuscodecovGitHub licensenpm version

Table of Contents

About

Boros CMP is a stand alone Consent Management Provider solution compliant with the "Transparency & Consent Framework" standard established by theIAB Europe.

Boros CMP is registered with ID 129

Features

  • Open Source project
  • Supports theIAB specification
  • Supports consent management for a single site or multiple sites from a single brand
  • Stand alone project (without User Interface). We also developed aUser Interface and abundle project including UI + CMP
  • Have a look at ourCMP Showcase and try Boros

Technical features

  • Importable as a library from NPM.
  • Developed in Javascript (ECMAScript 6) using Promises and Events
  • We ❤️ Domain Driven Design
  • Supports local storage using single site cookie
  • Supports global storage using multi site cookie via iFrames

Usage

Boros CMP is available asnpm package named@adv-ui/boros-cmp.

To install the last stable version:

npm install --save @adv-ui/boros-cmp

To initialize Boros CMP usingdefault configuration values:

importboroscmpfrom'@adv-ui/boros-cmp'boroscmp.init().then(()=>{// do your stuff ...})

To initialize Boros CMP using customized configuration values:

importboroscmpfrom'@adv-ui/boros-cmp'constcustomConfig={gdpr:{gdprApplies:true,storeConsentGlobally:false},consent:{consentScreen:1,consentLanguage:'es'}}boroscmp.init({config:customConfig}).then(()=>{// do your stuff ...})

Notice thatinit method is returning aPromise but you can subscribe tocmpReady event instead:

importboroscmpfrom'@adv-ui/boros-cmp'window.document.addEventListener("cmpReady",(event)=>{// do your stuff ...// like calling window.__cmp( ...})boroscmp.init()

You could also import directly the library instead the bundled version. By using this, it will assume you're providing the @babel/runtime dependency, helpers and polyfills needed to get it working but it will give you a better size by reusing your packages.

importboroscmpfrom'@adv-ui/boros-cmp/lib'boroscmp.init().then(()=>{// do your stuff ...})

Initialize Boros cmp global version

Boros should be initialized with at least this custom configuration

importboroscmpfrom'@adv-ui/boros-cmp'constcustomConfig={gdpr:{storeConsentGlobally:true,globalConsentLocation:'http://local.schibsted.io:8000/index.html'}}boroscmp.init({config:customConfig}).then(()=>{// do your stuff ...})

In the globalConsentLocation provided, a server should be running and it should have the boros script builded for global version on it (global.dev.js or global.pro.js).

Configuration

There are some default configuration values that can be overwritten before CMP is loaded. Following you will find all the configuration properties and their default values.

Configuration Properties and default Values

PropertyDescriptionDefault Value
gdpr.gdprAppliesDefines if GDPR applies or not.true
gdpr.storeConsentGloballyDefines if Consent Storage is Global (true) or Local (false).false
gdpr.globalConsentLocationThe source URL of global storage html.
consent.consentScreenScreen number where consent was given.1
consent.consentLanguageDefines the language for the UI.es
vendorList.hostHost URL to retrieve Vendor lists.https://vendorlist.consensu.org
log.levelDefines the Log level.3

gdpr.gdprApplies

Defines if GDPR applies or not.

gdpr.storeConsentGlobally

Defines if Consent Storage is Global (true) or Local (false).

gdpr.globalConsentLocation

The source URL of global storage html.

consent.consentScreen

Defines the Screen number in the CMP where consent was given. The screen number is CMP and CmpVersion specific, and is for logging proof of consent

consent.consentLanguage

This language will be used by the User interface using CMP. Language values areISO 639-1 (2 letter codes).By default,es will be used.

Check the available translations here:https://register.consensu.org/Translation

vendorList.host

To find Vendor lists, CMP tries to retrieve a JSON namedvendorlist.json and uses the IAB version structure, as follows:

log.level

Available log level values:

CodeLevel
1debug
2info
3warn
4error
5off

CMP version

CMP version is set according to the version defined inside thepackage.json file. IAB standard uses only one number to define this version, so only the major version (first digit) will be used.

License

CMP isMIT licensed.


[8]ページ先頭

©2009-2025 Movatter.jp