@apolitical/gtm 1.0.0-rc.2 → 1.0.1-rc.2
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 +7 -5
- package/build/index.js +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,10 +5,12 @@ 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
|
-
## [0.1
|
|
9
|
-
###
|
|
10
|
-
-
|
|
8
|
+
## [1.0.1] - 2021-04-07
|
|
9
|
+
### Changed
|
|
10
|
+
- TagManager is initialized only when cookie consent is given
|
|
11
|
+
### Added
|
|
12
|
+
- Add `react` and `react-cookies` to dependencies
|
|
11
13
|
|
|
12
|
-
## [
|
|
14
|
+
## [1.0.0] - 2021-04-06
|
|
13
15
|
### Added
|
|
14
|
-
-
|
|
16
|
+
- Initialize Google Tag Manager with GTM container Id
|
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t
|
|
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}()}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apolitical/gtm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1-rc.2",
|
|
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",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
64
|
"jest": {
|
|
65
|
+
"testEnvironment": "jsdom",
|
|
65
66
|
"bail": true,
|
|
66
67
|
"clearMocks": true,
|
|
67
68
|
"collectCoverage": true,
|