@deriv-com/analytics 1.35.1 → 1.37.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.
Files changed (75) hide show
  1. package/README.md +853 -72
  2. package/dist/browser/analytics.bundle.global.js +23 -0
  3. package/dist/browser/analytics.bundle.global.js.map +1 -0
  4. package/dist/browser/analytics.esm.mjs +9 -0
  5. package/dist/browser/analytics.esm.mjs.map +1 -0
  6. package/dist/chunk-2P7RWD3W.mjs +3 -0
  7. package/dist/chunk-2P7RWD3W.mjs.map +1 -0
  8. package/dist/chunk-3LFZFQL4.mjs +3 -0
  9. package/dist/chunk-3LFZFQL4.mjs.map +1 -0
  10. package/dist/chunk-DNCZM4KN.mjs +4 -0
  11. package/dist/chunk-DNCZM4KN.mjs.map +1 -0
  12. package/dist/chunk-EMF3RT6E.mjs +14 -0
  13. package/dist/chunk-EMF3RT6E.mjs.map +1 -0
  14. package/dist/chunk-HQX3Z7PF.mjs +3 -0
  15. package/dist/chunk-HQX3Z7PF.mjs.map +1 -0
  16. package/dist/chunk-LKLVBL24.js +3 -0
  17. package/dist/chunk-LKLVBL24.js.map +1 -0
  18. package/dist/chunk-NOEKD4DT.js +4 -0
  19. package/dist/chunk-NOEKD4DT.js.map +1 -0
  20. package/dist/chunk-TLPR24DO.js +3 -0
  21. package/dist/chunk-TLPR24DO.js.map +1 -0
  22. package/dist/growthbook-NJGOOJH4.mjs +3 -0
  23. package/dist/growthbook-NJGOOJH4.mjs.map +1 -0
  24. package/dist/index.d.mts +114 -0
  25. package/dist/index.d.ts +114 -0
  26. package/dist/index.js +4 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/index.mjs +4 -0
  29. package/dist/index.mjs.map +1 -0
  30. package/dist/metafile-cjs.json +1 -0
  31. package/dist/metafile-esm.json +1 -0
  32. package/dist/metafile-iife.json +1 -0
  33. package/dist/posthog-CY-D6TZM.d.mts +90 -0
  34. package/dist/posthog-D--oI2Yn.d.ts +90 -0
  35. package/dist/posthog-OIC32FZG.mjs +6 -0
  36. package/dist/posthog-OIC32FZG.mjs.map +1 -0
  37. package/dist/providers/growthbook/index.d.mts +73 -0
  38. package/dist/providers/growthbook/index.d.ts +73 -0
  39. package/dist/providers/growthbook/index.js +3 -0
  40. package/dist/providers/growthbook/index.js.map +1 -0
  41. package/dist/providers/growthbook/index.mjs +3 -0
  42. package/dist/providers/growthbook/index.mjs.map +1 -0
  43. package/dist/providers/posthog/index.d.mts +3 -0
  44. package/dist/providers/posthog/index.d.ts +3 -0
  45. package/dist/providers/posthog/index.js +3 -0
  46. package/dist/providers/posthog/index.js.map +1 -0
  47. package/dist/providers/posthog/index.mjs +3 -0
  48. package/dist/providers/posthog/index.mjs.map +1 -0
  49. package/dist/providers/rudderstack/index.d.mts +73 -0
  50. package/dist/providers/rudderstack/index.d.ts +73 -0
  51. package/dist/providers/rudderstack/index.js +2 -0
  52. package/dist/providers/rudderstack/index.js.map +1 -0
  53. package/dist/providers/rudderstack/index.mjs +2 -0
  54. package/dist/providers/rudderstack/index.mjs.map +1 -0
  55. package/{lib/types.d.ts → dist/types-DoMejCXv.d.mts} +18 -29
  56. package/dist/types-DoMejCXv.d.ts +361 -0
  57. package/dist/utils/analytics-cache/index.d.mts +138 -0
  58. package/dist/utils/analytics-cache/index.d.ts +138 -0
  59. package/dist/utils/analytics-cache/index.js +2 -0
  60. package/dist/utils/analytics-cache/index.js.map +1 -0
  61. package/dist/utils/analytics-cache/index.mjs +2 -0
  62. package/dist/utils/analytics-cache/index.mjs.map +1 -0
  63. package/package.json +97 -68
  64. package/dist/analytics.bundle.js +0 -1
  65. package/lib/analytics.d.ts +0 -66
  66. package/lib/analytics.js +0 -418
  67. package/lib/growthbook.d.ts +0 -29
  68. package/lib/growthbook.js +0 -144
  69. package/lib/index.d.ts +0 -2
  70. package/lib/index.js +0 -5
  71. package/lib/posthog.d.ts +0 -28
  72. package/lib/posthog.js +0 -154
  73. package/lib/rudderstack.d.ts +0 -23
  74. package/lib/rudderstack.js +0 -100
  75. package/lib/types.js +0 -2
package/package.json CHANGED
@@ -1,70 +1,99 @@
1
1
  {
2
- "name": "@deriv-com/analytics",
3
- "version": "1.35.1",
4
- "description": "The analytics package contains all the utility functions used for tracking user events and sending them to the respective platform such as Rudderstack.",
5
- "keywords": [
6
- "rudderstack",
7
- "growthbook",
8
- "react"
9
- ],
10
- "private": false,
11
- "publishConfig": {
12
- "access": "public"
13
- },
14
- "author": "Amir Ali, Addriene, Nikita,Aswathy",
15
- "main": "lib/index.js",
16
- "types": "lib/index.d.ts",
17
- "scripts": {
18
- "test": "./node_modules/.bin/jest",
19
- "build": "tsc && npm run build:webpack",
20
- "prepare": "npm run build && husky install",
21
- "prepublishOnly": "npm test",
22
- "build:webpack": "webpack"
23
- },
24
- "files": [
25
- "lib/**/*",
26
- "dist/**/*"
27
- ],
28
- "repository": {
29
- "type": "git",
30
- "url": "https://github.com/binary-com/deriv-analytics"
31
- },
32
- "homepage": "https://github.com/binary-com/deriv-analytics",
33
- "devDependencies": {
34
- "@deriv-com/utils": "^0.0.58",
35
- "@semantic-release/changelog": "^6.0.3",
36
- "@semantic-release/github": "^10.0.6",
37
- "@semantic-release/npm": "^13.0.0",
38
- "@semantic-release/release-notes-generator": "^14.0.0",
39
- "@types/jest": "^29.5.3",
40
- "@types/js-cookie": "^3.0.6",
41
- "@types/node": "^20.4.1",
42
- "@types/uuid": "^10.0.0",
43
- "husky": "^8.0.3",
44
- "jest": "^29.6.1",
45
- "jest-environment-jsdom": "^29.6.1",
46
- "lint-staged": "^15.0.1",
47
- "prettier": "^3.0.3",
48
- "semantic-release": "^25.0.0",
49
- "ts-jest": "^29.1.1",
50
- "ts-loader": "^9.5.1",
51
- "typescript": "^4.9.5",
52
- "webpack": "^5.91.0",
53
- "webpack-cli": "^5.1.4"
54
- },
55
- "dependencies": {
56
- "@growthbook/growthbook": "^1.1.0",
57
- "@rudderstack/analytics-js": "^3.5.1",
58
- "js-cookie": "^3.0.5",
59
- "posthog-js": "^1.313.0",
60
- "uuid": "^10.0.0"
61
- },
62
- "engines": {
63
- "node": "18.x",
64
- "npm": "9.x"
65
- },
66
- "license": "MIT",
67
- "lint-staged": {
68
- "*.{js,md,ts}": "prettier --write"
69
- }
2
+ "name": "@deriv-com/analytics",
3
+ "version": "1.37.0",
4
+ "description": "Comprehensive analytics package for Deriv applications. Provides unified event tracking, A/B testing, and user analytics through RudderStack, PostHog and GrowthBook integrations with built-in caching and offline support.",
5
+ "keywords": [
6
+ "rudderstack",
7
+ "growthbook",
8
+ "posthog",
9
+ "analytics",
10
+ "event-tracking"
11
+ ],
12
+ "private": false,
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "author": "Amir Ali, Addriene, Nikita,Aswathy",
17
+ "main": "./dist/index.js",
18
+ "module": "./dist/index.mjs",
19
+ "types": "./dist/index.d.ts",
20
+ "browser": "./dist/browser/analytics.bundle.global.js",
21
+ "exports": {
22
+ ".": {
23
+ "types": "./dist/index.d.ts",
24
+ "import": "./dist/index.mjs",
25
+ "require": "./dist/index.js"
26
+ },
27
+ "./growthbook": {
28
+ "types": "./dist/providers/growthbook/index.d.ts",
29
+ "import": "./dist/providers/growthbook/index.mjs",
30
+ "require": "./dist/providers/growthbook/index.js"
31
+ },
32
+ "./rudderstack": {
33
+ "types": "./dist/providers/rudderstack/index.d.ts",
34
+ "import": "./dist/providers/rudderstack/index.mjs",
35
+ "require": "./dist/providers/rudderstack/index.js"
36
+ },
37
+ "./posthog": {
38
+ "types": "./dist/providers/posthog/index.d.ts",
39
+ "import": "./dist/providers/posthog/index.mjs",
40
+ "require": "./dist/providers/posthog/index.js"
41
+ },
42
+ "./cache": {
43
+ "types": "./dist/utils/analytics-cache/index.d.ts",
44
+ "import": "./dist/utils/analytics-cache/index.mjs",
45
+ "require": "./dist/utils/analytics-cache/index.js"
46
+ }
47
+ },
48
+ "scripts": {
49
+ "test": "./node_modules/.bin/jest",
50
+ "build": "tsup",
51
+ "prepare": "npm run build && husky install",
52
+ "prepublishOnly": "npm test"
53
+ },
54
+ "files": [
55
+ "dist/**/*"
56
+ ],
57
+ "repository": {
58
+ "type": "git",
59
+ "url": "https://github.com/deriv-com/deriv-analytics"
60
+ },
61
+ "homepage": "https://github.com/deriv-com/deriv-analytics",
62
+ "devDependencies": {
63
+ "@semantic-release/changelog": "^6.0.3",
64
+ "@semantic-release/git": "^10.0.1",
65
+ "@semantic-release/github": "^12.0.2",
66
+ "@semantic-release/npm": "^13.1.3",
67
+ "@semantic-release/release-notes-generator": "^14.1.0",
68
+ "@types/jest": "^30.0.0",
69
+ "@types/js-cookie": "^3.0.6",
70
+ "@types/node": "^25.0.10",
71
+ "husky": "^9.1.7",
72
+ "jest": "^30.2.0",
73
+ "jest-environment-jsdom": "^30.2.0",
74
+ "jest-location-mock": "^2.0.0",
75
+ "lint-staged": "^16.2.7",
76
+ "prettier": "^3.8.1",
77
+ "semantic-release": "^25.0.2",
78
+ "ts-jest": "^29.4.6",
79
+ "tslib": "^2.8.1",
80
+ "tsup": "^8.5.1",
81
+ "typescript": "^5.9.3"
82
+ },
83
+ "dependencies": {
84
+ "@rudderstack/analytics-js": "^3.14.0",
85
+ "js-cookie": "^3.0.5",
86
+ "posthog-js": "^1.204.2"
87
+ },
88
+ "optionalDependencies": {
89
+ "@growthbook/growthbook": "^1.4.1"
90
+ },
91
+ "engines": {
92
+ "node": ">=24.13.0",
93
+ "npm": ">=11.7.0"
94
+ },
95
+ "license": "MIT",
96
+ "lint-staged": {
97
+ "*.{js,md,ts}": "prettier --write"
98
+ }
70
99
  }