Skip to content

Commit

Permalink
Aswathy/feat:Adding the new attributes user_id and anonymous_id (#17895)
Browse files Browse the repository at this point in the history
* fix: added the user_id attribute

* fix: added the anonymous_id and user_id to the growthbook attribute

* fix: removed the anonymous_id

* fix: removed the anonymous_id

* chore: updated analytics version
  • Loading branch information
aswathy-deriv authored Jan 14, 2025
1 parent 33f4be7 commit edf2b45
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 29 deletions.
33 changes: 17 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/appstore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/cashier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/cfd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/Utils/Analytics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/p2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/reports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/trader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/wallets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit edf2b45

Please sign in to comment.