@apolitical/gtm 1.0.1 → 1.1.0-rc.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.1.0] - 2021-04-25
9
+
10
+ Change to work with implementation on randomized client Id depending on cookie consent status
11
+
12
+ ### Changed
13
+ - Always initialize TagManager on the frontends, disregarding the stats of cookie consent
14
+
8
15
  ## [1.0.1] - 2021-04-07
9
16
  ### Changed
10
17
  - TagManager is initialized only when cookie consent is given
package/build/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-gtm-module")):"function"==typeof define&&define.amd?define(["react-gtm-module"],t):"object"==typeof exports?exports.ApoliticalGTM=t(require("react-gtm-module")):e.ApoliticalGTM=t(e["react-gtm-module"])}(this,(function(e){return function(){"use strict";var t={273:function(t){t.exports=e}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){n.r(r),n.d(r,{setContext:function(){return l},setupGTM:function(){return p}});var e=n(273),t=n.n(e);const{APOLITICAL:{WEBSITES:{BETA:o,BETA_2:i,LIVE:c,RC:a}}}={APOLITICAL:{WEBSITES:{BETA:"https://beta.apolitical.co",BETA_2:"https://beta-2.apolitical.co",LIVE:"https://apolitical.co",RC:"https://rc.apolitical.co"},ENVIRONMENTS:{BETA:"beta",BETA_2:"beta",RC:"rc",LIVE:"master"}}};let u=null;const l=({configs:e,origin:t=null})=>{u=((e,t)=>{let n=null,r=null;switch(n="undefined"!=typeof window?window.origin||window.location.origin:t,n){case o:r=e.beta;break;case i:r=e["beta-2"];break;case c:r=e.live;break;case a:r=e.rc;break;default:r=e.local}return r})(e,t)},f=()=>u,p=e=>{const o=f();"true"===e["performance-cookie-consent"]&&t().initialize({gtmId:o.id})}}(),r}()}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-gtm-module")):"function"==typeof define&&define.amd?define(["react-gtm-module"],e):"object"==typeof exports?exports.ApoliticalGTM=e(require("react-gtm-module")):t.ApoliticalGTM=e(t["react-gtm-module"])}(this,(function(t){return function(){"use strict";var e={273:function(e){e.exports=t}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var i=o[t]={exports:{}};return e[t](i,i.exports,n),i.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return function(){n.r(r),n.d(r,{setContext:function(){return l},setupGTM:function(){return p}});var t=n(273),e=n.n(t);const{APOLITICAL:{WEBSITES:{BETA:o,BETA_2:i,LIVE:c,RC:a}}}={APOLITICAL:{WEBSITES:{BETA:"https://beta.apolitical.co",BETA_2:"https://beta-2.apolitical.co",LIVE:"https://apolitical.co",RC:"https://rc.apolitical.co"},ENVIRONMENTS:{BETA:"beta",BETA_2:"beta",RC:"rc",LIVE:"master"}}};let u=null;const l=({configs:t,origin:e=null})=>{u=((t,e)=>{let n=null,r=null;switch(n="undefined"!=typeof window?window.origin||window.location.origin:e,n){case o:r=t.beta;break;case i:r=t["beta-2"];break;case c:r=t.live;break;case a:r=t.rc;break;default:r=t.local}return r})(t,e)},f=()=>u,p=()=>{const t=f();e().initialize({gtmId:t.id})}}(),r}()}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/gtm",
3
- "version": "1.0.1",
3
+ "version": "1.1.0-rc.1",
4
4
  "description": "Browser library to interact with Google Tag Manager (GTM)",
5
5
  "author": "Apolitical Group Limited <engineering@apolitical.co>",
6
6
  "license": "MIT",