@commversion/libs 0.11.0 → 0.12.0-pre.0

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
@@ -28,6 +28,7 @@ Configuration takes place by global `window.commversion` object, make sure to no
28
28
  All scripts are available under the `scripts/` directory.
29
29
 
30
30
  - schedule-event
31
+ - lc-gclid
31
32
  - lc-powered-by
32
33
  - lc-ga-initialize-event
33
34
  - lc-exit-intent
@@ -1 +1 @@
1
- (function(){"use strict";const n=()=>()=>{const{LiveChatWidget:e}=window,{sessionVariables:t}=e.get("customer_data");if(t==null?void 0:t.experiment)return;const o=i();e.call("update_session_variables",{experiment:o})},i=()=>Math.random()<.5?"A":"B";window.commversion=window.commversion||{},window.LiveChatWidget.on("ready",n())})();
1
+ (function(){"use strict";const n=()=>()=>{const{LiveChatWidget:e}=window,{sessionVariables:t}=e.get("customer_data");if(t!=null&&t.experiment)return;const o=i();e.call("update_session_variables",{experiment:o})},i=()=>Math.random()<.5?"A":"B";window.commversion=window.commversion||{},window.LiveChatWidget.on("ready",n())})();
@@ -0,0 +1 @@
1
+ (function(){"use strict";const e=()=>()=>{const{LiveChatWidget:n}=window,i=new URLSearchParams(location.search).get("gclid");typeof i=="undefined"||i===null||n.call("update_session_variables",{gclid:i})};window.commversion=window.commversion||{},window.LiveChatWidget.on("ready",e())})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commversion/libs",
3
- "version": "0.11.0",
3
+ "version": "0.12.0-pre.0",
4
4
  "author": "Marios Antonoudiou <mariosant@sent.com>",
5
5
  "license": "UNLICENSED",
6
6
  "scripts": {
@@ -9,6 +9,8 @@
9
9
  "test": "wtr ./scripts/**/*.test.js --node-resolve",
10
10
  "prepack": "concurrently npm:build:*",
11
11
  "release": "release-it",
12
+ "dev:lc-gclid": "vite serve scripts/lc-gclid/src/",
13
+ "build:lc-gclid": "vite build -c scripts/lc-gclid/vite.config.js",
12
14
  "dev:lc-powered-by": "vite serve scripts/lc-powered-by/src/",
13
15
  "preview:lc-powered-by": "npm run build:lc-powered-by && vite preview --host 0.0.0.0",
14
16
  "build:lc-powered-by": "vite build -c scripts/lc-powered-by/vite.config.js",
@@ -51,6 +53,7 @@
51
53
  "@web/test-runner": "^0.13.22",
52
54
  "chai": "^4.3.4",
53
55
  "concurrently": "^6.5.0",
56
+ "delay": "^5.0.0",
54
57
  "hygen": "^6.1.0",
55
58
  "prettier": "^2.7.1",
56
59
  "release-it": "^14.12",