From b159c6293656d04da887543ef0b824c2b6d9c3f8 Mon Sep 17 00:00:00 2001 From: Agrim Jain <157685219+agrim-deriv@users.noreply.github.com> Date: Fri, 1 Nov 2024 10:52:03 +0400 Subject: [PATCH] Agrim/CRO-731/ analytics script in deriv app (#17180) * fix: script in deriv app * fix: updates * fix: update * fix: types and tracking * fix: empty commit * feat: adding loggedIn attribute * fix: empty commit * fix: normal event * fix: add normal event tracking for account signup * fix: refactor * fix: updates * fix: domain update * fix: pageloadevent * fix: pageloadevent * fix: change domain name to check * fix: testing with consoles * fix: testing * fix: tracking * fix: cache * fix: cache * fix: domain * fix: fixing domain and consoles * fix: check * fix: changing domain to binary sx * fix: changing domain to binary sx * fix: update analytics version * fix: add pageview, remove consoles, password screen * fix: password screen signup no cache * fix: remove console logs --- package-lock.json | 261 ++++++++++++++---- package.json | 2 +- packages/account/package.json | 2 +- packages/api-v2/package.json | 2 +- packages/appstore/package.json | 2 +- packages/cashier/package.json | 2 +- packages/cfd/package.json | 2 +- packages/core/package.json | 2 +- .../account-signup-modal.jsx | 43 ++- .../App/Containers/Layout/app-contents.jsx | 6 +- .../password-selection-modal.jsx | 29 +- .../core/src/Utils/Analytics/analytics.ts | 197 ++++++++++--- packages/core/src/Utils/Analytics/index.ts | 1 + packages/hooks/package.json | 2 +- packages/p2p/package.json | 2 +- packages/reports/package.json | 2 +- packages/shared/package.json | 2 +- packages/trader/package.json | 2 +- packages/wallets/package.json | 2 +- 19 files changed, 431 insertions(+), 132 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6552b87c0d4d..e214c2bd9997 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@cloudflare/stream-react": "^1.9.1", "@contentpass/zxcvbn": "^4.4.3", "@datadog/browser-rum": "^5.11.0", - "@deriv-com/analytics": "1.14.0", + "@deriv-com/analytics": "1.25.1", "@deriv-com/auth-client": "1.0.29", "@deriv-com/quill-tokens": "2.0.4", "@deriv-com/quill-ui": "1.18.0", @@ -565,9 +565,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz", - "integrity": "sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", + "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", "engines": { "node": ">=6.9.0" } @@ -645,9 +645,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz", - "integrity": "sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", "engines": { "node": ">=6.9.0" } @@ -995,11 +995,11 @@ } }, "node_modules/@babel/plugin-syntax-flow": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.25.7.tgz", - "integrity": "sha512-fyoj6/YdVtlv2ROig/J0fP7hh/wNO1MJGm1NR70Pg7jbkF+jOUL9joorqaCOQh06Y+LfgTagHzC8KqZ3MF782w==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.26.0.tgz", + "integrity": "sha512-B+O2DnPc0iG+YXFqOxv2WNuNU97ToWjOomUQ78DouOENWUaM5sVrmet9mcomUGQFwpJd//gvUagXBSdzO1fRKg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1426,12 +1426,12 @@ } }, "node_modules/@babel/plugin-transform-flow-strip-types": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.25.7.tgz", - "integrity": "sha512-q8Td2PPc6/6I73g96SreSUCKEcwMXCwcXSIAVTyTTN6CpJe0dMj8coxu1fg1T9vfBLi6Rsi6a4ECcFBbKabS5w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.25.9.tgz", + "integrity": "sha512-/VVukELzPDdci7UUsWQaSkhgnjIWXnIyRpM02ldxaVoFK96c41So8JcKT3m0gYjyv7j5FNPGS5vfELrWalkbDA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-flow": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-syntax-flow": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2112,9 +2112,9 @@ "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.25.7.tgz", "integrity": "sha512-q2x3g0YHzo/Ohsr51KOYS/BtZMsvkzVd8qEyhZAyTatYdobfgXCuyppTqTuIhdq5kR/P3nyyVvZ6H5dMc4PnCQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-validator-option": "^7.25.7", - "@babel/plugin-transform-flow-strip-types": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "@babel/plugin-transform-flow-strip-types": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -3108,20 +3108,20 @@ } }, "node_modules/@datadog/browser-core": { - "version": "5.28.1", - "resolved": "https://registry.npmjs.org/@datadog/browser-core/-/browser-core-5.28.1.tgz", - "integrity": "sha512-teBNd2pynPWPThsjDqLzzk4mbxOVqQ5MkbPbIhg+1Sl6idsGmpapDp6GSMP8YyToayjgMuApel2GYp0T05GOeA==" + "version": "5.29.1", + "resolved": "https://registry.npmjs.org/@datadog/browser-core/-/browser-core-5.29.1.tgz", + "integrity": "sha512-7GLo2A94XBgnIEc9wQe6aT69e5+s15hg2p+24gczYvnr9xVXV2dLzJkhMMM3iwJTErJuOpC8A1e8s/evgj63KA==" }, "node_modules/@datadog/browser-rum": { "version": "5.28.1", "resolved": "https://registry.npmjs.org/@datadog/browser-rum/-/browser-rum-5.28.1.tgz", "integrity": "sha512-Q6vtTd3bcVLriWNxdSjx7MTNYTO2Jv43KO4x5DUdd2nGPPuvWawsccYK3UzD+V6XGtq5nFeAx9IAFHr7vdBQxQ==", "dependencies": { - "@datadog/browser-core": "5.28.1", - "@datadog/browser-rum-core": "5.28.1" + "@datadog/browser-core": "5.29.1", + "@datadog/browser-rum-core": "5.29.1" }, "peerDependencies": { - "@datadog/browser-logs": "5.28.1" + "@datadog/browser-logs": "5.29.1" }, "peerDependenciesMeta": { "@datadog/browser-logs": { @@ -3130,20 +3130,21 @@ } }, "node_modules/@datadog/browser-rum-core": { - "version": "5.28.1", - "resolved": "https://registry.npmjs.org/@datadog/browser-rum-core/-/browser-rum-core-5.28.1.tgz", - "integrity": "sha512-O6K3/5lGw3uEv9csQm5V/qr16/kE5vVDfFmI0xB/A8wTdUE48intbUh7d7rIbDxYmD2DWUgv4eP30O05LR4pnw==", + "version": "5.29.1", + "resolved": "https://registry.npmjs.org/@datadog/browser-rum-core/-/browser-rum-core-5.29.1.tgz", + "integrity": "sha512-AOK52YpK6Hf+Lj3wINDk3LHNEzTO/g6zshnkdWE/3iJBDzmPGFWzcm/Y+uf55VFeU3V1GWujV5YFPuLnCsQwkA==", "dependencies": { - "@datadog/browser-core": "5.28.1" + "@datadog/browser-core": "5.29.1" } }, "node_modules/@deriv-com/analytics": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@deriv-com/analytics/-/analytics-1.14.0.tgz", - "integrity": "sha512-HRckl1IMK+BQ31l6TOXLs1oprySpICJkdmoa8iHB8IEp0IfZsvsWb8ZCsmc6+gw2FG6VUTMF5LLHQUmMRFFM/Q==", + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/@deriv-com/analytics/-/analytics-1.25.1.tgz", + "integrity": "sha512-q87axAX48csaFvgpqLWPPfgwQzX4cq7sxnPbzlZ0b0b69GQrAuS5WGMJaIf1H9i7LGHsnYfGw4W88G9bvnsGSA==", "dependencies": { "@growthbook/growthbook": "^1.1.0", "@rudderstack/analytics-js": "^3.5.1", + "js-cookie": "^3.0.5", "uuid": "^10.0.0" }, "engines": { @@ -3151,6 +3152,14 @@ "npm": "9.x" } }, + "node_modules/@deriv-com/analytics/node_modules/js-cookie": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", + "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", + "engines": { + "node": ">=14" + } + }, "node_modules/@deriv-com/analytics/node_modules/uuid": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", @@ -4199,6 +4208,7 @@ }, "node_modules/@isaacs/string-locale-compare": { "version": "1.1.0", + "dev": true, "license": "ISC" }, "node_modules/@istanbuljs/load-nyc-config": { @@ -7533,6 +7543,7 @@ }, "node_modules/@npmcli/arborist": { "version": "5.3.0", + "dev": true, "license": "ISC", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", @@ -7579,6 +7590,7 @@ }, "node_modules/@npmcli/arborist/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -7589,6 +7601,7 @@ }, "node_modules/@npmcli/arborist/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -7602,6 +7615,7 @@ }, "node_modules/@npmcli/arborist/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -7615,6 +7629,7 @@ }, "node_modules/@npmcli/arborist/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -7625,6 +7640,7 @@ }, "node_modules/@npmcli/fs": { "version": "2.1.2", + "dev": true, "license": "ISC", "dependencies": { "@gar/promisify": "^1.1.3", @@ -7636,6 +7652,7 @@ }, "node_modules/@npmcli/fs/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -7646,6 +7663,7 @@ }, "node_modules/@npmcli/fs/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -7659,6 +7677,7 @@ }, "node_modules/@npmcli/git": { "version": "3.0.2", + "dev": true, "license": "ISC", "dependencies": { "@npmcli/promise-spawn": "^3.0.0", @@ -7677,6 +7696,7 @@ }, "node_modules/@npmcli/git/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -7690,6 +7710,7 @@ }, "node_modules/@npmcli/git/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -7700,6 +7721,7 @@ }, "node_modules/@npmcli/installed-package-contents": { "version": "1.0.7", + "dev": true, "license": "ISC", "dependencies": { "npm-bundled": "^1.1.1", @@ -7714,6 +7736,7 @@ }, "node_modules/@npmcli/map-workspaces": { "version": "2.0.4", + "dev": true, "license": "ISC", "dependencies": { "@npmcli/name-from-folder": "^1.0.1", @@ -7727,6 +7750,7 @@ }, "node_modules/@npmcli/map-workspaces/node_modules/brace-expansion": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -7734,6 +7758,7 @@ }, "node_modules/@npmcli/map-workspaces/node_modules/glob": { "version": "8.0.3", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -7751,6 +7776,7 @@ }, "node_modules/@npmcli/map-workspaces/node_modules/minimatch": { "version": "5.1.1", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -7761,6 +7787,7 @@ }, "node_modules/@npmcli/metavuln-calculator": { "version": "3.1.1", + "dev": true, "license": "ISC", "dependencies": { "cacache": "^16.0.0", @@ -7774,6 +7801,7 @@ }, "node_modules/@npmcli/metavuln-calculator/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -7784,6 +7812,7 @@ }, "node_modules/@npmcli/metavuln-calculator/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -7797,6 +7826,7 @@ }, "node_modules/@npmcli/move-file": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "mkdirp": "^1.0.4", @@ -7808,10 +7838,12 @@ }, "node_modules/@npmcli/name-from-folder": { "version": "1.0.1", + "dev": true, "license": "ISC" }, "node_modules/@npmcli/node-gyp": { "version": "2.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -7819,6 +7851,7 @@ }, "node_modules/@npmcli/package-json": { "version": "2.0.0", + "dev": true, "license": "ISC", "dependencies": { "json-parse-even-better-errors": "^2.3.1" @@ -7829,6 +7862,7 @@ }, "node_modules/@npmcli/promise-spawn": { "version": "3.0.0", + "dev": true, "license": "ISC", "dependencies": { "infer-owner": "^1.0.4" @@ -7839,6 +7873,7 @@ }, "node_modules/@npmcli/run-script": { "version": "4.2.1", + "dev": true, "license": "ISC", "dependencies": { "@npmcli/node-gyp": "^2.0.0", @@ -10408,9 +10443,9 @@ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.0.tgz", - "integrity": "sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.2.tgz", + "integrity": "sha512-jOG/0nXb3z+EM6SioY8RofqqmZ+9NKYvJ6QQaa9Mvd3RQxlH68/jcB/lpyVt4lCiqr04IyaC34NzhUqcXbB5FQ==", "cpu": [ "x64" ], @@ -21007,6 +21042,7 @@ }, "node_modules/abbrev": { "version": "1.1.1", + "dev": true, "license": "ISC" }, "node_modules/accepts": { @@ -21127,6 +21163,7 @@ }, "node_modules/agentkeepalive": { "version": "4.2.1", + "dev": true, "license": "MIT", "dependencies": { "debug": "^4.1.0", @@ -21338,6 +21375,7 @@ }, "node_modules/are-we-there-yet": { "version": "3.0.1", + "dev": true, "license": "ISC", "dependencies": { "delegates": "^1.0.0", @@ -22397,6 +22435,7 @@ }, "node_modules/bin-links": { "version": "3.0.3", + "dev": true, "license": "ISC", "dependencies": { "cmd-shim": "^5.0.0", @@ -22412,6 +22451,7 @@ }, "node_modules/bin-links/node_modules/npm-normalize-package-bin": { "version": "2.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -22419,6 +22459,7 @@ }, "node_modules/bin-links/node_modules/write-file-atomic": { "version": "4.0.2", + "dev": true, "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", @@ -22996,6 +23037,7 @@ }, "node_modules/builtins": { "version": "5.0.1", + "dev": true, "license": "MIT", "dependencies": { "semver": "^7.0.0" @@ -23003,6 +23045,7 @@ }, "node_modules/builtins/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -23013,6 +23056,7 @@ }, "node_modules/builtins/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -23110,6 +23154,7 @@ }, "node_modules/cacache": { "version": "16.1.3", + "dev": true, "license": "ISC", "dependencies": { "@npmcli/fs": "^2.1.0", @@ -23137,6 +23182,7 @@ }, "node_modules/cacache/node_modules/brace-expansion": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -23144,6 +23190,7 @@ }, "node_modules/cacache/node_modules/glob": { "version": "8.0.3", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -23161,6 +23208,7 @@ }, "node_modules/cacache/node_modules/minimatch": { "version": "5.1.1", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -23939,6 +23987,7 @@ }, "node_modules/cmd-shim": { "version": "5.0.0", + "dev": true, "license": "ISC", "dependencies": { "mkdirp-infer-owner": "^2.0.0" @@ -24059,6 +24108,7 @@ }, "node_modules/common-ancestor-path": { "version": "1.0.1", + "dev": true, "license": "ISC" }, "node_modules/common-path-prefix": { @@ -25537,20 +25587,24 @@ "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "dependencies": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" + "browserify-cipher": "^1.0.1", + "browserify-sign": "^4.2.3", + "create-ecdh": "^4.0.4", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "diffie-hellman": "^5.0.3", + "hash-base": "~3.0.4", + "inherits": "^2.0.4", + "pbkdf2": "^3.1.2", + "public-encrypt": "^4.0.3", + "randombytes": "^2.1.0", + "randomfill": "^1.0.4" }, "engines": { - "node": "*" + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/crypto-random-string": { @@ -26305,6 +26359,7 @@ }, "node_modules/debuglog": { "version": "1.0.1", + "dev": true, "license": "MIT", "engines": { "node": "*" @@ -27076,6 +27131,7 @@ }, "node_modules/dezalgo": { "version": "1.0.4", + "dev": true, "license": "ISC", "dependencies": { "asap": "^2.0.0", @@ -27858,6 +27914,7 @@ }, "node_modules/err-code": { "version": "2.0.3", + "dev": true, "license": "MIT" }, "node_modules/errno": { @@ -31262,6 +31319,7 @@ }, "node_modules/gauge": { "version": "4.0.4", + "dev": true, "license": "ISC", "dependencies": { "aproba": "^1.0.3 || ^2.0.0", @@ -32332,6 +32390,7 @@ }, "node_modules/hosted-git-info": { "version": "4.1.0", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -32342,6 +32401,7 @@ }, "node_modules/hosted-git-info/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -32883,7 +32943,8 @@ "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true }, "node_modules/http-deceiver": { "version": "1.2.7", @@ -33109,6 +33170,7 @@ }, "node_modules/humanize-ms": { "version": "1.2.1", + "dev": true, "license": "MIT", "dependencies": { "ms": "^2.0.0" @@ -33237,6 +33299,7 @@ }, "node_modules/ignore-walk": { "version": "5.0.1", + "dev": true, "license": "ISC", "dependencies": { "minimatch": "^5.0.1" @@ -33247,6 +33310,7 @@ }, "node_modules/ignore-walk/node_modules/brace-expansion": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -33254,6 +33318,7 @@ }, "node_modules/ignore-walk/node_modules/minimatch": { "version": "5.1.1", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -33400,6 +33465,7 @@ }, "node_modules/init-package-json": { "version": "3.0.2", + "dev": true, "license": "ISC", "dependencies": { "npm-package-arg": "^9.0.1", @@ -33416,6 +33482,7 @@ }, "node_modules/init-package-json/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -33426,6 +33493,7 @@ }, "node_modules/init-package-json/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -33439,6 +33507,7 @@ }, "node_modules/init-package-json/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -33452,6 +33521,7 @@ }, "node_modules/init-package-json/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -33959,6 +34029,7 @@ }, "node_modules/is-lambda": { "version": "1.0.1", + "dev": true, "license": "MIT" }, "node_modules/is-lite": { @@ -38027,6 +38098,7 @@ }, "node_modules/json-stringify-nice": { "version": "1.1.4", + "dev": true, "license": "ISC", "funding": { "url": "https://github.com/sponsors/isaacs" @@ -38141,10 +38213,12 @@ }, "node_modules/just-diff": { "version": "5.1.1", + "dev": true, "license": "MIT" }, "node_modules/just-diff-apply": { "version": "5.4.1", + "dev": true, "license": "MIT" }, "node_modules/just-extend": { @@ -38324,6 +38398,7 @@ }, "node_modules/libnpmaccess": { "version": "6.0.4", + "dev": true, "license": "ISC", "dependencies": { "aproba": "^2.0.0", @@ -38337,6 +38412,7 @@ }, "node_modules/libnpmaccess/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -38347,6 +38423,7 @@ }, "node_modules/libnpmaccess/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -38360,6 +38437,7 @@ }, "node_modules/libnpmaccess/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -38373,6 +38451,7 @@ }, "node_modules/libnpmaccess/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -38383,6 +38462,7 @@ }, "node_modules/libnpmpublish": { "version": "6.0.5", + "dev": true, "license": "ISC", "dependencies": { "normalize-package-data": "^4.0.0", @@ -38397,6 +38477,7 @@ }, "node_modules/libnpmpublish/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -38407,6 +38488,7 @@ }, "node_modules/libnpmpublish/node_modules/normalize-package-data": { "version": "4.0.1", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^5.0.0", @@ -38420,6 +38502,7 @@ }, "node_modules/libnpmpublish/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -38433,6 +38516,7 @@ }, "node_modules/libnpmpublish/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -38446,6 +38530,7 @@ }, "node_modules/libnpmpublish/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -39083,6 +39168,7 @@ }, "node_modules/lru-cache": { "version": "7.14.1", + "dev": true, "license": "ISC", "engines": { "node": ">=12" @@ -39123,6 +39209,7 @@ }, "node_modules/make-fetch-happen": { "version": "10.2.1", + "dev": true, "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", @@ -39720,6 +39807,7 @@ }, "node_modules/minipass-fetch": { "version": "2.1.2", + "dev": true, "license": "MIT", "dependencies": { "minipass": "^3.1.6", @@ -39745,6 +39833,7 @@ }, "node_modules/minipass-json-stream": { "version": "1.0.1", + "dev": true, "license": "MIT", "dependencies": { "jsonparse": "^1.3.1", @@ -39763,6 +39852,7 @@ }, "node_modules/minipass-sized": { "version": "1.0.3", + "dev": true, "license": "ISC", "dependencies": { "minipass": "^3.0.0" @@ -39885,6 +39975,7 @@ }, "node_modules/mkdirp-infer-owner": { "version": "2.0.0", + "dev": true, "license": "ISC", "dependencies": { "chownr": "^2.0.0", @@ -40099,6 +40190,7 @@ }, "node_modules/mute-stream": { "version": "0.0.8", + "dev": true, "license": "ISC" }, "node_modules/mz": { @@ -40328,6 +40420,7 @@ }, "node_modules/node-gyp": { "version": "9.3.0", + "dev": true, "license": "MIT", "dependencies": { "env-paths": "^2.2.0", @@ -40360,6 +40453,7 @@ }, "node_modules/node-gyp/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -40370,6 +40464,7 @@ }, "node_modules/node-gyp/node_modules/nopt": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "abbrev": "^1.0.0" @@ -40383,6 +40478,7 @@ }, "node_modules/node-gyp/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -40543,6 +40639,7 @@ }, "node_modules/nopt": { "version": "5.0.0", + "dev": true, "license": "ISC", "dependencies": { "abbrev": "1" @@ -40556,6 +40653,7 @@ }, "node_modules/normalize-package-data": { "version": "3.0.3", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^4.0.1", @@ -40569,6 +40667,7 @@ }, "node_modules/normalize-package-data/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -40579,6 +40678,7 @@ }, "node_modules/normalize-package-data/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -40774,6 +40874,7 @@ }, "node_modules/npm-bundled": { "version": "1.1.2", + "dev": true, "license": "ISC", "dependencies": { "npm-normalize-package-bin": "^1.0.1" @@ -40781,6 +40882,7 @@ }, "node_modules/npm-install-checks": { "version": "5.0.0", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "semver": "^7.1.1" @@ -40791,6 +40893,7 @@ }, "node_modules/npm-install-checks/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -40801,6 +40904,7 @@ }, "node_modules/npm-install-checks/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -40814,10 +40918,12 @@ }, "node_modules/npm-normalize-package-bin": { "version": "1.0.1", + "dev": true, "license": "ISC" }, "node_modules/npm-package-arg": { "version": "8.1.1", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^3.0.6", @@ -40830,10 +40936,12 @@ }, "node_modules/npm-package-arg/node_modules/builtins": { "version": "1.0.3", + "dev": true, "license": "MIT" }, "node_modules/npm-package-arg/node_modules/hosted-git-info": { "version": "3.0.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -40844,6 +40952,7 @@ }, "node_modules/npm-package-arg/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -40854,6 +40963,7 @@ }, "node_modules/npm-package-arg/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -40867,6 +40977,7 @@ }, "node_modules/npm-package-arg/node_modules/validate-npm-package-name": { "version": "3.0.0", + "dev": true, "license": "ISC", "dependencies": { "builtins": "^1.0.3" @@ -40874,6 +40985,7 @@ }, "node_modules/npm-packlist": { "version": "5.1.3", + "dev": true, "license": "ISC", "dependencies": { "glob": "^8.0.1", @@ -40890,6 +41002,7 @@ }, "node_modules/npm-packlist/node_modules/brace-expansion": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -40897,6 +41010,7 @@ }, "node_modules/npm-packlist/node_modules/glob": { "version": "8.0.3", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -40914,6 +41028,7 @@ }, "node_modules/npm-packlist/node_modules/minimatch": { "version": "5.1.1", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -40924,6 +41039,7 @@ }, "node_modules/npm-packlist/node_modules/npm-bundled": { "version": "2.0.1", + "dev": true, "license": "ISC", "dependencies": { "npm-normalize-package-bin": "^2.0.0" @@ -40934,6 +41050,7 @@ }, "node_modules/npm-packlist/node_modules/npm-normalize-package-bin": { "version": "2.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -40941,6 +41058,7 @@ }, "node_modules/npm-pick-manifest": { "version": "7.0.2", + "dev": true, "license": "ISC", "dependencies": { "npm-install-checks": "^5.0.0", @@ -40954,6 +41072,7 @@ }, "node_modules/npm-pick-manifest/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -40964,6 +41083,7 @@ }, "node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin": { "version": "2.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -40971,6 +41091,7 @@ }, "node_modules/npm-pick-manifest/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -40984,6 +41105,7 @@ }, "node_modules/npm-pick-manifest/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -40997,6 +41119,7 @@ }, "node_modules/npm-pick-manifest/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -41007,6 +41130,7 @@ }, "node_modules/npm-registry-fetch": { "version": "13.3.1", + "dev": true, "license": "ISC", "dependencies": { "make-fetch-happen": "^10.0.6", @@ -41023,6 +41147,7 @@ }, "node_modules/npm-registry-fetch/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -41033,6 +41158,7 @@ }, "node_modules/npm-registry-fetch/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -41046,6 +41172,7 @@ }, "node_modules/npm-registry-fetch/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -41059,6 +41186,7 @@ }, "node_modules/npm-registry-fetch/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -43811,6 +43939,7 @@ }, "node_modules/npmlog": { "version": "6.0.2", + "dev": true, "license": "ISC", "dependencies": { "are-we-there-yet": "^3.0.0", @@ -44811,6 +44940,7 @@ }, "node_modules/pacote": { "version": "13.6.2", + "dev": true, "license": "ISC", "dependencies": { "@npmcli/git": "^3.0.0", @@ -44844,6 +44974,7 @@ }, "node_modules/pacote/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -44854,6 +44985,7 @@ }, "node_modules/pacote/node_modules/npm-package-arg": { "version": "9.1.2", + "dev": true, "license": "ISC", "dependencies": { "hosted-git-info": "^5.0.0", @@ -44867,6 +44999,7 @@ }, "node_modules/pacote/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -44880,6 +45013,7 @@ }, "node_modules/pacote/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -44972,6 +45106,7 @@ }, "node_modules/parse-conflict-json": { "version": "2.0.2", + "dev": true, "license": "ISC", "dependencies": { "json-parse-even-better-errors": "^2.3.1", @@ -47047,6 +47182,7 @@ }, "node_modules/proc-log": { "version": "2.0.1", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -47082,6 +47218,7 @@ }, "node_modules/promise-all-reject-late": { "version": "1.0.1", + "dev": true, "license": "ISC", "funding": { "url": "https://github.com/sponsors/isaacs" @@ -47089,6 +47226,7 @@ }, "node_modules/promise-call-limit": { "version": "1.0.1", + "dev": true, "license": "ISC", "funding": { "url": "https://github.com/sponsors/isaacs" @@ -47105,6 +47243,7 @@ }, "node_modules/promise-retry": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "err-code": "^2.0.2", @@ -47164,6 +47303,7 @@ }, "node_modules/promzard": { "version": "0.3.0", + "dev": true, "license": "ISC", "dependencies": { "read": "1" @@ -48515,6 +48655,7 @@ }, "node_modules/read": { "version": "1.0.7", + "dev": true, "license": "ISC", "dependencies": { "mute-stream": "~0.0.4" @@ -48525,6 +48666,7 @@ }, "node_modules/read-cmd-shim": { "version": "3.0.1", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -48532,6 +48674,7 @@ }, "node_modules/read-package-json": { "version": "5.0.2", + "dev": true, "license": "ISC", "dependencies": { "glob": "^8.0.1", @@ -48545,6 +48688,7 @@ }, "node_modules/read-package-json-fast": { "version": "2.0.3", + "dev": true, "license": "ISC", "dependencies": { "json-parse-even-better-errors": "^2.3.0", @@ -48556,6 +48700,7 @@ }, "node_modules/read-package-json/node_modules/brace-expansion": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -48563,6 +48708,7 @@ }, "node_modules/read-package-json/node_modules/glob": { "version": "8.0.3", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -48580,6 +48726,7 @@ }, "node_modules/read-package-json/node_modules/hosted-git-info": { "version": "5.2.1", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" @@ -48590,6 +48737,7 @@ }, "node_modules/read-package-json/node_modules/minimatch": { "version": "5.1.1", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -48600,6 +48748,7 @@ }, "node_modules/read-package-json/node_modules/normalize-package-data": { "version": "4.0.1", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^5.0.0", @@ -48613,6 +48762,7 @@ }, "node_modules/read-package-json/node_modules/npm-normalize-package-bin": { "version": "2.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -48620,6 +48770,7 @@ }, "node_modules/read-package-json/node_modules/semver": { "version": "7.3.8", + "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -48633,6 +48784,7 @@ }, "node_modules/read-package-json/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -48953,6 +49105,7 @@ }, "node_modules/readdir-scoped-modules": { "version": "1.1.0", + "dev": true, "license": "ISC", "dependencies": { "debuglog": "^1.0.1", @@ -52031,6 +52184,7 @@ }, "node_modules/smart-buffer": { "version": "4.2.0", + "dev": true, "license": "MIT", "engines": { "node": ">= 6.0.0", @@ -52254,6 +52408,7 @@ }, "node_modules/socks": { "version": "2.7.1", + "dev": true, "license": "MIT", "dependencies": { "ip": "^2.0.0", @@ -52266,6 +52421,7 @@ }, "node_modules/socks-proxy-agent": { "version": "7.0.0", + "dev": true, "license": "MIT", "dependencies": { "agent-base": "^6.0.2", @@ -52514,6 +52670,7 @@ }, "node_modules/ssri": { "version": "9.0.1", + "dev": true, "license": "ISC", "dependencies": { "minipass": "^3.1.1" @@ -54431,7 +54588,8 @@ }, "node_modules/text-table": { "version": "0.2.0", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/thenify": { "version": "3.3.1", @@ -54679,6 +54837,7 @@ }, "node_modules/treeverse": { "version": "2.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" @@ -55250,6 +55409,7 @@ }, "node_modules/unique-filename": { "version": "2.0.1", + "dev": true, "license": "ISC", "dependencies": { "unique-slug": "^3.0.0" @@ -55260,6 +55420,7 @@ }, "node_modules/unique-slug": { "version": "3.0.0", + "dev": true, "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4" @@ -55789,6 +55950,7 @@ }, "node_modules/validate-npm-package-name": { "version": "4.0.0", + "dev": true, "license": "ISC", "dependencies": { "builtins": "^5.0.0" @@ -55881,6 +56043,7 @@ }, "node_modules/walk-up-path": { "version": "1.0.0", + "dev": true, "license": "ISC" }, "node_modules/walker": { diff --git a/package.json b/package.json index 40ce4a52b3c3..090593290fc9 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ }, "dependencies": { "@babel/preset-typescript": "^7.24.7", - "@deriv-com/analytics": "1.14.0", + "@deriv-com/analytics": "1.25.1", "@sendbird/chat": "^4.9.7", "@types/react-transition-group": "^4.4.4", "babel-jest": "^29.7.0", diff --git a/packages/account/package.json b/packages/account/package.json index 6fe14f0bc737..e6206b06ab54 100644 --- a/packages/account/package.json +++ b/packages/account/package.json @@ -30,7 +30,7 @@ }, "dependencies": { "@binary-com/binary-document-uploader": "^2.4.8", - "@deriv-com/analytics": "1.14.0", + "@deriv-com/analytics": "1.25.1", "@deriv-com/translations": "1.3.9", "@deriv-com/utils": "^0.0.36", "@deriv-com/ui": "1.36.4", diff --git a/packages/api-v2/package.json b/packages/api-v2/package.json index a060ad184e88..ed5cfc4f46a8 100644 --- a/packages/api-v2/package.json +++ b/packages/api-v2/package.json @@ -16,7 +16,7 @@ "uuid": "^9.0.1" }, "devDependencies": { - "@deriv-com/analytics": "1.14.0", + "@deriv-com/analytics": "1.25.1", "@deriv/api-types": "1.0.172", "@testing-library/react": "^12.0.0", "@testing-library/react-hooks": "^7.0.2", diff --git a/packages/appstore/package.json b/packages/appstore/package.json index abb688f4fcc3..7a083a307557 100644 --- a/packages/appstore/package.json +++ b/packages/appstore/package.json @@ -26,7 +26,7 @@ "author": "Deriv", "license": "Apache-2.0", "dependencies": { - "@deriv-com/analytics": "1.14.0", + "@deriv-com/analytics": "1.25.1", "@deriv-com/translations": "1.3.9", "@deriv-com/ui": "1.36.4", "@deriv/account": "^1.0.0", diff --git a/packages/cashier/package.json b/packages/cashier/package.json index f88fab5013bd..6ff76ebfc804 100644 --- a/packages/cashier/package.json +++ b/packages/cashier/package.json @@ -37,7 +37,7 @@ "url": "https://github.com/deriv-com/deriv-app/issues" }, "dependencies": { - "@deriv-com/analytics": "1.14.0", + "@deriv-com/analytics": "1.25.1", "@deriv-com/ui": "1.36.4", "@deriv/api": "^1.0.0", "@deriv/api-types": "1.0.172", diff --git a/packages/cfd/package.json b/packages/cfd/package.json index 62914b9d0d87..089a173dedb3 100644 --- a/packages/cfd/package.json +++ b/packages/cfd/package.json @@ -86,7 +86,7 @@ }, "dependencies": { "@deriv-com/ui": "1.36.4", - "@deriv-com/analytics": "1.14.0", + "@deriv-com/analytics": "1.25.1", "@deriv-com/translations": "1.3.9", "@deriv-com/utils": "^0.0.36", "@deriv/account": "^1.0.0", diff --git a/packages/core/package.json b/packages/core/package.json index d9485a913eaa..01224880ecea 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -95,7 +95,7 @@ }, "dependencies": { "@datadog/browser-rum": "^5.11.0", - "@deriv-com/analytics": "1.14.0", + "@deriv-com/analytics": "1.25.1", "@deriv-com/quill-tokens": "2.0.4", "@deriv-com/quill-ui": "1.18.0", "@deriv-com/translations": "1.3.9", diff --git a/packages/core/src/App/Containers/AccountSignupModal/account-signup-modal.jsx b/packages/core/src/App/Containers/AccountSignupModal/account-signup-modal.jsx index 54071cbfc9dd..37af83c609da 100644 --- a/packages/core/src/App/Containers/AccountSignupModal/account-signup-modal.jsx +++ b/packages/core/src/App/Containers/AccountSignupModal/account-signup-modal.jsx @@ -16,7 +16,7 @@ import QuestionnaireModal from '../QuestionnaireModal'; import ResidenceForm from '../SetResidenceModal/set-residence-form.jsx'; import validateSignupFields from './validate-signup-fields.jsx'; import 'Sass/app/modules/account-signup.scss'; -import { trackEventWithCache } from 'Utils/Analytics/analytics.ts'; +import cacheTrackEvents from 'Utils/Analytics/analytics.ts'; const AccountSignup = ({ enableApp, @@ -56,20 +56,37 @@ const AccountSignup = ({ // didMount lifecycle hook React.useEffect(() => { - trackEventWithCache({ - name: 'ce_virtual_signup_form', - properties: { - action: 'signup_confirmed', - form_name: is_mobile ? 'virtual_signup_web_mobile_default' : 'virtual_signup_web_desktop_default', + // eslint-disable-next-line no-console + + cacheTrackEvents.loadEvent([ + { + event: { + name: 'ce_virtual_signup_form', + properties: { + action: 'country_selection_screen_opened', + form_name: is_mobile + ? 'virtual_signup_web_mobile_default' + : 'virtual_signup_web_desktop_default', + }, + }, + cache: true, }, - }); - trackEventWithCache({ - name: 'ce_virtual_signup_form', - properties: { - action: 'country_selection_screen_opened', - form_name: is_mobile ? 'virtual_signup_web_mobile_default' : 'virtual_signup_web_desktop_default', + ]); + + cacheTrackEvents.loadEvent([ + { + event: { + name: 'ce_virtual_signup_form', + properties: { + action: 'signup_confirmed', + form_name: is_mobile + ? 'virtual_signup_web_mobile_default' + : 'virtual_signup_web_desktop_default', + }, + }, + cache: true, }, - }); + ]); WS.wait('website_status', 'residence_list').then(() => { if (clients_country && residence_list) { diff --git a/packages/core/src/App/Containers/Layout/app-contents.jsx b/packages/core/src/App/Containers/Layout/app-contents.jsx index d18bfcfa1f15..45c2851f7426 100644 --- a/packages/core/src/App/Containers/Layout/app-contents.jsx +++ b/packages/core/src/App/Containers/Layout/app-contents.jsx @@ -9,6 +9,7 @@ import { useStore, observer } from '@deriv/stores'; import { useGrowthbookGetFeatureValue } from '@deriv/hooks'; import CookieBanner from '../../Components/Elements/CookieBanner/cookie-banner.jsx'; import { useDevice } from '@deriv-com/ui'; +// import cacheTrackEvents from 'Utils/Analytics/analytics.ts'; const tracking_status_cookie = new CookieStorage(TRACKING_STATUS_KEY); @@ -51,7 +52,10 @@ const AppContents = observer(({ children }) => { }, []); React.useEffect(() => { - Analytics.pageView(window.location.href); + Analytics.pageView(window.location.href, { + loggedIn: is_logged_in, + device_type: isMobile ? 'mobile' : 'desktop', + }); // react-hooks/exhaustive-deps }, [window.location.href]); diff --git a/packages/core/src/App/Containers/PasswordSelectionModal/password-selection-modal.jsx b/packages/core/src/App/Containers/PasswordSelectionModal/password-selection-modal.jsx index b2e999715ec7..7667fb8b74eb 100644 --- a/packages/core/src/App/Containers/PasswordSelectionModal/password-selection-modal.jsx +++ b/packages/core/src/App/Containers/PasswordSelectionModal/password-selection-modal.jsx @@ -6,7 +6,7 @@ import { Button, PasswordInput, PasswordMeter, Text } from '@deriv/components'; import { getErrorMessages, redirectToSignUp } from '@deriv/shared'; import { observer, useStore } from '@deriv/stores'; import { Localize, localize } from '@deriv/translations'; -import { trackEventWithCache } from 'Utils/Analytics/analytics.ts'; +import cacheTrackEvents from 'Utils/Analytics/analytics.ts'; import SignupSeparatorContainer from '../AccountSignupModal/signup-separator-container.jsx'; import 'Sass/app/modules/account-signup.scss'; @@ -29,21 +29,20 @@ const PasswordSelectionModal = observer( const { is_mobile } = ui; React.useEffect(() => { - trackEventWithCache({ - name: 'ce_virtual_signup_form', - properties: { - action: 'password_screen_opened', - form_name: is_mobile ? 'virtual_signup_web_mobile_default' : 'virtual_signup_web_desktop_default', + cacheTrackEvents.loadEvent([ + { + event: { + name: 'ce_virtual_signup_form', + properties: { + action: 'password_screen_opened', + form_name: is_mobile + ? 'virtual_signup_web_mobile_default' + : 'virtual_signup_web_desktop_default', + }, + }, }, - }); - - // Analytics.trackEvent('ce_virtual_signup_form', { - // action: 'password_screen_opened', - // form_name: is_mobile ? 'virtual_signup_web_mobile_default' : 'virtual_signup_web_desktop_default', - // }); - - //eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + ]); + }, [is_mobile]); return (