@keplr-wallet/analytics 0.12.0-alpha.0 → 0.12.0-alpha.3
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/LICENSE +8 -2
- package/build/index.d.ts +1 -0
- package/build/index.js +3 -9
- package/build/index.js.map +1 -1
- package/package.json +2 -3
- package/src/index.tsx +3 -9
package/LICENSE
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
License: Apache2.0
|
1
|
+
License: Apache2.0 (Extension) / All rights reserved (Mobile)
|
2
|
+
|
3
|
+
## Keplr Extension License:
|
2
4
|
|
3
5
|
Apache License
|
4
6
|
Version 2.0, January 2004
|
@@ -200,4 +202,8 @@ License: Apache2.0
|
|
200
202
|
distributed under the License is distributed on an "AS IS" BASIS,
|
201
203
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
202
204
|
See the License for the specific language governing permissions and
|
203
|
-
limitations under the License.
|
205
|
+
limitations under the License.
|
206
|
+
|
207
|
+
## Keplr Mobile License
|
208
|
+
|
209
|
+
Copyright (c) 2021 Chainapsis Inc. All rights reserved.
|
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
|
-
|
23
|
-
|
24
|
-
|
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
|
}
|
package/build/index.js.map
CHANGED
@@ -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,
|
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,SAAS,CAAC,EAAU;QAClB,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,iBAAiB,CAAC,cAAiB;QACjC,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;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,10 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"name": "@keplr-wallet/analytics",
|
3
|
-
"version": "0.12.0-alpha.
|
3
|
+
"version": "0.12.0-alpha.3",
|
4
4
|
"main": "build/index.js",
|
5
5
|
"author": "chainapsis",
|
6
6
|
"license": "Apache-2.0",
|
7
|
-
"private": false,
|
8
7
|
"publishConfig": {
|
9
8
|
"access": "public"
|
10
9
|
},
|
@@ -18,5 +17,5 @@
|
|
18
17
|
"dependencies": {
|
19
18
|
"sha.js": "^2.4.11"
|
20
19
|
},
|
21
|
-
"gitHead": "
|
20
|
+
"gitHead": "1ee89644b711dd1dbbebc8eb86ed29d407088834"
|
22
21
|
}
|
package/src/index.tsx
CHANGED
@@ -54,15 +54,9 @@ export class AnalyticsStore<
|
|
54
54
|
} = {}
|
55
55
|
) {}
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
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);
|