@formo/analytics 1.11.0 → 1.11.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formo/analytics",
3
- "version": "1.11.0",
3
+ "version": "1.11.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/getformo/sdk.git"
@@ -23,7 +23,8 @@
23
23
  "dependencies": {
24
24
  "@highlight-run/react": "^7.0.2",
25
25
  "axios": "^1.7.7",
26
- "highlight.run": "^9.5.2"
26
+ "highlight.run": "^9.5.2",
27
+ "tsc": "^2.0.4"
27
28
  },
28
29
  "devDependencies": {
29
30
  "@babel/core": "^7.x",
@@ -62,7 +63,7 @@
62
63
  "sinon-chai": "^3.7.0",
63
64
  "ts-loader": "^9.3.1",
64
65
  "ts-node": "^10.8.2",
65
- "typescript": "~4.8.0",
66
+ "typescript": "^5.6.3",
66
67
  "webpack": "^5.74.0",
67
68
  "webpack-cli": "^4.10.0"
68
69
  },
@@ -21,8 +21,8 @@ export class FormoAnalytics implements IFormoAnalytics {
21
21
  this.config = {
22
22
  token: this.apiKey,
23
23
  };
24
- this.trackPageHit();
25
24
  }
25
+
26
26
  static async init(
27
27
  apiKey: string,
28
28
  projectId: string
@@ -94,6 +94,8 @@ export class FormoAnalytics implements IFormoAnalytics {
94
94
  payload: isNotEmpty(payload) ? this.maskSensitiveData(payload) : payload,
95
95
  };
96
96
 
97
+ console.log(`Request data: ${JSON.stringify(requestData)}`);
98
+
97
99
  const sendRequest = async (): Promise<void> => {
98
100
  try {
99
101
  const response = await axios.post(apiUrl, JSON.stringify(requestData), {
@@ -109,7 +111,7 @@ export class FormoAnalytics implements IFormoAnalytics {
109
111
  }
110
112
  } catch (error) {
111
113
  attempt++;
112
-
114
+
113
115
  if (attempt <= maxRetries) {
114
116
  const retryDelay = Math.pow(2, attempt) * 1000;
115
117
  console.error(