@keplr-wallet/analytics 0.11.19 → 0.11.21-rc.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.
package/build/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export declare class AnalyticsStore<E extends Record<string, Readonly<string | n
22
22
  eventProperties?: E;
23
23
  };
24
24
  });
25
+ setUserId(id: string): void;
25
26
  setUserProperties(userProperties: U): void;
26
27
  logEvent(eventName: string, eventProperties?: E): void;
27
28
  logPageView(pageName: string, eventProperties?: E): void;
package/build/index.js CHANGED
@@ -19,15 +19,9 @@ class AnalyticsStore {
19
19
  this.analyticsClient = analyticsClient;
20
20
  this.middleware = middleware;
21
21
  }
22
- // Set the user id with the hashed address.
23
- // Use this address with common address that can be dealt with the user without considering the selected chain.
24
- // For example, the address will be different according to the chains (cosmoshub, secret, kava...),
25
- // but we want to classify the user without considering the chains.
26
- // So, I recommend to use only the address of the main chain (probably cosmoshub).
27
- // setUserId(bech32Address: string): void {
28
- // const hashedAddress = new sha256().update(bech32Address).digest("hex");
29
- // this.analyticsClient.setUserId(hashedAddress);
30
- // }
22
+ setUserId(id) {
23
+ this.analyticsClient.setUserId(id);
24
+ }
31
25
  setUserProperties(userProperties) {
32
26
  this.analyticsClient.setUserProperties(userProperties);
33
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAAA,mCAAmC;;;AAmBnC,MAAa,mBAAmB;IAC9B,QAAQ;QACN,OAAO;IACT,CAAC;IAED,SAAS;QACP,OAAO;IACT,CAAC;IAED,iBAAiB;QACf,OAAO;IACT,CAAC;CACF;AAZD,kDAYC;AAED,MAAa,cAAc;IAUzB,YACqB,eAAgC,EAChC,aAQf,EAAE;QATa,oBAAe,GAAf,eAAe,CAAiB;QAChC,eAAU,GAAV,UAAU,CAQvB;IACL,CAAC;IAEJ,2CAA2C;IAC3C,+GAA+G;IAC/G,mGAAmG;IAC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;IACzD,CAAC;IAED,QAAQ,CAAC,SAAiB,EAAE,eAAmB;QAC7C,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;YAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;YACjE,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;YAC1B,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;SACvC;QAED,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IAC5D,CAAC;IAED,WAAW,CAAC,QAAgB,EAAE,eAAmB;QAC/C,IAAI,CAAC,QAAQ,CAAC,GAAG,QAAQ,SAAS,EAAE,eAAe,CAAC,CAAC;IACvD,CAAC;CACF;AA5CD,wCA4CC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keplr-wallet/analytics",
3
- "version": "0.11.19",
3
+ "version": "0.11.21-rc.0",
4
4
  "main": "build/index.js",
5
5
  "author": "chainapsis",
6
6
  "license": "Apache-2.0",
@@ -18,5 +18,5 @@
18
18
  "dependencies": {
19
19
  "sha.js": "^2.4.11"
20
20
  },
21
- "gitHead": "97a65130583778b09e59016e0e7c95a296641c94"
21
+ "gitHead": "d1ac0af8c88d84fc4de6954fc08e49568ba299fc"
22
22
  }
package/src/index.tsx CHANGED
@@ -54,15 +54,9 @@ export class AnalyticsStore<
54
54
  } = {}
55
55
  ) {}
56
56
 
57
- // Set the user id with the hashed address.
58
- // Use this address with common address that can be dealt with the user without considering the selected chain.
59
- // For example, the address will be different according to the chains (cosmoshub, secret, kava...),
60
- // but we want to classify the user without considering the chains.
61
- // So, I recommend to use only the address of the main chain (probably cosmoshub).
62
- // setUserId(bech32Address: string): void {
63
- // const hashedAddress = new sha256().update(bech32Address).digest("hex");
64
- // this.analyticsClient.setUserId(hashedAddress);
65
- // }
57
+ setUserId(id: string): void {
58
+ this.analyticsClient.setUserId(id);
59
+ }
66
60
 
67
61
  setUserProperties(userProperties: U): void {
68
62
  this.analyticsClient.setUserProperties(userProperties);