14.7.4 • Published 2 days ago

@financial-times/x-privacy-manager v14.7.4

Weekly downloads
602
License
ISC
Repository
github
Last release
2 days ago

x-privacy-manager

This module creates an interface giving users the ability to give or withhold consent to the sale of their data under the provisions of the CCPA (California Consumer Protection Act), as a first step towards the FT's journey towards a Unified Privacy solution.

It is rendered with Page Kit on FT.com at https://www.ft.com/preferences/privacy-ccpa as part of next-control-centre and rendered directly by the FT App. Additionally, it is intended to be embedded on pages curated by Specialist Titles

Privacy Manager UI

Installation

This module is supported on Node 12 and is distributed on npm.

npm install --save @financial-times/x-privacy-manager

The x-engine module is used to inject your chosen runtime into the component. Please read the x-engine documentation first if you are consuming x- components for the first time in your application.

Usage

Properties

FeatureTypeNotes
consentSourcestringName of the consuming app to be included in requests to Consent Proxy (e.g. "next-control-centre")
consentProxyEndpointsobjectDictionary containing already-formed Consent Proxy Endpoints to use (including userId). It must include, at least, consentProxyEndpoints.createOrUpdateRecord
consentboolean(optional) Any existing preference expressed by the user
referrerstring(optional) Used to provide a link back to the referring app's home page
cookieDomainstring(optional) Specify the domain for the cookie set with the response from Consent Proxy (e.g. ".thebanker.com"). Will default to ".ft.com" if not provided
legislationstring[](optional) An array of the applicable legislation IDs
onConsentSavedCallbacksfunction[](optional) An array of callbacks to invoken after a successful request to Consent Proxy

A callback registered with onConsentSavedCallbacks will be executed with the following signature:

customCallback(
  err: null | Error,
  {
    consent: boolean,
    payload: {
      formOfWordsId: string,
      consentSource: string,
      cookieDomain?: string,
      data: {
        ['behaviouralAds' | 'demographicAds' | 'programmaticAds']: {
          onsite: {
            status: boolean;
            lbi: boolean;
            source: string;
            fow: string;
          }
        }
      }
    }
  }
)

Callbacks are executed on regardless of the success (200 status) or failure of the call to the server, so we encourage returning early if the value of the error is anything but null:

function setCookie(err, {consent, payload}) {
  if(err) return;

  // Store the value of `consent`
  const uspString = `1Y${consent ? "N" : "Y"}N`;
  document.cookie = `usprivacy=${uspString}; max-age=${60 * 60 * 24 * 365}`;
}
14.7.4

2 days ago

14.7.2

23 days ago

14.7.3

8 days ago

14.7.1

1 month ago

14.6.5

1 month ago

14.7.0

1 month ago

14.6.3

2 months ago

14.6.4

2 months ago

14.6.2

2 months ago

14.6.0

2 months ago

14.6.1

2 months ago

14.5.2

3 months ago

14.5.0

3 months ago

14.5.1

3 months ago

14.4.2

3 months ago

14.4.1

4 months ago

14.4.0

4 months ago

14.3.1

4 months ago

14.3.0

4 months ago

14.2.0

5 months ago

14.1.0

6 months ago

14.1.1

6 months ago

14.1.2

6 months ago

12.0.0

10 months ago

12.0.1

10 months ago

12.0.2

9 months ago

11.2.0

11 months ago

13.0.0

9 months ago

13.0.1

9 months ago

12.0.0-beta.2

11 months ago

12.0.0-beta.3

11 months ago

12.0.0-beta.1

11 months ago

12.0.1-beta.1

11 months ago

14.0.0

9 months ago

14.0.1

8 months ago

14.0.2

8 months ago

14.0.3

8 months ago

14.0.4

7 months ago

11.1.1

12 months ago

11.1.2

11 months ago

11.1.0

12 months ago

10.4.0

1 year ago

11.0.0

1 year ago

10.5.0

1 year ago

10.3.0

1 year ago

10.0.0

1 year ago

10.2.0

1 year ago

10.1.0

1 year ago

10.1.1

1 year ago

10.1.2

1 year ago

8.2.3

1 year ago

8.2.2

2 years ago

8.2.5

1 year ago

8.2.4

1 year ago

8.1.1

2 years ago

8.2.1

2 years ago

8.2.0

2 years ago

8.1.0

2 years ago

8.0.5

2 years ago

8.0.4

2 years ago

8.0.6

2 years ago

8.0.3

2 years ago

8.0.2

2 years ago

6.8.2-beta.1

2 years ago

8.0.1

2 years ago

8.0.1-beta.1

2 years ago

6.8.1

2 years ago

7.0.0

2 years ago

8.0.0

2 years ago

6.3.1

2 years ago

6.6.0

2 years ago

6.8.0

2 years ago

6.4.1

2 years ago

6.7.1

2 years ago

6.3.0

2 years ago

6.2.12

2 years ago

6.2.10

2 years ago

6.2.11

2 years ago

6.2.7

3 years ago

6.2.9

3 years ago

6.2.8

3 years ago

6.2.5

3 years ago

6.2.6

3 years ago

6.2.4

3 years ago

6.2.3

3 years ago

6.2.2

3 years ago

4.1.5

3 years ago

6.2.1

3 years ago

6.2.0

3 years ago

6.1.0

3 years ago

6.0.0

3 years ago

5.2.0

3 years ago

5.1.0

3 years ago

5.0.1

3 years ago

5.0.0

3 years ago

4.1.4

3 years ago

4.1.3

3 years ago

4.1.2

3 years ago

4.1.1

3 years ago

4.1.0

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.3.1

3 years ago

3.3.0

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.0

3 years ago

2.1.0

3 years ago

2.0.6

3 years ago

2.0.5

4 years ago

2.0.2

4 years ago

1.7.0

4 years ago

1.6.9

4 years ago

1.6.8

4 years ago

1.6.7

4 years ago

1.6.4

4 years ago

1.6.3

4 years ago

1.6.2

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.4

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

0.1.0

4 years ago