Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 18 additions & 198 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
## [2.0.4](https://github.com/openmail/system1-cmp/compare/v2.0.3...v2.0.4) (2020-09-17)
## [2.1.0](https://github.com/openmail/system1-cmp/compare/2.0.4...2.1.0) (2020-09-23)

### Refactor

- [x] `isServiceSpecific` passed through config, default true.
- [x] Upgrade to vendor-list 56
- [x] Config to turn off Stacks on Layer 1

### Dev Tooling

- [x] CMPVersion managed in package.json and incremented on each change
- [x] Add script to auto-upgrade vendor-list and remote translations using `yarn update-vendor-list`

## [2.0.4](https://github.com/openmail/system1-cmp/compare/2.0.3...2.0.4) (2020-09-17)

### Styling

Expand All @@ -7,21 +20,21 @@
- [x] Add scroll bar
- [x] Auto-position CMP vertically based on purposes

## [2.0.3](https://github.com/openmail/system1-cmp/compare/v2.0.2...v2.0.3) (2020-09-15)
## [2.0.3](https://github.com/openmail/system1-cmp/compare/2.0.2...2.0.3) (2020-09-15)

### Fix

- [x] tcf-2.0-loader add check for Promise finally.
- [x] Add more information on localize fetch error log.

## [2.0.2](https://github.com/openmail/system1-cmp/compare/v2.0.1...v2.0.2) (2020-09-02)
## [2.0.2](https://github.com/openmail/system1-cmp/compare/2.0.1...2.0.2) (2020-09-02)

### Feat

- [x] Automatically set and persist consent signal if valid TC String present on URLParam `?gdpr_consent`
- [x] Enforce boolean properties in logger

## [2.0.1](https://github.com/openmail/system1-cmp/compare/v2.0.0...v2.0.1) (2020-08-31)
## [2.0.1](https://github.com/openmail/system1-cmp/compare/2.0.0...2.0.1) (2020-08-31)

### Refactor

Expand All @@ -33,201 +46,8 @@
- [x] Update logging Error and Save schemas
- [x] Fix initial language configuration

## [2.0.0](https://github.com/openmail/system1-cmp/compare/v1.5.6...v2.0.0) (2020-08-14)
## [2.0.0](https://github.com/openmail/system1-cmp/compare/1.5.6...2.0.0) (2020-08-14)

### Refactor

- [x] Introduce new CMP based on TCF 2.0 framework

## [1.5.7](https://github.com/openmail/system1-cmp/compare/v1.5.6...v1.5.7) (2020-08-17)

### Fix

- [x] Default to hosted vendorlist since IAB removed their global v1 vendorlist
- [x] Check for IAB global vendor list location and remove if manually set
- [x] Add SameSite;secure cookie props for http and https

## [1.5.6](https://github.com/openmail/system1-cmp/compare/v1.5.5...v1.5.6) (2020-06-23)

### Translations

- [x] Update translations for fr, pl

## [1.5.5](https://github.com/openmail/system1-cmp/compare/v1.5.4...v1.5.5) (2020-06-09)

### Translations

- [x] Add translations for ja, sv, pt, nl, zh
- [x] Update translations for es, it

## [1.5.4](https://github.com/openmail/system1-cmp/compare/v1.5.3...v1.5.4) (2020-06-04)

### Styles

- [x] Spruce up title spacing

## [1.5.3](https://github.com/openmail/system1-cmp/compare/v1.5.2...v1.5.3) (2020-05-12)

### Refactor

- [x] Hoist up all translatable text

## [1.5.2](https://github.com/openmail/system1-cmp/compare/v1.5.1...v1.5.2) (2020-05-12)

### Refactor

- [x] Hoist auto-expand purposes accordian to config object

## [1.5.1](https://github.com/openmail/system1-cmp/compare/v1.5.0...v1.5.1) (2020-04-29)

### Fix

- [x] Remove unknown prop from `CMPOnSubmit` event

## [1.5.0](https://github.com/openmail/system1-cmp/compare/v1.4.3...v1.5.0) (2020-04-29)

### Feat

- [x] Add logging to CMP for health monitoring

## [1.4.3](https://github.com/openmail/system1-cmp/compare/v1.4.2...v1.4.3) (2020-02-22)

### Refactor

- [x] `allowedVendorIds` now filters vendors out of the display list, but keeps all vendors in memory
- [x] `pubvendors.json` can now provide custom features
- [x] Update cached global vendor list to v190.
- [x] Fix conflicting eslint, prettier, editorconfig settings

<a name="1.4.2"></a>

## [1.4.2](https://github.com/openmail/system1-cmp/compare/v1.4.1...v1.4.2) (2020-02-21)

### Fix

- [x] Fixes yarn dev and the ReactNative window detection

<a name="1.4.1"></a>

## [1.4.1](https://github.com/openmail/system1-cmp/compare/v1.4.0...v1.4.1) (2020-02-21)

### Refactor

- [x] Adds postMessage to Native Device from info-acs.html

<a name="1.4.0"></a>

## [1.4.0](https://github.com/openmail/system1-cmp/compare/v1.3.5...v1.4.0) (2020-02-20)

### Docs

- [x] Surface more overrides in the `theme` object
- [x] Create new info-acs.html reference as standalone CMP for the info.com Android Choice Screen
- [x] Refactor build for config json files and mutiple html templates

<a name="1.3.5"></a>

## [1.3.5](https://github.com/openmail/system1-cmp/compare/v1.3.4...v1.3.5) (2020-02-19)

### Docs

- [x] Add react native call in reference.html file and bump version

<a name="1.3.4"></a>

## [1.3.4](https://github.com/openmail/system1-cmp/compare/v1.3.3...v1.3.4) (2019-12-03)

### Refactor

- [x] `getCookieDomain()` allows wildcard cookie on naked primary domain (ex: setting `cookieDomain: '.zoo.com'` while on `https://zoo.com`)

<a name="1.3.3"></a>

## [1.3.3](https://github.com/openmail/system1-cmp/compare/v1.3.2...v1.3.3) (2019-12-02)

### Feature

- [x] Add `cookieDomain` config option to allow subdomain cookies

### Fix

- [x] Remove inference of domain in cookie setting because `co.uk` style public-suffixes make this difficult to implement

<a name="1.3.2"></a>

## [1.3.2](https://github.com/openmail/system1-cmp/compare/v1.3.1...v1.3.2) (2019-11-22)

### Refactor

- [x] Trigger onConsentChanged after callback in init to avoid double calls
- [x] eslint / prettier configs and run updates to fix formatting incongruities

### Fix

- [x] Coerce cookie to Boolean to fix '0' coercing to True in onConsentChanged
- [x] Fix failing autoConsent footer test to test Banner

<a name="1.3.1"></a>

## [1.3.1](https://github.com/openmail/system1-cmp/compare/v1.3.0...v1.3.1) (2019-11-21)

### Refactor

- [x] autoconsent should open Banner instead of interstitial

<a name="1.3.0"></a>

## [1.3.0](https://github.com/openmail/system1-cmp/compare/v1.2.0...v1.3.0) (2019-11-20)

### Feat

- [x] add `theme.isBannerModal` config option to enable banner or modal version
- [x] updates styling and moves buttons on initial banner
- [x] vendor consent seelcted ON when inspected instead of OFF by default
- [x] upgrade to node 10 since node 8 EOL in Decemeber
- [x] merge optional pubvendors data and languages data to provide custom purposes, custom vendors, custom features with language overrides
- [x] auto consent when ESC key hit
- [x] auto consent when Banner closed by clicking outside

<a name="1.2.0"></a>

## [1.2.0](https://github.com/openmail/system1-cmp/compare/v1.1.1...v1.2.0) (2019-11-19)

### Refactor

- [x] add `shouldAutoUpgradeConsent` feature to auto-correct consent when the vendor list changes
- [x] Does not trigger onConsentChange event during auto-correct consent or when error received

<a name="1.1.1"></a>

## [1.1.1](https://github.com/openmail/system1-cmp/compare/v1.1.0...v1.1.1) (2019-09-04)

### Refactor

- [x] For Policy Check 3 (provide a direct link to the vendor list in first UI layer), render the `<Banner>` with the Vendor Purposes accordion expanded.

<a name="1.1.0"></a>

## [1.1.0](https://github.com/openmail/system1-cmp/compare/v1.0.0...v1.1.0) (2019-09-03)

### Feature

- [x] Add Vendor Features UI for Policy Check 10 and 13 (insert names and definitions of Features somewhere in your UI and add these information on a vendor per vendor basis. You can find names and definitions of Features and their employment per vendor in the GVL.)

<a name="1.0.0"></a>

## [1.0.0](https://github.com/openmail/system1-cmp/compare/v0.0.1...v1.0.0) (2019-08-19)

### Refactor

- [x] Merge latest from upstream repo
- [x] Merge latest System1 customizations from `modal` branch into footer-UI refactor (see docs in modal branch: https://github.com/Openmail/system1-cmp/tree/modal)

<a name="0.0.1"></a>

## [0.0.1](https://github.com/openmail/system1-cmp/compare/v0.0.0...v0.0.1) (2018-07-02)

### Features

- [x] Initial Release!
- [x] Versioned Deployment and updated README for installing CMP
71 changes: 43 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

# system1-cmp

TCF 2.0 Consent Management Platform (CMP) UI tool. We are in the process of validating this CMP, we will update this repo once it passes TCF 2.0 validation.
System1's implementation of IAB's Transparency and Consent 2.0 Consent Management Platform. A TCF 2.0 compliant CMP that passes all IAB compliance checks and has been validated to participate as a CMP for private use as CMP 38.

[Reference Page and Demo](https://s.flocdn.com/cmp/2.0.4/tcf-2.0.html)
This CMP passes technical and policy compliance checks, but that does not necessarily guarantee legal compliance. Each organisation must make their own assessment of whether they are compliant with the law.

Feel free to fork this CMP and submit to IAB for private use.

[Reference Page and Demo](https://s.flocdn.com/cmp/test/tcf-2.0.html)

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
Expand All @@ -27,12 +31,18 @@ TCF 2.0 Consent Management Platform (CMP) UI tool. We are in the process of vali

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## SDK / Package Details

- `tcf-2.0-loader.js` is < 1kb. It loads the CMP sdk and dynamically checks compatibility and loads the polyfill if necessary.
- `tcf-2.0-cmp.js` is < 50kb. It contains the TCF 2.0 framework (core/api), UI layer for interacting with the CMP, and custom store for persisting choices.
- `polyfills.js` is < 15kb. It contains polyfills required for the CMP to function in IE11.

## Installation / Use

API signatures have changed from the CMP TCF 1.1, but we've tried to keep the configuration process very similar. See a [working example in codepen](https://codepen.io/potench/pen/GRZZprw).
See a [working example in codepen](https://codepen.io/potench/pen/GRZZprw).

```html
<script src="https://s.flocdn.com/cmp/2.0.4/tcf-2.0-loader.js"></script>
<script src="https://s.flocdn.com/cmp/2.1.0/tcf-2.0-loader.js"></script>
<script>
__tcfapi('onConsentAllChanged', 2, function (store) {
const hasConsented = document.cookie.indexOf('gdpr_opt_in=1') >= 0;
Expand All @@ -50,12 +60,11 @@ API signatures have changed from the CMP TCF 1.1, but we've tried to keep the co
console.log('initialization complete', store, error);
},
{
gdprApplies: true,
debugging: true, // console logs
debugging: true, // console logs for debugging integration
logging: true, // pixel logs for monitoring
baseUrl: 'https://s.flocdn.com/cmp/2.0.4/config/2.0', // base url for vendor-lists and translations
scriptSrc: 'https://s.flocdn.com/cmp/2.0.4/tcf-2.0-cmp.js', // cmp SDK
publisherCountryCode: 'AA',
baseUrl: 'https://s.flocdn.com/cmp/2.1.0/config/2.0', // base url for vendor-lists and translations
scriptSrc: 'https://s.flocdn.com/cmp/2.1.0/tcf-2.0-cmp.js', // cmp SDK
publisherCountryCode: 'US', // country code of your business
narrowedVendors: [], // ex [1,2,3,4],
theme: {
primaryColor: '#0099ff',
Expand All @@ -68,7 +77,6 @@ API signatures have changed from the CMP TCF 1.1, but we've tried to keep the co
},
ccpaApplies: true,
gdprApplies: true,
consentRequired: true,
}
);
</script>
Expand Down Expand Up @@ -202,20 +210,24 @@ __tcfapi('init', 2, () => {}, {
| `business` | optional string | `dev` | used to correlate CMP events for monitoring across a businessline. |
| `theme` | optional object | [details below](#theme) | Override styling choices using the following properties. |
| `publisherCountryCode` | optional string | `US` | String representing country code of parent website business |
| `isServiceSpecific` | optional boolean | `true` | true uses publisher consent, false uses global consent |
| `shouldUseStacks` | optional boolean | `true` | true uses stacks on Layer1, TODO stacks need purposes/custom-features toggle to be compliant |

### theme

Override styling choices using the following properties:
Themeing is a bit limited right now. Pass in a `config.theme` object during initialization. Use the following to override styling choices:

- `maxHeightModal`: '50vh'
- `primaryColor`: '#0099ff'
- `textLinkColor`: '#0099ff'
- `secondaryColor`: '#869cc0'
- `featuresColor`: '#d0d3d7'
- `maxHeightModal`: '40vh' // 40vh by default; enforce a maxheight as a %,px,vh
- `shouldAutoResizeModal`: true // false by default; auto resize modal on stacks screen to push purposes below fold. Works in conjunction with `maxHeightModal`
| Theme Property | Type | Default | Detail |
| ----------------------- | ---------------- | ------- | ------------------------------------------------------------------------------------------ |
| `maxHeightModal` | optional string | `45vh` | CSS style for max height of the CMP UI. Example: `45vh`, `50%`, `350px` |
| `shouldAutoResizeModal` | optional boolean | true | Auto detects Layer1 height to minimize UI. UI resizes to `maxHeightModal` upon interaction |
| `primaryColor` | optional string | null | Example: `#0099ff` |
| `textLinkColor` | optional string | null | Example: `#0099ff` |
| `secondaryColor` | optional string | null | Example: `#869cc0` |
| `featuresColor` | optional string | null | Example: `#d0d3d7` |
| `featuresColor` | optional string | null | Example: `#d0d3d7` |

## Initialize from URL Param
## Initialize With Euconsent String from URL Param

We can leverage the spec provided for [URL-based services to process the TC String when it can't execute JavaScript](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20Consent%20string%20and%20vendor%20list%20formats%20v2.md#how-does-a-url-based-service-process-the-tc-string-when-it-cant-execute-javascript) to pass along consent when domains are owned by the same entity.

Expand All @@ -240,15 +252,10 @@ Following Google's [Additional Consent Mode](https://support.google.com/admanage
## TODO

- [ ] Write Unit Tests and Integration Tests
- [ ] Docs
- [ ] Internal Localization
- [ ] Layer 2 Purposes
- [ ] Layer 3 Purpose Details
- [ ] Layer 2 Vendors
- [ ] Theming
- [ ] non-personalized performance and monitoring analytics
- [ ] Validate using the [TCF 2.0 validator extension](https://cmp-validator.consensu.org/chrome-extension/latest/IAB-Europe-CMP-Validator-User-Guide.pdf)
- [ ] Separate polyfill bundle, use babelrc instead of manually importing from core-js
- [ ] Improve Theming
- [ ] Implement global-scope and group-scope
- [ ] Updated hosted iframe for TCF 2.0
- [ ] Delete unused TCF 1.1 and reorganize

## Support Matrix

Expand Down Expand Up @@ -278,3 +285,11 @@ yarn
yarn dev
# browse to http://localhost:8080/tcf-2.0.html
```

### Update Vendor List

IAB updates the vendor list every Friday. Use the included to script to automatically upgrade all vendor-lists. Commit, merge, publish the changes to take effect.

```
yarn upgrade-vendor-list
```
4 changes: 2 additions & 2 deletions config/common.webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import packageJson from '../package.json';

const ENV = process.env.NODE_ENV || 'development';
const CSS_MAPS = ENV !== 'production';
const { name, version } = packageJson;
const { name, version, cmpVersion } = packageJson;

const uglifyPlugin = new webpack.optimize.UglifyJsPlugin({
output: {
Expand Down Expand Up @@ -168,4 +168,4 @@ const commonConfig = {
},
};

export { commonConfig, ENV, CSS_MAPS, name, version, uglifyPlugin };
export { cmpVersion, commonConfig, ENV, CSS_MAPS, name, version, uglifyPlugin };
Loading