chefcookie 2.8.0 → 2.8.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 CHANGED
@@ -4,7 +4,21 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
- #### [2.7.9](https://github.com/vielhuber/chefcookie/compare/2.7.9...2.7.9)
7
+ #### [2.8.1](https://github.com/vielhuber/chefcookie/compare/2.8.1...2.8.1)
8
+
9
+ #### [2.8.1](https://github.com/vielhuber/chefcookie/compare/2.8.0...2.8.1)
10
+
11
+ > 28 June 2023
12
+
13
+ - Add microsoft ads. [`83e530b`](https://github.com/vielhuber/chefcookie/commit/83e530b8d1f546c822c3e9c4cb3ed84675d0758f)
14
+ - Update changelog. [`efa3e8b`](https://github.com/vielhuber/chefcookie/commit/efa3e8bb85854c50cbf076dd8e122da87c9f0531)
15
+
16
+ #### [2.8.0](https://github.com/vielhuber/chefcookie/compare/2.7.9...2.8.0)
17
+
18
+ > 23 April 2023
19
+
20
+ - Improve page speed detection. [`55097fb`](https://github.com/vielhuber/chefcookie/commit/55097fb6fb00a6683a9a026031fcf622ad71ce9f)
21
+ - Update changelog. [`6fce4cb`](https://github.com/vielhuber/chefcookie/commit/6fce4cb7db599d076cc14f45a5d18268264338a5)
8
22
 
9
23
  #### [2.7.9](https://github.com/vielhuber/chefcookie/compare/2.7.8...2.7.9)
10
24
 
package/README.md CHANGED
@@ -28,6 +28,7 @@ chefcookie is a gdpr cookie solution without compromises.
28
28
  - [twitter ads](https://ads.twitter.com)
29
29
  - [taboola ads](https://www.taboola.com)
30
30
  - [match2one ads](https://www.match2one.com)
31
+ - [microsoft ads](https://ads.microsoft.com)
31
32
  - [linkedin](https://business.linkedin.com/marketing-solutions/conversion-tracking)
32
33
  - [etracker](https://www.etracker.com)
33
34
  - [matomo analytics](https://matomo.org)
@@ -171,6 +172,7 @@ const cc = new chefcookie({
171
172
  twitter: 'single',
172
173
  taboola: 'xxxxxxx',
173
174
  match2one: 'xxxxxxxx',
175
+ microsoft: 'xxxxxxxx',
174
176
  linkedin: 'xxxxxxx',
175
177
  etracker: 'xxxxxx',
176
178
  matomo: 'xxxxxx#x', // domain/siteid
@@ -210,6 +212,7 @@ const cc = new chefcookie({
210
212
  cc.load('twitter', 'single');
211
213
  cc.load('taboola', 'xxxxxxx');
212
214
  cc.load('match2one', 'xxxxxxxx');
215
+ cc.load('microsoft', 'xxxxxxxxx');
213
216
  cc.load('linkedin', 'xxxxxxx');
214
217
  cc.load('etracker', 'xxxxxx');
215
218
  cc.load('matomo', 'xxxxxx#x');
@@ -309,6 +312,7 @@ its recommended to place those kind of links inside your privacy page:
309
312
  <a href="#" data-cc-disable="twitter" data-cc-message="Twitter Pixel aktivieren">Twitter Pixel deaktivieren</a>
310
313
  <a href="#" data-cc-disable="taboola" data-cc-message="Taboola Pixel aktivieren">Taboola Pixel deaktivieren</a>
311
314
  <a href="#" data-cc-disable="match2one" data-cc-message="Match2One Pixel aktivieren">Match2One Pixel deaktivieren</a>
315
+ <a href="#" data-cc-disable="microsoft" data-cc-message="Microsoft Ads aktivieren">Microsoft Ads deaktivieren</a>
312
316
  <a href="#" data-cc-disable="linkedin" data-cc-message="LinkedIn Pixel aktivieren">LinkedIn Pixel deaktivieren</a>
313
317
  <a href="#" data-cc-disable="etracker" data-cc-message="etracker aktivieren">etracker deaktivieren</a>
314
318
  <a href="#" data-cc-disable="matomo" data-cc-message="Matomo aktivieren">Matomo deaktivieren</a>
@@ -362,6 +366,7 @@ the following keywords as keys are reserved:
362
366
  - `twitter`
363
367
  - `taboola`
364
368
  - `match2one`
369
+ - `microsoft`
365
370
  - `linkedin`
366
371
  - `etracker`
367
372
  - `matomo`
package/_build/script.js CHANGED
@@ -323,7 +323,7 @@ var chefcookie = /*#__PURE__*/function () {
323
323
  if (typeof exclude__value === 'function' && exclude__value() === true) {
324
324
  excluded = true;
325
325
  }
326
- if (typeof exclude__value === 'string' && (exclude__value.indexOf('http') === 0 && exclude__value === window.location.protocol + '//' + window.location.host + window.location.pathname || exclude__value.indexOf('http') !== 0 && exclude__value === window.location.pathname || exclude__value.indexOf('http') !== 0 && exclude__value === decodeURI(window.location.pathname) || exclude__value.indexOf('http') !== 0 && exclude__value + '/' === window.location.pathname || exclude__value.indexOf('http') !== 0 && exclude__value + '/' === decodeURI(window.location.pathname))) {
326
+ if (typeof exclude__value === 'string' && (exclude__value.indexOf('http') === 0 && exclude__value === window.location.protocol + '//' + window.location.host + window.location.pathname || exclude__value.indexOf('http') !== 0 && exclude__value === window.location.pathname || exclude__value.indexOf('http') !== 0 && exclude__value === decodeURI(window.location.pathname) || exclude__value.indexOf('http') !== 0 && '/' + exclude__value.replace(/^\/+|\/+$/g, '') + '/' === '/' + window.location.pathname.replace(/^\/+|\/+$/g, '') + '/' || exclude__value.indexOf('http') !== 0 && '/' + exclude__value.replace(/^\/+|\/+$/g, '') + '/' === '/' + decodeURI(window.location.pathname).replace(/^\/+|\/+$/g, '') + '/')) {
327
327
  excluded = true;
328
328
  }
329
329
  });
@@ -880,64 +880,70 @@ var chefcookie = /*#__PURE__*/function () {
880
880
  _script5.innerHTML = 'window.m2o = true;';
881
881
  document.head.appendChild(_script5);
882
882
  }
883
- if (provider === 'linkedin') {
883
+ if (provider === 'microsoft') {
884
884
  var _script6 = document.createElement('script');
885
- _script6.innerHTML = "\n _linkedin_partner_id = \"".concat(id, "\";\n window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];\n window._linkedin_data_partner_ids.push(_linkedin_partner_id);\n ");
886
- document.body.appendChild(_script6);
887
- _script6 = document.createElement('script');
888
- _script6.innerHTML = "\n (function(){var s = document.getElementsByTagName(\"script\")[0];\n var b = document.createElement(\"script\");\n b.type = \"text/javascript\";b.async = true;\n b.src = \"https://snap.licdn.com/li.lms-analytics/insight.min.js\";\n s.parentNode.insertBefore(b, s);})();\n ";
889
- document.body.appendChild(_script6);
890
- _script6 = document.createElement('noscript');
891
- _script6.innerHTML = "\n <img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://px.ads.linkedin.com/collect/?pid=".concat(id, "&fmt=gif\" />\n ");
892
- document.body.appendChild(_script6);
885
+ _script6.innerHTML = "\n (function(w,d,t,r,u)\n {\n var f,n,i;\n w[u]=w[u]||[],f=function()\n {\n var o={ti:\"".concat(id, "\", enableAutoSpaTracking: true}; \n o.q=w[u],w[u]=new UET(o),w[u].push(\"pageLoad\") \n },\n n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function()\n {\n var s=this.readyState;\n s&&s!==\"loaded\"&&s!==\"complete\"||(f(),n.onload=n.onreadystatechange=null)\n },\n i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)\n })\n (window,document,\"script\",\"//bat.bing.com/bat.js\",\"uetq\");\n ");
886
+ document.head.appendChild(_script6);
893
887
  this.setLoaded(provider);
894
888
  }
895
- if (provider === 'smartlook') {
889
+ if (provider === 'linkedin') {
896
890
  var _script7 = document.createElement('script');
897
- _script7.innerHTML = "window.smartlook||(function(d) {var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';c.charset='utf-8';c.src='https://web-sdk.smartlook.com/recorder.js';h.appendChild(c);})(document);smartlook('init', '" + id + "', { region: 'eu' });";
898
- document.head.appendChild(_script7);
891
+ _script7.innerHTML = "\n _linkedin_partner_id = \"".concat(id, "\";\n window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];\n window._linkedin_data_partner_ids.push(_linkedin_partner_id);\n ");
892
+ document.body.appendChild(_script7);
893
+ _script7 = document.createElement('script');
894
+ _script7.innerHTML = "\n (function(){var s = document.getElementsByTagName(\"script\")[0];\n var b = document.createElement(\"script\");\n b.type = \"text/javascript\";b.async = true;\n b.src = \"https://snap.licdn.com/li.lms-analytics/insight.min.js\";\n s.parentNode.insertBefore(b, s);})();\n ";
895
+ document.body.appendChild(_script7);
896
+ _script7 = document.createElement('noscript');
897
+ _script7.innerHTML = "\n <img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://px.ads.linkedin.com/collect/?pid=".concat(id, "&fmt=gif\" />\n ");
898
+ document.body.appendChild(_script7);
899
899
  this.setLoaded(provider);
900
900
  }
901
- if (provider === 'crazyegg') {
901
+ if (provider === 'smartlook') {
902
902
  var _script8 = document.createElement('script');
903
- _script8.onload = function () {
903
+ _script8.innerHTML = "window.smartlook||(function(d) {var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';c.charset='utf-8';c.src='https://web-sdk.smartlook.com/recorder.js';h.appendChild(c);})(document);smartlook('init', '" + id + "', { region: 'eu' });";
904
+ document.head.appendChild(_script8);
905
+ this.setLoaded(provider);
906
+ }
907
+ if (provider === 'crazyegg') {
908
+ var _script9 = document.createElement('script');
909
+ _script9.onload = function () {
904
910
  _this14.setLoaded(provider);
905
911
  };
906
- _script8.src = '//script.crazyegg.com/pages/scripts/' + id + '.js';
907
- document.head.appendChild(_script8);
912
+ _script9.src = '//script.crazyegg.com/pages/scripts/' + id + '.js';
913
+ document.head.appendChild(_script9);
908
914
  }
909
915
  if (provider === 'google_maps') {
910
- var _script9 = document.createElement('script');
911
- _script9.src = 'https://maps.googleapis.com/maps/api/js?key=' + id + '&callback=initMapCC';
912
- _script9.defer = true;
913
- _script9.async = true;
916
+ var _script10 = document.createElement('script');
917
+ _script10.src = 'https://maps.googleapis.com/maps/api/js?key=' + id + '&callback=initMapCC';
918
+ _script10.defer = true;
919
+ _script10.async = true;
914
920
  window.initMapCC = function () {
915
921
  _this14.setLoaded(provider);
916
922
  };
917
- document.head.appendChild(_script9);
923
+ document.head.appendChild(_script10);
918
924
  }
919
925
  if (provider === 'etracker') {
920
- var _script10;
921
- _script10 = document.createElement('script');
922
- _script10.innerHTML = "if(window._etr === undefined) { window._etr = {eoBlocked:true}; }";
923
- document.head.appendChild(_script10);
924
- _script10 = document.createElement('script');
925
- _script10.onload = function () {
926
+ var _script11;
927
+ _script11 = document.createElement('script');
928
+ _script11.innerHTML = "if(window._etr === undefined) { window._etr = {eoBlocked:true}; }";
929
+ document.head.appendChild(_script11);
930
+ _script11 = document.createElement('script');
931
+ _script11.onload = function () {
926
932
  _this14.setLoaded(provider);
927
933
  };
928
- _script10.id = '_etLoader';
929
- _script10.type = 'text/javascript';
930
- _script10.charset = 'UTF-8';
931
- _script10.setAttribute('data-block-cookies', 'true');
932
- _script10.setAttribute('data-respect-dnt', 'true');
933
- _script10.setAttribute('data-secure-code', id);
934
- _script10.src = '//code.etracker.com/code/e.js';
935
- document.head.appendChild(_script10);
934
+ _script11.id = '_etLoader';
935
+ _script11.type = 'text/javascript';
936
+ _script11.charset = 'UTF-8';
937
+ _script11.setAttribute('data-block-cookies', 'true');
938
+ _script11.setAttribute('data-respect-dnt', 'true');
939
+ _script11.setAttribute('data-secure-code', id);
940
+ _script11.src = '//code.etracker.com/code/e.js';
941
+ document.head.appendChild(_script11);
936
942
  }
937
943
  if (provider === 'matomo') {
938
- var _script11 = document.createElement('script');
939
- _script11.innerHTML = "\n var _paq = window._paq = window._paq || [];\n /* tracker methods like \"setCustomDimension\" should be called before \"trackPageView\" */\n _paq.push(['trackPageView']);\n _paq.push(['enableLinkTracking']);\n (function() {\n var u=\"//".concat(id.split('#')[0], "/\";\n _paq.push(['setTrackerUrl', u+'matomo.php']);\n _paq.push(['setSiteId', '").concat(id.split('#')[1], "']);\n var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];\n g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);\n })();\n ");
940
- document.head.appendChild(_script11);
944
+ var _script12 = document.createElement('script');
945
+ _script12.innerHTML = "\n var _paq = window._paq = window._paq || [];\n /* tracker methods like \"setCustomDimension\" should be called before \"trackPageView\" */\n _paq.push(['trackPageView']);\n _paq.push(['enableLinkTracking']);\n (function() {\n var u=\"//".concat(id.split('#')[0], "/\";\n _paq.push(['setTrackerUrl', u+'matomo.php']);\n _paq.push(['setSiteId', '").concat(id.split('#')[1], "']);\n var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];\n g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);\n })();\n ");
946
+ document.head.appendChild(_script12);
941
947
  this.setLoaded(provider);
942
948
  }
943
949
  }