@kiosinc/commons-rn 0.1.78 → 0.1.80
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/lib/commonjs/utils/analytics.js +28 -15
- package/lib/commonjs/utils/analytics.js.map +1 -1
- package/lib/module/utils/analytics.js +28 -15
- package/lib/module/utils/analytics.js.map +1 -1
- package/lib/typescript/src/utils/analytics.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/utils/analytics.ts +31 -15
|
@@ -7,6 +7,7 @@ exports.analytics = exports.Analytics = void 0;
|
|
|
7
7
|
var _mixpanelReactNative = require("mixpanel-react-native");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _reactNativeConfig = _interopRequireDefault(require("react-native-config"));
|
|
10
|
+
var _auth = _interopRequireDefault(require("@react-native-firebase/auth"));
|
|
10
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
12
|
const createTrackFunction = () => {
|
|
12
13
|
return params => {
|
|
@@ -24,23 +25,33 @@ const Analytics = exports.Analytics = {
|
|
|
24
25
|
// @ts-ignore
|
|
25
26
|
mixpanel = new _mixpanelReactNative.Mixpanel(_reactNativeConfig.default.MIXPANEL_TOKEN, trackAutomaticEvents);
|
|
26
27
|
mixpanel.init();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
const registerCustomSuperProperties = () => {
|
|
29
|
+
mixpanel.registerSuperProperties({
|
|
30
|
+
version: _reactNative.Platform.Version
|
|
31
|
+
});
|
|
32
|
+
const now = new Date().toISOString();
|
|
33
|
+
mixpanel.registerSuperPropertiesOnce({
|
|
34
|
+
app: _reactNativeConfig.default.URL_SCHEME,
|
|
35
|
+
platform: _reactNative.Platform.OS,
|
|
36
|
+
first_time_install: now
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
const identify = userId => {
|
|
40
|
+
mixpanel?.identify(userId);
|
|
41
|
+
// Registering super properties again on identification.
|
|
42
|
+
registerCustomSuperProperties();
|
|
43
|
+
};
|
|
44
|
+
if ((0, _auth.default)().currentUser?.isAnonymous) {
|
|
45
|
+
// Register custom super properties on app lunch before login/signup.
|
|
46
|
+
registerCustomSuperProperties();
|
|
47
|
+
} else {
|
|
48
|
+
// If the user is not anonymous at app launch, it indicates that the user is already logged in.
|
|
49
|
+
// So, we can set the user ID in Mixpanel.
|
|
50
|
+
identify((0, _auth.default)().currentUser.uid);
|
|
51
|
+
}
|
|
36
52
|
return {
|
|
37
53
|
track: createTrackFunction(),
|
|
38
|
-
identify
|
|
39
|
-
mixpanel?.identify(userId);
|
|
40
|
-
mixpanel?.registerSuperProperties({
|
|
41
|
-
version: _reactNative.Platform.Version
|
|
42
|
-
});
|
|
43
|
-
},
|
|
54
|
+
identify,
|
|
44
55
|
profile: {
|
|
45
56
|
set: (key, value) => {
|
|
46
57
|
mixpanel?.getPeople()?.set(key, value);
|
|
@@ -48,6 +59,8 @@ const Analytics = exports.Analytics = {
|
|
|
48
59
|
},
|
|
49
60
|
reset: () => {
|
|
50
61
|
mixpanel?.reset();
|
|
62
|
+
// Registering super properties on logout.
|
|
63
|
+
registerCustomSuperProperties();
|
|
51
64
|
}
|
|
52
65
|
};
|
|
53
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_mixpanelReactNative","require","_reactNative","_reactNativeConfig","_interopRequireDefault","obj","__esModule","default","createTrackFunction","params","properties","mixpanel","track","eventName","Analytics","exports","init","trackAutomaticEvents","Mixpanel","Config","MIXPANEL_TOKEN","registerSuperProperties","version","Platform","Version","now","Date","toISOString","registerSuperPropertiesOnce","app","URL_SCHEME","platform","OS","first_time_install","identify","userId","profile","set","key","value","getPeople","reset","analytics"],"sourceRoot":"../../../src","sources":["utils/analytics.ts"],"mappings":";;;;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;
|
|
1
|
+
{"version":3,"names":["_mixpanelReactNative","require","_reactNative","_reactNativeConfig","_interopRequireDefault","_auth","obj","__esModule","default","createTrackFunction","params","properties","mixpanel","track","eventName","Analytics","exports","init","trackAutomaticEvents","Mixpanel","Config","MIXPANEL_TOKEN","registerCustomSuperProperties","registerSuperProperties","version","Platform","Version","now","Date","toISOString","registerSuperPropertiesOnce","app","URL_SCHEME","platform","OS","first_time_install","identify","userId","auth","currentUser","isAnonymous","uid","profile","set","key","value","getPeople","reset","analytics"],"sourceRoot":"../../../src","sources":["utils/analytics.ts"],"mappings":";;;;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAD,sBAAA,CAAAH,OAAA;AAA+C,SAAAG,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAa/C,MAAMG,mBAAmB,GAAGA,CAAA,KAErB;EACL,OAAQC,MAAS,IAAK;IACpB,IAAI,YAAY,IAAIA,MAAM,IAAIA,MAAM,CAACC,UAAU,EAAE;MAC/CC,QAAQ,EAAEC,KAAK,CAACH,MAAM,CAACI,SAAS,EAAEJ,MAAM,CAACC,UAAU,CAAC;IACtD,CAAC,MAAM;MACLC,QAAQ,EAAEC,KAAK,CAACH,MAAM,CAACI,SAAS,CAAC;IACnC;EACF,CAAC;AACH,CAAC;AAED,IAAIF,QAAkB;AACf,MAAMG,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG;EACvBE,IAAI,EAAEA,CAAA,KAAyD;IAC7D,MAAMC,oBAAoB,GAAG,KAAK;IAClC;IACAN,QAAQ,GAAG,IAAIO,6BAAQ,CAACC,0BAAM,CAACC,cAAc,EAA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CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Mixpanel } from 'mixpanel-react-native';
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
3
|
import Config from 'react-native-config';
|
|
4
|
+
import auth from '@react-native-firebase/auth';
|
|
4
5
|
const createTrackFunction = () => {
|
|
5
6
|
return params => {
|
|
6
7
|
if ('properties' in params && params.properties) {
|
|
@@ -17,23 +18,33 @@ export const Analytics = {
|
|
|
17
18
|
// @ts-ignore
|
|
18
19
|
mixpanel = new Mixpanel(Config.MIXPANEL_TOKEN, trackAutomaticEvents);
|
|
19
20
|
mixpanel.init();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
const registerCustomSuperProperties = () => {
|
|
22
|
+
mixpanel.registerSuperProperties({
|
|
23
|
+
version: Platform.Version
|
|
24
|
+
});
|
|
25
|
+
const now = new Date().toISOString();
|
|
26
|
+
mixpanel.registerSuperPropertiesOnce({
|
|
27
|
+
app: Config.URL_SCHEME,
|
|
28
|
+
platform: Platform.OS,
|
|
29
|
+
first_time_install: now
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const identify = userId => {
|
|
33
|
+
mixpanel?.identify(userId);
|
|
34
|
+
// Registering super properties again on identification.
|
|
35
|
+
registerCustomSuperProperties();
|
|
36
|
+
};
|
|
37
|
+
if (auth().currentUser?.isAnonymous) {
|
|
38
|
+
// Register custom super properties on app lunch before login/signup.
|
|
39
|
+
registerCustomSuperProperties();
|
|
40
|
+
} else {
|
|
41
|
+
// If the user is not anonymous at app launch, it indicates that the user is already logged in.
|
|
42
|
+
// So, we can set the user ID in Mixpanel.
|
|
43
|
+
identify(auth().currentUser.uid);
|
|
44
|
+
}
|
|
29
45
|
return {
|
|
30
46
|
track: createTrackFunction(),
|
|
31
|
-
identify
|
|
32
|
-
mixpanel?.identify(userId);
|
|
33
|
-
mixpanel?.registerSuperProperties({
|
|
34
|
-
version: Platform.Version
|
|
35
|
-
});
|
|
36
|
-
},
|
|
47
|
+
identify,
|
|
37
48
|
profile: {
|
|
38
49
|
set: (key, value) => {
|
|
39
50
|
mixpanel?.getPeople()?.set(key, value);
|
|
@@ -41,6 +52,8 @@ export const Analytics = {
|
|
|
41
52
|
},
|
|
42
53
|
reset: () => {
|
|
43
54
|
mixpanel?.reset();
|
|
55
|
+
// Registering super properties on logout.
|
|
56
|
+
registerCustomSuperProperties();
|
|
44
57
|
}
|
|
45
58
|
};
|
|
46
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Mixpanel","Platform","Config","createTrackFunction","params","properties","mixpanel","track","eventName","Analytics","init","trackAutomaticEvents","MIXPANEL_TOKEN","registerSuperProperties","version","Version","now","Date","toISOString","registerSuperPropertiesOnce","app","URL_SCHEME","platform","OS","first_time_install","identify","userId","profile","set","key","value","getPeople","reset","analytics"],"sourceRoot":"../../../src","sources":["utils/analytics.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,QAAQ,QAAQ,cAAc;AACvC,OAAOC,MAAM,MAAM,qBAAqB;
|
|
1
|
+
{"version":3,"names":["Mixpanel","Platform","Config","auth","createTrackFunction","params","properties","mixpanel","track","eventName","Analytics","init","trackAutomaticEvents","MIXPANEL_TOKEN","registerCustomSuperProperties","registerSuperProperties","version","Version","now","Date","toISOString","registerSuperPropertiesOnce","app","URL_SCHEME","platform","OS","first_time_install","identify","userId","currentUser","isAnonymous","uid","profile","set","key","value","getPeople","reset","analytics"],"sourceRoot":"../../../src","sources":["utils/analytics.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,QAAQ,QAAQ,cAAc;AACvC,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,IAAI,MAAM,6BAA6B;AAa9C,MAAMC,mBAAmB,GAAGA,CAAA,KAErB;EACL,OAA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MACLvB,KAAK,EAAEJ,mBAAmB,CAAuB,CAAC;MAClDuB,QAAQ;MACRK,OAAO,EAAE;QACPC,GAAG,EAAEA,CAACC,GAAW,EAAEC,KAAW,KAAK;UACjC5B,QAAQ,EAAE6B,SAAS,CAAC,CAAC,EAAEH,GAAG,CAACC,GAAG,EAAEC,KAAK,CAAC;QACxC;MACF,CAAC;MACDE,KAAK,EAAEA,CAAA,KAAM;QACX9B,QAAQ,EAAE8B,KAAK,CAAC,CAAC;QACjB;QACAvB,6BAA6B,CAAC,CAAC;MACjC;IACF,CAAC;EACH;AACF,CAAC;AAED,OAAO,MAAMwB,SAAS,GAAG5B,SAAS,CAACC,IAAI,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../../src/utils/analytics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../../src/utils/analytics.ts"],"names":[],"mappings":"AAKA,KAAK,gBAAgB,GACjB;IAAE,SAAS,EAAE,iBAAiB,CAAC;IAAC,UAAU,EAAE;QAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAA;KAAE,CAAA;CAAE,GAC3E;IAAE,SAAS,EAAE,mBAAmB,CAAA;CAAE,GAClC;IAAE,SAAS,EAAE,iBAAiB,CAAA;CAAE,GAChC;IAAE,SAAS,EAAE,iBAAiB,CAAA;CAAE,GAChC;IAAE,SAAS,EAAE,wBAAwB,CAAA;CAAE,GACvC;IAAE,SAAS,EAAE,0BAA0B,CAAC;IAAC,UAAU,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GACxE;IAAE,SAAS,EAAE,mBAAmB,CAAA;CAAE,GAClC;IAAE,SAAS,EAAE,KAAK,CAAA;CAAE,GACpB;IAAE,SAAS,EAAE,0BAA0B,CAAA;CAAE,CAAC;AAe9C,eAAO,MAAM,SAAS;;mBACU,MAAM;qBAAe,GAAG;;;2BAkB1B,MAAM;;uBAmBjB,MAAM,UAAU,GAAG;;;;CAWrC,CAAC;AAEF,eAAO,MAAM,SAAS;;mBAlDU,MAAM;qBAAe,GAAG;;uBAkB1B,MAAM;;mBAmBjB,MAAM,UAAU,GAAG;;;CAaG,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiosinc/commons-rn",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.80",
|
|
4
4
|
"description": "Common Code",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@commitlint/config-conventional": "^17.0.2",
|
|
59
59
|
"@evilmartians/lefthook": "^1.5.0",
|
|
60
|
-
"@react-native-firebase/auth": "^
|
|
60
|
+
"@react-native-firebase/auth": "^20.3.0",
|
|
61
61
|
"@react-native/eslint-config": "^0.72.2",
|
|
62
62
|
"@react-navigation/native": "^6.1.9",
|
|
63
63
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
@@ -185,8 +185,8 @@
|
|
|
185
185
|
"dependencies": {
|
|
186
186
|
"@gorhom/bottom-sheet": "^4.6.1",
|
|
187
187
|
"@hookform/resolvers": "^3.3.2",
|
|
188
|
-
"@react-native-firebase/firestore": "^
|
|
189
|
-
"@react-native-firebase/storage": "^20.
|
|
188
|
+
"@react-native-firebase/firestore": "^20.3.0",
|
|
189
|
+
"@react-native-firebase/storage": "^20.3.0",
|
|
190
190
|
"@react-navigation/material-top-tabs": "^6.6.13",
|
|
191
191
|
"@shopify/restyle": "^2.4.2",
|
|
192
192
|
"@tanstack/react-query": "^4.32.6",
|
package/src/utils/analytics.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Mixpanel } from 'mixpanel-react-native';
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
3
|
import Config from 'react-native-config';
|
|
4
|
+
import auth from '@react-native-firebase/auth';
|
|
4
5
|
|
|
5
6
|
type CommonEventTypes =
|
|
6
7
|
| { eventName: 'login_completed'; properties: { method: 'phone' | 'email' } }
|
|
@@ -32,24 +33,37 @@ export const Analytics = {
|
|
|
32
33
|
// @ts-ignore
|
|
33
34
|
mixpanel = new Mixpanel(Config.MIXPANEL_TOKEN, trackAutomaticEvents);
|
|
34
35
|
mixpanel.init();
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
|
|
37
|
+
const registerCustomSuperProperties = () => {
|
|
38
|
+
mixpanel.registerSuperProperties({
|
|
39
|
+
version: Platform.Version,
|
|
40
|
+
});
|
|
41
|
+
const now = new Date().toISOString();
|
|
42
|
+
mixpanel.registerSuperPropertiesOnce({
|
|
43
|
+
app: Config.URL_SCHEME,
|
|
44
|
+
platform: Platform.OS,
|
|
45
|
+
first_time_install: now,
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const identify = (userId: string) => {
|
|
50
|
+
mixpanel?.identify(userId);
|
|
51
|
+
// Registering super properties again on identification.
|
|
52
|
+
registerCustomSuperProperties();
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
if (auth().currentUser?.isAnonymous) {
|
|
56
|
+
// Register custom super properties on app lunch before login/signup.
|
|
57
|
+
registerCustomSuperProperties();
|
|
58
|
+
} else {
|
|
59
|
+
// If the user is not anonymous at app launch, it indicates that the user is already logged in.
|
|
60
|
+
// So, we can set the user ID in Mixpanel.
|
|
61
|
+
identify(auth().currentUser.uid);
|
|
62
|
+
}
|
|
44
63
|
|
|
45
64
|
return {
|
|
46
65
|
track: createTrackFunction<CommonEventTypes | T>(),
|
|
47
|
-
identify
|
|
48
|
-
mixpanel?.identify(userId);
|
|
49
|
-
mixpanel?.registerSuperProperties({
|
|
50
|
-
version: Platform.Version,
|
|
51
|
-
});
|
|
52
|
-
},
|
|
66
|
+
identify,
|
|
53
67
|
profile: {
|
|
54
68
|
set: (key: string, value?: any) => {
|
|
55
69
|
mixpanel?.getPeople()?.set(key, value);
|
|
@@ -57,6 +71,8 @@ export const Analytics = {
|
|
|
57
71
|
},
|
|
58
72
|
reset: () => {
|
|
59
73
|
mixpanel?.reset();
|
|
74
|
+
// Registering super properties on logout.
|
|
75
|
+
registerCustomSuperProperties();
|
|
60
76
|
},
|
|
61
77
|
};
|
|
62
78
|
},
|