diff --git a/package-lock.json b/package-lock.json index 6fe98c77f68a..475c067de585 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ ], "dependencies": { "@babel/preset-typescript": "^7.24.7", - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@sendbird/chat": "^4.9.7", "@types/react-transition-group": "^4.4.4", "babel-jest": "^29.7.0", @@ -2668,9 +2668,10 @@ } }, "node_modules/@deriv-com/analytics": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@deriv-com/analytics/-/analytics-1.27.1.tgz", - "integrity": "sha512-dPMmTrfufZTUYRtb56M/2DGKXh0KMakhANxbyU1HyUIVJ4JFC3jUbLVLbJUSpINPVvZ6tNStLQzotyvmnYwxEA==", + "version": "1.28.2", + "resolved": "https://registry.npmjs.org/@deriv-com/analytics/-/analytics-1.28.2.tgz", + "integrity": "sha512-tRUgSs1SWzkKvP6pd4gDYZZFpC+yAp7WWH7I/uV+98GiddiUyPbu4BVsIDESiK0y7C9P4ZauP5kSddiMd0WkBw==", + "license": "MIT", "dependencies": { "@growthbook/growthbook": "^1.1.0", "@rudderstack/analytics-js": "^3.5.1", @@ -50197,7 +50198,7 @@ "license": "Apache-2.0", "dependencies": { "@binary-com/binary-document-uploader": "^2.4.8", - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/quill-ui": "1.24.4", "@deriv-com/translations": "1.3.9", "@deriv-com/ui": "1.36.4", @@ -50305,7 +50306,7 @@ "uuid": "^9.0.1" }, "devDependencies": { - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv/api-types": "1.0.172", "@testing-library/react": "^12.1.5", "@testing-library/react-hooks": "^7.0.2", @@ -50344,7 +50345,7 @@ "version": "0.0.4", "license": "Apache-2.0", "dependencies": { - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/translations": "1.3.9", "@deriv-com/ui": "1.36.4", "@deriv/account": "^1.0.0", @@ -50560,7 +50561,7 @@ "name": "@deriv/cashier", "version": "1.0.0", "dependencies": { - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/ui": "1.36.4", "@deriv/api": "^1.0.0", "@deriv/api-types": "1.0.172", @@ -50637,7 +50638,7 @@ "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/translations": "1.3.9", "@deriv-com/ui": "1.36.4", "@deriv-com/utils": "^0.0.42", @@ -50842,7 +50843,7 @@ "dependencies": { "@babel/polyfill": "^7.12.1 ", "@datadog/browser-rum": "^5.11.0", - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/auth-client": "1.3.7", "@deriv-com/quill-tokens": "2.0.4", "@deriv-com/quill-ui": "1.24.4", @@ -50977,7 +50978,7 @@ "version": "1.0.0", "dependencies": { "@binary-com/binary-document-uploader": "^2.4.8", - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/auth-client": "1.3.7", "@deriv-com/ui": "1.36.4", "@deriv-com/utils": "^0.0.42", @@ -51036,7 +51037,7 @@ "version": "0.7.3", "license": "ISC", "dependencies": { - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/ui": "1.36.4", "@deriv-com/utils": "^0.0.42", "@deriv/api": "^1.0.0", @@ -51190,7 +51191,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/polyfill": "^7.12.1 ", - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/ui": "1.36.4", "@deriv/api-types": "1.0.172", "@deriv/components": "^1.0.0", @@ -51286,7 +51287,7 @@ "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/utils": "^0.0.42", "@deriv/api-types": "1.0.172", "@deriv/quill-icons": "2.2.1", @@ -51356,7 +51357,7 @@ "version": "3.8.0", "license": "Apache-2.0", "dependencies": { - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/quill-tokens": "2.0.4", "@deriv-com/quill-ui": "1.24.4", "@deriv-com/ui": "1.36.4", @@ -51542,7 +51543,7 @@ "name": "@deriv/wallets", "version": "1.0.0", "dependencies": { - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/translations": "1.3.9", "@deriv-com/ui": "1.36.4", "@deriv-com/utils": "^0.0.42", diff --git a/package.json b/package.json index ea2ff9df654b..c62e7e328e91 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ }, "dependencies": { "@babel/preset-typescript": "^7.24.7", - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@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 0533c7a7309b..c2e197faa1f2 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.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/translations": "1.3.9", "@deriv-com/utils": "^0.0.42", "@deriv-com/ui": "1.36.4", diff --git a/packages/api-v2/package.json b/packages/api-v2/package.json index b9f54cdb9b3b..c722030734b9 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.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv/api-types": "1.0.172", "@testing-library/react": "^12.1.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/packages/appstore/package.json b/packages/appstore/package.json index 47da4dd8f520..c3caecae5d79 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.27.1", + "@deriv-com/analytics": "1.28.2", "@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 94b98891a422..96656b488f16 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.27.1", + "@deriv-com/analytics": "1.28.2", "@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 791515caffd2..7b607e8cb075 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.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/translations": "1.3.9", "@deriv-com/utils": "^0.0.42", "@deriv/account": "^1.0.0", diff --git a/packages/core/package.json b/packages/core/package.json index 6d7e1f283eea..e400eae8e2ac 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.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/quill-tokens": "2.0.4", "@deriv-com/quill-ui": "1.24.4", "@deriv-com/translations": "1.3.9", diff --git a/packages/core/src/Utils/Analytics/index.ts b/packages/core/src/Utils/Analytics/index.ts index 411e15a12d1a..0e9df1fa9c61 100644 --- a/packages/core/src/Utils/Analytics/index.ts +++ b/packages/core/src/Utils/Analytics/index.ts @@ -33,6 +33,7 @@ export const AnalyticsInitializer = async () => { growthbookKey: flags.marketing_growthbook ? process.env.GROWTHBOOK_CLIENT_KEY : undefined, growthbookDecryptionKey: flags.marketing_growthbook ? process.env.GROWTHBOOK_DECRYPTION_KEY : undefined, rudderstackKey: process.env.RUDDERSTACK_KEY, + growthbookOptions: { attributes: { loggedIn: !!client_information, @@ -51,6 +52,7 @@ export const AnalyticsInitializer = async () => { network_type: navigator.connection?.effectiveType, network_rtt: navigator.connection?.rtt, network_downlink: navigator.connection?.downlink, + user_id: localStorage.getItem('active_user_id') || '', residence_country: client_information?.residence, }, }, diff --git a/packages/hooks/package.json b/packages/hooks/package.json index d77b4584f018..7803fa3c8307 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -6,7 +6,7 @@ "sideEffects": false, "dependencies": { "@binary-com/binary-document-uploader": "^2.4.8", - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv/api": "^1.0.0", "@deriv-com/auth-client": "1.3.7", "@deriv/stores": "^1.0.0", diff --git a/packages/p2p/package.json b/packages/p2p/package.json index 19bbf2ef516f..6501930ab472 100644 --- a/packages/p2p/package.json +++ b/packages/p2p/package.json @@ -33,7 +33,7 @@ "license": "ISC", "dependencies": { "@deriv-com/ui": "1.36.4", - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/utils": "^0.0.42", "@deriv/api": "^1.0.0", "@deriv/api-types": "1.0.172", diff --git a/packages/reports/package.json b/packages/reports/package.json index ddd66844ffe6..42099ba159bf 100644 --- a/packages/reports/package.json +++ b/packages/reports/package.json @@ -78,7 +78,7 @@ }, "dependencies": { "@deriv-com/ui": "1.36.4", - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv/components": "^1.0.0", "@deriv/deriv-api": "^1.0.15", "@deriv/api-types": "1.0.172", diff --git a/packages/shared/package.json b/packages/shared/package.json index d249e7141a44..ea27744f9c35 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -46,7 +46,7 @@ "typescript": "^4.6.3" }, "dependencies": { - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv/quill-icons": "2.2.1", "@deriv/api-types": "1.0.172", "@deriv/translations": "^1.0.0", diff --git a/packages/trader/package.json b/packages/trader/package.json index 39b1458bc566..07c73f7163d0 100644 --- a/packages/trader/package.json +++ b/packages/trader/package.json @@ -88,7 +88,7 @@ "webpack-node-externals": "^2.5.2" }, "dependencies": { - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/quill-tokens": "2.0.4", "@deriv-com/utils": "^0.0.42", "@deriv-com/quill-ui": "1.24.4", diff --git a/packages/wallets/package.json b/packages/wallets/package.json index 680207f4346a..34b7602b1f7a 100644 --- a/packages/wallets/package.json +++ b/packages/wallets/package.json @@ -14,7 +14,7 @@ "start": "rimraf dist && npm run test && npm run serve" }, "dependencies": { - "@deriv-com/analytics": "1.27.1", + "@deriv-com/analytics": "1.28.2", "@deriv-com/translations": "1.3.9", "@deriv-com/ui": "1.36.4", "@deriv-com/utils": "^0.0.42",