@financial-times/cmp-client 3.1.2 → 3.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,21 +21,56 @@ npm install @financial-times/cmp-client
21
21
 
22
22
  ## Usage
23
23
 
24
+ > [!Note]
25
+ > We will be adding new properties (i.e. websites under FT group) and their configs as we start rolling out.
26
+ >
27
+ > Please reach out to the Ads & Privacy team if you think your domain needs a new property config
28
+
29
+ ### Usage on non-FT.com properties
30
+
31
+ ```js
32
+ import { initSourcepointCmp, properties, debug } from "@financial-times/cmp-client";
33
+
34
+ /**
35
+ * Optionally enable debug mode to see CMP events in the console
36
+ */
37
+ debug.logCmpEvents();
38
+
39
+ /**
40
+ * Import your domain's CMP configuration from the `properties` module:
41
+ * e.g. properties.MM_IGNITES_ASIA, properties.SP_THE_BANKER, etc.
42
+ *
43
+ * We will add more domains as we create new properties in Sourcepoint
44
+ *
45
+ * See below for the full list of initialisation options
46
+ */
47
+ initSourcepointCmp({
48
+ propertyConfig: properties["YOUR_PROPERTY_CONFIG_KEY"],
49
+ useConsentStore: false, // Specialist Titles _must_ opt out of Single Consent Store
50
+ });
51
+ ```
52
+
53
+ ### Usage on FT.com
54
+
24
55
  ```js
25
- import { initSourcepointCmp } from "@financial-times/cmp-client/client";
26
- import { FT_DOTCOM_TEST } from "@financial-times/cmp-client/properties";
56
+ import { initSourcepointCmp, properties, debug } from "@financial-times/cmp-client";
27
57
 
28
- // we suggest using a feature flag to disable the existing cookie banner and enable the new one
58
+ /**
59
+ * Optionally enable debug mode to see CMP events in the console
60
+ */
61
+ debug.logCmpEvents();
62
+
63
+ /**
64
+ * We suggest using a feature flag to disable the existing cookie banner
65
+ * and enable the new one
66
+ */
29
67
  if (flagsClient.get("adsDisableInternalCMP")) {
30
68
  initSourcepointCmp({
31
69
  propertyConfig: FT_DOTCOM_TEST,
32
- // useConsentStore: false (set to false for non-FT.com properties or websites)
33
70
  });
34
71
  }
35
72
  ```
36
73
 
37
- We will be adding new properties (websites under FT group) and their configs as we start rolling out. Please reach out to the Ads & Privacy team if you think you need to create a new property for your domain - for example, if it is on a different domain from the `ft.com` domain.
38
-
39
74
  ### CMP configuration options:
40
75
 
41
76
  <table>
package/dist/index.cjs CHANGED
@@ -7,7 +7,7 @@ var __publicField = (obj, key, value) => {
7
7
  };
8
8
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
9
9
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
10
- const version = "3.1.2";
10
+ const version = "3.1.3";
11
11
  const events = {
12
12
  onMessageChoiceSelect: (...args) => {
13
13
  console.log("[debug] onMessageChoiceSelect", args);
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
8
- const version = "3.1.2";
8
+ const version = "3.1.3";
9
9
  const events = {
10
10
  onMessageChoiceSelect: (...args) => {
11
11
  console.log("[debug] onMessageChoiceSelect", args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/cmp-client",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [