@shware/analytics 2.3.10 → 2.4.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/dist/hooks/use-previous.cjs +38 -0
- package/dist/hooks/use-previous.cjs.map +1 -0
- package/dist/hooks/use-previous.d.cts +3 -0
- package/dist/hooks/use-previous.d.ts +3 -0
- package/dist/hooks/use-previous.mjs +13 -0
- package/dist/hooks/use-previous.mjs.map +1 -0
- package/dist/native/analytics.cjs +68 -0
- package/dist/native/analytics.cjs.map +1 -0
- package/dist/native/analytics.d.cts +3 -0
- package/dist/native/analytics.d.ts +3 -0
- package/dist/native/analytics.mjs +43 -0
- package/dist/native/analytics.mjs.map +1 -0
- package/dist/native/index.cjs +9 -98
- package/dist/native/index.cjs.map +1 -1
- package/dist/native/index.d.cts +5 -10
- package/dist/native/index.d.ts +5 -10
- package/dist/native/index.mjs +4 -92
- package/dist/native/index.mjs.map +1 -1
- package/dist/native/setup.cjs +134 -0
- package/dist/native/setup.cjs.map +1 -0
- package/dist/native/setup.d.cts +12 -0
- package/dist/native/setup.d.ts +12 -0
- package/dist/native/setup.mjs +114 -0
- package/dist/native/setup.mjs.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/hooks/use-previous.ts
|
|
21
|
+
var use_previous_exports = {};
|
|
22
|
+
__export(use_previous_exports, {
|
|
23
|
+
usePrevious: () => usePrevious
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(use_previous_exports);
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
function usePrevious(value) {
|
|
28
|
+
const ref = (0, import_react.useRef)(void 0);
|
|
29
|
+
(0, import_react.useEffect)(() => {
|
|
30
|
+
ref.current = value;
|
|
31
|
+
});
|
|
32
|
+
return ref.current;
|
|
33
|
+
}
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
usePrevious
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=use-previous.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/use-previous.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nexport function usePrevious<T>(value: T): T | undefined {\n const ref = useRef<T | undefined>(undefined);\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkC;AAE3B,SAAS,YAAe,OAAyB;AACtD,QAAM,UAAM,qBAAsB,MAAS;AAC3C,8BAAU,MAAM;AACd,QAAI,UAAU;AAAA,EAChB,CAAC;AACD,SAAO,IAAI;AACb;","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/hooks/use-previous.ts
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
function usePrevious(value) {
|
|
4
|
+
const ref = useRef(void 0);
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
ref.current = value;
|
|
7
|
+
});
|
|
8
|
+
return ref.current;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
usePrevious
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=use-previous.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/use-previous.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nexport function usePrevious<T>(value: T): T | undefined {\n const ref = useRef<T | undefined>(undefined);\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n"],"mappings":";AAAA,SAAS,WAAW,cAAc;AAE3B,SAAS,YAAe,OAAyB;AACtD,QAAM,MAAM,OAAsB,MAAS;AAC3C,YAAU,MAAM;AACd,QAAI,UAAU;AAAA,EAChB,CAAC;AACD,SAAO,IAAI;AACb;","names":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/native/analytics.ts
|
|
21
|
+
var analytics_exports = {};
|
|
22
|
+
__export(analytics_exports, {
|
|
23
|
+
useScreenViewAnalytics: () => useScreenViewAnalytics
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(analytics_exports);
|
|
26
|
+
var import_expo_router = require("expo-router");
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
var import_react_native = require("react-native");
|
|
29
|
+
var import_use_previous = require("../hooks/use-previous.cjs");
|
|
30
|
+
var import_track = require("../track/index.cjs");
|
|
31
|
+
function useScreenViewAnalytics() {
|
|
32
|
+
const pathname = (0, import_expo_router.usePathname)();
|
|
33
|
+
const prevPathname = (0, import_use_previous.usePrevious)(pathname);
|
|
34
|
+
const session = (0, import_react.useRef)({ start: performance.now(), total: 0, isActive: true });
|
|
35
|
+
(0, import_react.useEffect)(() => {
|
|
36
|
+
const subscription = import_react_native.AppState.addEventListener("change", (state) => {
|
|
37
|
+
if (state === "active" && !session.current.isActive) {
|
|
38
|
+
session.current.start = performance.now();
|
|
39
|
+
session.current.isActive = true;
|
|
40
|
+
} else if (state !== "active" && session.current.isActive) {
|
|
41
|
+
session.current.total += (performance.now() - session.current.start) / 1e3;
|
|
42
|
+
session.current.isActive = false;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return () => subscription.remove();
|
|
46
|
+
}, []);
|
|
47
|
+
(0, import_react.useEffect)(() => {
|
|
48
|
+
if (!prevPathname) {
|
|
49
|
+
session.current = { start: performance.now(), total: 0, isActive: true };
|
|
50
|
+
}
|
|
51
|
+
let duration = session.current.total;
|
|
52
|
+
if (session.current.isActive) {
|
|
53
|
+
duration += (performance.now() - session.current.start) / 1e3;
|
|
54
|
+
}
|
|
55
|
+
(0, import_track.track)("screen_view", {
|
|
56
|
+
screen_name: pathname,
|
|
57
|
+
screen_class: pathname,
|
|
58
|
+
previous_screen: prevPathname ?? void 0,
|
|
59
|
+
previous_screen_duration: prevPathname ? Number(duration.toFixed(2)) : void 0
|
|
60
|
+
});
|
|
61
|
+
session.current = { start: performance.now(), total: 0, isActive: true };
|
|
62
|
+
}, [pathname]);
|
|
63
|
+
}
|
|
64
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
+
0 && (module.exports = {
|
|
66
|
+
useScreenViewAnalytics
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=analytics.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/native/analytics.ts"],"sourcesContent":["import { usePathname } from 'expo-router';\nimport { useEffect, useRef } from 'react';\nimport { AppState } from 'react-native';\nimport { usePrevious } from '../hooks/use-previous';\nimport { track } from '../track/index';\n\nexport function useScreenViewAnalytics() {\n const pathname = usePathname();\n const prevPathname = usePrevious(pathname);\n const session = useRef({ start: performance.now(), total: 0, isActive: true });\n\n useEffect(() => {\n const subscription = AppState.addEventListener('change', (state) => {\n // when returning to the foreground from the background\n if (state === 'active' && !session.current.isActive) {\n session.current.start = performance.now();\n session.current.isActive = true;\n }\n // when entering the background\n else if (state !== 'active' && session.current.isActive) {\n session.current.total += (performance.now() - session.current.start) / 1000;\n session.current.isActive = false;\n }\n });\n\n return () => subscription.remove();\n }, []);\n\n // when the screen is switched, the duration of the previous screen is recorded\n useEffect(() => {\n if (!prevPathname) {\n session.current = { start: performance.now(), total: 0, isActive: true };\n }\n\n let duration = session.current.total;\n if (session.current.isActive) {\n duration += (performance.now() - session.current.start) / 1000;\n }\n\n track('screen_view', {\n screen_name: pathname,\n screen_class: pathname,\n previous_screen: prevPathname ?? undefined,\n previous_screen_duration: prevPathname ? Number(duration.toFixed(2)) : undefined,\n });\n\n // reset session\n session.current = { start: performance.now(), total: 0, isActive: true };\n }, [pathname]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAC5B,mBAAkC;AAClC,0BAAyB;AACzB,0BAA4B;AAC5B,mBAAsB;AAEf,SAAS,yBAAyB;AACvC,QAAM,eAAW,gCAAY;AAC7B,QAAM,mBAAe,iCAAY,QAAQ;AACzC,QAAM,cAAU,qBAAO,EAAE,OAAO,YAAY,IAAI,GAAG,OAAO,GAAG,UAAU,KAAK,CAAC;AAE7E,8BAAU,MAAM;AACd,UAAM,eAAe,6BAAS,iBAAiB,UAAU,CAAC,UAAU;AAElE,UAAI,UAAU,YAAY,CAAC,QAAQ,QAAQ,UAAU;AACnD,gBAAQ,QAAQ,QAAQ,YAAY,IAAI;AACxC,gBAAQ,QAAQ,WAAW;AAAA,MAC7B,WAES,UAAU,YAAY,QAAQ,QAAQ,UAAU;AACvD,gBAAQ,QAAQ,UAAU,YAAY,IAAI,IAAI,QAAQ,QAAQ,SAAS;AACvE,gBAAQ,QAAQ,WAAW;AAAA,MAC7B;AAAA,IACF,CAAC;AAED,WAAO,MAAM,aAAa,OAAO;AAAA,EACnC,GAAG,CAAC,CAAC;AAGL,8BAAU,MAAM;AACd,QAAI,CAAC,cAAc;AACjB,cAAQ,UAAU,EAAE,OAAO,YAAY,IAAI,GAAG,OAAO,GAAG,UAAU,KAAK;AAAA,IACzE;AAEA,QAAI,WAAW,QAAQ,QAAQ;AAC/B,QAAI,QAAQ,QAAQ,UAAU;AAC5B,mBAAa,YAAY,IAAI,IAAI,QAAQ,QAAQ,SAAS;AAAA,IAC5D;AAEA,4BAAM,eAAe;AAAA,MACnB,aAAa;AAAA,MACb,cAAc;AAAA,MACd,iBAAiB,gBAAgB;AAAA,MACjC,0BAA0B,eAAe,OAAO,SAAS,QAAQ,CAAC,CAAC,IAAI;AAAA,IACzE,CAAC;AAGD,YAAQ,UAAU,EAAE,OAAO,YAAY,IAAI,GAAG,OAAO,GAAG,UAAU,KAAK;AAAA,EACzE,GAAG,CAAC,QAAQ,CAAC;AACf;","names":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// src/native/analytics.ts
|
|
2
|
+
import { usePathname } from "expo-router";
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
import { AppState } from "react-native";
|
|
5
|
+
import { usePrevious } from "../hooks/use-previous.mjs";
|
|
6
|
+
import { track } from "../track/index.mjs";
|
|
7
|
+
function useScreenViewAnalytics() {
|
|
8
|
+
const pathname = usePathname();
|
|
9
|
+
const prevPathname = usePrevious(pathname);
|
|
10
|
+
const session = useRef({ start: performance.now(), total: 0, isActive: true });
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const subscription = AppState.addEventListener("change", (state) => {
|
|
13
|
+
if (state === "active" && !session.current.isActive) {
|
|
14
|
+
session.current.start = performance.now();
|
|
15
|
+
session.current.isActive = true;
|
|
16
|
+
} else if (state !== "active" && session.current.isActive) {
|
|
17
|
+
session.current.total += (performance.now() - session.current.start) / 1e3;
|
|
18
|
+
session.current.isActive = false;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return () => subscription.remove();
|
|
22
|
+
}, []);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (!prevPathname) {
|
|
25
|
+
session.current = { start: performance.now(), total: 0, isActive: true };
|
|
26
|
+
}
|
|
27
|
+
let duration = session.current.total;
|
|
28
|
+
if (session.current.isActive) {
|
|
29
|
+
duration += (performance.now() - session.current.start) / 1e3;
|
|
30
|
+
}
|
|
31
|
+
track("screen_view", {
|
|
32
|
+
screen_name: pathname,
|
|
33
|
+
screen_class: pathname,
|
|
34
|
+
previous_screen: prevPathname ?? void 0,
|
|
35
|
+
previous_screen_duration: prevPathname ? Number(duration.toFixed(2)) : void 0
|
|
36
|
+
});
|
|
37
|
+
session.current = { start: performance.now(), total: 0, isActive: true };
|
|
38
|
+
}, [pathname]);
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
useScreenViewAnalytics
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=analytics.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/native/analytics.ts"],"sourcesContent":["import { usePathname } from 'expo-router';\nimport { useEffect, useRef } from 'react';\nimport { AppState } from 'react-native';\nimport { usePrevious } from '../hooks/use-previous';\nimport { track } from '../track/index';\n\nexport function useScreenViewAnalytics() {\n const pathname = usePathname();\n const prevPathname = usePrevious(pathname);\n const session = useRef({ start: performance.now(), total: 0, isActive: true });\n\n useEffect(() => {\n const subscription = AppState.addEventListener('change', (state) => {\n // when returning to the foreground from the background\n if (state === 'active' && !session.current.isActive) {\n session.current.start = performance.now();\n session.current.isActive = true;\n }\n // when entering the background\n else if (state !== 'active' && session.current.isActive) {\n session.current.total += (performance.now() - session.current.start) / 1000;\n session.current.isActive = false;\n }\n });\n\n return () => subscription.remove();\n }, []);\n\n // when the screen is switched, the duration of the previous screen is recorded\n useEffect(() => {\n if (!prevPathname) {\n session.current = { start: performance.now(), total: 0, isActive: true };\n }\n\n let duration = session.current.total;\n if (session.current.isActive) {\n duration += (performance.now() - session.current.start) / 1000;\n }\n\n track('screen_view', {\n screen_name: pathname,\n screen_class: pathname,\n previous_screen: prevPathname ?? undefined,\n previous_screen_duration: prevPathname ? Number(duration.toFixed(2)) : undefined,\n });\n\n // reset session\n session.current = { start: performance.now(), total: 0, isActive: true };\n }, [pathname]);\n}\n"],"mappings":";AAAA,SAAS,mBAAmB;AAC5B,SAAS,WAAW,cAAc;AAClC,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,aAAa;AAEf,SAAS,yBAAyB;AACvC,QAAM,WAAW,YAAY;AAC7B,QAAM,eAAe,YAAY,QAAQ;AACzC,QAAM,UAAU,OAAO,EAAE,OAAO,YAAY,IAAI,GAAG,OAAO,GAAG,UAAU,KAAK,CAAC;AAE7E,YAAU,MAAM;AACd,UAAM,eAAe,SAAS,iBAAiB,UAAU,CAAC,UAAU;AAElE,UAAI,UAAU,YAAY,CAAC,QAAQ,QAAQ,UAAU;AACnD,gBAAQ,QAAQ,QAAQ,YAAY,IAAI;AACxC,gBAAQ,QAAQ,WAAW;AAAA,MAC7B,WAES,UAAU,YAAY,QAAQ,QAAQ,UAAU;AACvD,gBAAQ,QAAQ,UAAU,YAAY,IAAI,IAAI,QAAQ,QAAQ,SAAS;AACvE,gBAAQ,QAAQ,WAAW;AAAA,MAC7B;AAAA,IACF,CAAC;AAED,WAAO,MAAM,aAAa,OAAO;AAAA,EACnC,GAAG,CAAC,CAAC;AAGL,YAAU,MAAM;AACd,QAAI,CAAC,cAAc;AACjB,cAAQ,UAAU,EAAE,OAAO,YAAY,IAAI,GAAG,OAAO,GAAG,UAAU,KAAK;AAAA,IACzE;AAEA,QAAI,WAAW,QAAQ,QAAQ;AAC/B,QAAI,QAAQ,QAAQ,UAAU;AAC5B,mBAAa,YAAY,IAAI,IAAI,QAAQ,QAAQ,SAAS;AAAA,IAC5D;AAEA,UAAM,eAAe;AAAA,MACnB,aAAa;AAAA,MACb,cAAc;AAAA,MACd,iBAAiB,gBAAgB;AAAA,MACjC,0BAA0B,eAAe,OAAO,SAAS,QAAQ,CAAC,CAAC,IAAI;AAAA,IACzE,CAAC;AAGD,YAAQ,UAAU,EAAE,OAAO,YAAY,IAAI,GAAG,OAAO,GAAG,UAAU,KAAK;AAAA,EACzE,GAAG,CAAC,QAAQ,CAAC;AACf;","names":[]}
|
package/dist/native/index.cjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,113 +15,26 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
|
|
30
20
|
// src/native/index.ts
|
|
31
21
|
var native_exports = {};
|
|
32
22
|
__export(native_exports, {
|
|
33
|
-
getDeviceId: () => getDeviceId,
|
|
34
|
-
getDeviceType: () => getDeviceType,
|
|
35
|
-
getTags: () => getTags,
|
|
36
|
-
storage: () => storage
|
|
23
|
+
getDeviceId: () => import_setup.getDeviceId,
|
|
24
|
+
getDeviceType: () => import_setup.getDeviceType,
|
|
25
|
+
getTags: () => import_setup.getTags,
|
|
26
|
+
storage: () => import_setup.storage,
|
|
27
|
+
useScreenViewAnalytics: () => import_analytics.useScreenViewAnalytics
|
|
37
28
|
});
|
|
38
29
|
module.exports = __toCommonJS(native_exports);
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var import_expo_crypto = require("expo-crypto");
|
|
42
|
-
var import_expo_device = require("expo-device");
|
|
43
|
-
var import_expo_localization = require("expo-localization");
|
|
44
|
-
var import_expo_tracking_transparency = require("expo-tracking-transparency");
|
|
45
|
-
var import_react_native = require("react-native");
|
|
46
|
-
var import_react_native_url_polyfill = require("react-native-url-polyfill");
|
|
47
|
-
var storage = {
|
|
48
|
-
getItem: (key) => import_async_storage.default.getItem(key),
|
|
49
|
-
setItem: (key, value) => import_async_storage.default.setItem(key, value)
|
|
50
|
-
};
|
|
51
|
-
async function getDeviceId() {
|
|
52
|
-
let deviceId = null;
|
|
53
|
-
if (import_react_native.Platform.OS === "ios") {
|
|
54
|
-
deviceId = await (0, import_expo_application.getIosIdForVendorAsync)();
|
|
55
|
-
} else if (import_react_native.Platform.OS === "android") {
|
|
56
|
-
deviceId = (0, import_expo_application.getAndroidId)();
|
|
57
|
-
}
|
|
58
|
-
if (!deviceId) {
|
|
59
|
-
deviceId = await import_async_storage.default.getItem("device_id");
|
|
60
|
-
if (!deviceId) {
|
|
61
|
-
deviceId = (0, import_expo_crypto.randomUUID)();
|
|
62
|
-
await import_async_storage.default.setItem("device_id", deviceId);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return deviceId;
|
|
66
|
-
}
|
|
67
|
-
function getDeviceType() {
|
|
68
|
-
switch (import_expo_device.deviceType) {
|
|
69
|
-
case import_expo_device.DeviceType.PHONE:
|
|
70
|
-
return "mobile";
|
|
71
|
-
case import_expo_device.DeviceType.TABLET:
|
|
72
|
-
return "tablet";
|
|
73
|
-
case import_expo_device.DeviceType.DESKTOP:
|
|
74
|
-
return "desktop";
|
|
75
|
-
case import_expo_device.DeviceType.TV:
|
|
76
|
-
return "smarttv";
|
|
77
|
-
default:
|
|
78
|
-
return void 0;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
async function getTags(release) {
|
|
82
|
-
var _a, _b, _c, _d;
|
|
83
|
-
const screen = import_react_native.Dimensions.get("screen");
|
|
84
|
-
const screen_width = Math.floor(screen.width);
|
|
85
|
-
const screen_height = Math.floor(screen.height);
|
|
86
|
-
const install_referrer = import_react_native.Platform.OS === "android" ? await (0, import_expo_application.getInstallReferrerAsync)() : void 0;
|
|
87
|
-
const params = new import_react_native_url_polyfill.URLSearchParams(install_referrer);
|
|
88
|
-
return {
|
|
89
|
-
os: `${import_expo_device.osName} ${import_expo_device.osVersion}`,
|
|
90
|
-
os_name: import_expo_device.osName ?? void 0,
|
|
91
|
-
os_version: import_expo_device.osVersion ?? void 0,
|
|
92
|
-
platform: import_react_native.Platform.OS,
|
|
93
|
-
device: import_expo_device.modelName ?? void 0,
|
|
94
|
-
device_id: await getDeviceId(),
|
|
95
|
-
device_type: getDeviceType(),
|
|
96
|
-
device_vendor: import_expo_device.manufacturer ?? void 0,
|
|
97
|
-
device_model_id: import_expo_device.modelId ?? void 0,
|
|
98
|
-
device_pixel_ratio: `${import_react_native.PixelRatio.get()}`,
|
|
99
|
-
screen_width,
|
|
100
|
-
screen_height,
|
|
101
|
-
screen_resolution: `${screen_width}x${screen_height}`,
|
|
102
|
-
release,
|
|
103
|
-
language: ((_b = (_a = (0, import_expo_localization.getLocales)()) == null ? void 0 : _a[0]) == null ? void 0 : _b.languageTag) ?? "en",
|
|
104
|
-
time_zone: ((_d = (_c = (0, import_expo_localization.getCalendars)()) == null ? void 0 : _c[0]) == null ? void 0 : _d.timeZone) ?? "UTC",
|
|
105
|
-
environment: __DEV__ ? "development" : "production",
|
|
106
|
-
source: "app",
|
|
107
|
-
// ads
|
|
108
|
-
advertising_id: (0, import_expo_tracking_transparency.getAdvertisingId)() ?? void 0,
|
|
109
|
-
install_referrer,
|
|
110
|
-
// utm params
|
|
111
|
-
utm_source: params.get("utm_source") ?? void 0,
|
|
112
|
-
utm_medium: params.get("utm_medium") ?? void 0,
|
|
113
|
-
utm_campaign: params.get("utm_campaign") ?? void 0,
|
|
114
|
-
utm_term: params.get("utm_term") ?? void 0,
|
|
115
|
-
utm_content: params.get("utm_content") ?? void 0,
|
|
116
|
-
utm_id: params.get("utm_id") ?? void 0,
|
|
117
|
-
utm_source_platform: params.get("utm_source_platform") ?? void 0,
|
|
118
|
-
utm_creative_format: params.get("utm_creative_format") ?? void 0,
|
|
119
|
-
utm_marketing_tactic: params.get("utm_marketing_tactic") ?? void 0
|
|
120
|
-
};
|
|
121
|
-
}
|
|
30
|
+
var import_setup = require("./setup.cjs");
|
|
31
|
+
var import_analytics = require("./analytics.cjs");
|
|
122
32
|
// Annotate the CommonJS export names for ESM import in node:
|
|
123
33
|
0 && (module.exports = {
|
|
124
34
|
getDeviceId,
|
|
125
35
|
getDeviceType,
|
|
126
36
|
getTags,
|
|
127
|
-
storage
|
|
37
|
+
storage,
|
|
38
|
+
useScreenViewAnalytics
|
|
128
39
|
});
|
|
129
40
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/native/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/native/index.ts"],"sourcesContent":["export { getDeviceId, getDeviceType, getTags, storage } from './setup';\nexport { useScreenViewAnalytics } from './analytics';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA6D;AAC7D,uBAAuC;","names":[]}
|
package/dist/native/index.d.cts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export { getDeviceId, getDeviceType, getTags, storage } from './setup.cjs';
|
|
2
|
+
export { useScreenViewAnalytics } from './analytics.cjs';
|
|
3
|
+
import '../setup/index.cjs';
|
|
3
4
|
import 'axios';
|
|
4
|
-
import '../
|
|
5
|
+
import '../track/types.cjs';
|
|
5
6
|
import '../track/gtag.cjs';
|
|
6
|
-
|
|
7
|
-
declare const storage: Storage;
|
|
8
|
-
declare function getDeviceId(): Promise<string>;
|
|
9
|
-
declare function getDeviceType(): string | undefined;
|
|
10
|
-
declare function getTags(release: string): Promise<TrackTags>;
|
|
11
|
-
|
|
12
|
-
export { getDeviceId, getDeviceType, getTags, storage };
|
|
7
|
+
import '../visitor/types.cjs';
|
package/dist/native/index.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export { getDeviceId, getDeviceType, getTags, storage } from './setup.js';
|
|
2
|
+
export { useScreenViewAnalytics } from './analytics.js';
|
|
3
|
+
import '../setup/index.js';
|
|
3
4
|
import 'axios';
|
|
4
|
-
import '../
|
|
5
|
+
import '../track/types.js';
|
|
5
6
|
import '../track/gtag.js';
|
|
6
|
-
|
|
7
|
-
declare const storage: Storage;
|
|
8
|
-
declare function getDeviceId(): Promise<string>;
|
|
9
|
-
declare function getDeviceType(): string | undefined;
|
|
10
|
-
declare function getTags(release: string): Promise<TrackTags>;
|
|
11
|
-
|
|
12
|
-
export { getDeviceId, getDeviceType, getTags, storage };
|
|
7
|
+
import '../visitor/types.js';
|
package/dist/native/index.mjs
CHANGED
|
@@ -1,99 +1,11 @@
|
|
|
1
1
|
// src/native/index.ts
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { randomUUID } from "expo-crypto";
|
|
5
|
-
import {
|
|
6
|
-
DeviceType,
|
|
7
|
-
deviceType,
|
|
8
|
-
manufacturer,
|
|
9
|
-
modelId,
|
|
10
|
-
modelName,
|
|
11
|
-
osName,
|
|
12
|
-
osVersion
|
|
13
|
-
} from "expo-device";
|
|
14
|
-
import { getCalendars, getLocales } from "expo-localization";
|
|
15
|
-
import { getAdvertisingId } from "expo-tracking-transparency";
|
|
16
|
-
import { Dimensions, PixelRatio, Platform } from "react-native";
|
|
17
|
-
import { URLSearchParams } from "react-native-url-polyfill";
|
|
18
|
-
var storage = {
|
|
19
|
-
getItem: (key) => AsyncStorage.getItem(key),
|
|
20
|
-
setItem: (key, value) => AsyncStorage.setItem(key, value)
|
|
21
|
-
};
|
|
22
|
-
async function getDeviceId() {
|
|
23
|
-
let deviceId = null;
|
|
24
|
-
if (Platform.OS === "ios") {
|
|
25
|
-
deviceId = await getIosIdForVendorAsync();
|
|
26
|
-
} else if (Platform.OS === "android") {
|
|
27
|
-
deviceId = getAndroidId();
|
|
28
|
-
}
|
|
29
|
-
if (!deviceId) {
|
|
30
|
-
deviceId = await AsyncStorage.getItem("device_id");
|
|
31
|
-
if (!deviceId) {
|
|
32
|
-
deviceId = randomUUID();
|
|
33
|
-
await AsyncStorage.setItem("device_id", deviceId);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return deviceId;
|
|
37
|
-
}
|
|
38
|
-
function getDeviceType() {
|
|
39
|
-
switch (deviceType) {
|
|
40
|
-
case DeviceType.PHONE:
|
|
41
|
-
return "mobile";
|
|
42
|
-
case DeviceType.TABLET:
|
|
43
|
-
return "tablet";
|
|
44
|
-
case DeviceType.DESKTOP:
|
|
45
|
-
return "desktop";
|
|
46
|
-
case DeviceType.TV:
|
|
47
|
-
return "smarttv";
|
|
48
|
-
default:
|
|
49
|
-
return void 0;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
async function getTags(release) {
|
|
53
|
-
var _a, _b, _c, _d;
|
|
54
|
-
const screen = Dimensions.get("screen");
|
|
55
|
-
const screen_width = Math.floor(screen.width);
|
|
56
|
-
const screen_height = Math.floor(screen.height);
|
|
57
|
-
const install_referrer = Platform.OS === "android" ? await getInstallReferrerAsync() : void 0;
|
|
58
|
-
const params = new URLSearchParams(install_referrer);
|
|
59
|
-
return {
|
|
60
|
-
os: `${osName} ${osVersion}`,
|
|
61
|
-
os_name: osName ?? void 0,
|
|
62
|
-
os_version: osVersion ?? void 0,
|
|
63
|
-
platform: Platform.OS,
|
|
64
|
-
device: modelName ?? void 0,
|
|
65
|
-
device_id: await getDeviceId(),
|
|
66
|
-
device_type: getDeviceType(),
|
|
67
|
-
device_vendor: manufacturer ?? void 0,
|
|
68
|
-
device_model_id: modelId ?? void 0,
|
|
69
|
-
device_pixel_ratio: `${PixelRatio.get()}`,
|
|
70
|
-
screen_width,
|
|
71
|
-
screen_height,
|
|
72
|
-
screen_resolution: `${screen_width}x${screen_height}`,
|
|
73
|
-
release,
|
|
74
|
-
language: ((_b = (_a = getLocales()) == null ? void 0 : _a[0]) == null ? void 0 : _b.languageTag) ?? "en",
|
|
75
|
-
time_zone: ((_d = (_c = getCalendars()) == null ? void 0 : _c[0]) == null ? void 0 : _d.timeZone) ?? "UTC",
|
|
76
|
-
environment: __DEV__ ? "development" : "production",
|
|
77
|
-
source: "app",
|
|
78
|
-
// ads
|
|
79
|
-
advertising_id: getAdvertisingId() ?? void 0,
|
|
80
|
-
install_referrer,
|
|
81
|
-
// utm params
|
|
82
|
-
utm_source: params.get("utm_source") ?? void 0,
|
|
83
|
-
utm_medium: params.get("utm_medium") ?? void 0,
|
|
84
|
-
utm_campaign: params.get("utm_campaign") ?? void 0,
|
|
85
|
-
utm_term: params.get("utm_term") ?? void 0,
|
|
86
|
-
utm_content: params.get("utm_content") ?? void 0,
|
|
87
|
-
utm_id: params.get("utm_id") ?? void 0,
|
|
88
|
-
utm_source_platform: params.get("utm_source_platform") ?? void 0,
|
|
89
|
-
utm_creative_format: params.get("utm_creative_format") ?? void 0,
|
|
90
|
-
utm_marketing_tactic: params.get("utm_marketing_tactic") ?? void 0
|
|
91
|
-
};
|
|
92
|
-
}
|
|
2
|
+
import { getDeviceId, getDeviceType, getTags, storage } from "./setup.mjs";
|
|
3
|
+
import { useScreenViewAnalytics } from "./analytics.mjs";
|
|
93
4
|
export {
|
|
94
5
|
getDeviceId,
|
|
95
6
|
getDeviceType,
|
|
96
7
|
getTags,
|
|
97
|
-
storage
|
|
8
|
+
storage,
|
|
9
|
+
useScreenViewAnalytics
|
|
98
10
|
};
|
|
99
11
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/native/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/native/index.ts"],"sourcesContent":["export { getDeviceId, getDeviceType, getTags, storage } from './setup';\nexport { useScreenViewAnalytics } from './analytics';\n"],"mappings":";AAAA,SAAS,aAAa,eAAe,SAAS,eAAe;AAC7D,SAAS,8BAA8B;","names":[]}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/native/setup.ts
|
|
21
|
+
var setup_exports = {};
|
|
22
|
+
__export(setup_exports, {
|
|
23
|
+
getDeviceId: () => getDeviceId,
|
|
24
|
+
getDeviceType: () => getDeviceType,
|
|
25
|
+
getTags: () => getTags,
|
|
26
|
+
storage: () => storage
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(setup_exports);
|
|
29
|
+
var import_install = require("expo-sqlite/localStorage/install");
|
|
30
|
+
var import_expo_application = require("expo-application");
|
|
31
|
+
var import_expo_crypto = require("expo-crypto");
|
|
32
|
+
var import_expo_device = require("expo-device");
|
|
33
|
+
var import_expo_localization = require("expo-localization");
|
|
34
|
+
var import_expo_tracking_transparency = require("expo-tracking-transparency");
|
|
35
|
+
var import_react_native = require("react-native");
|
|
36
|
+
var import_react_native_url_polyfill = require("react-native-url-polyfill");
|
|
37
|
+
var map = /* @__PURE__ */ new Map();
|
|
38
|
+
var storage = {
|
|
39
|
+
getItem: (key) => {
|
|
40
|
+
try {
|
|
41
|
+
return localStorage.getItem(key);
|
|
42
|
+
} catch {
|
|
43
|
+
console.error("localStorage is not available");
|
|
44
|
+
return map.get(key) ?? null;
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
setItem: (key, value) => {
|
|
48
|
+
try {
|
|
49
|
+
localStorage.setItem(key, value);
|
|
50
|
+
} catch {
|
|
51
|
+
console.error("localStorage is not available");
|
|
52
|
+
map.set(key, value);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
async function getDeviceId() {
|
|
57
|
+
let deviceId = null;
|
|
58
|
+
if (import_react_native.Platform.OS === "ios") {
|
|
59
|
+
deviceId = await (0, import_expo_application.getIosIdForVendorAsync)();
|
|
60
|
+
} else if (import_react_native.Platform.OS === "android") {
|
|
61
|
+
deviceId = (0, import_expo_application.getAndroidId)();
|
|
62
|
+
}
|
|
63
|
+
if (!deviceId) {
|
|
64
|
+
deviceId = localStorage.getItem("device_id");
|
|
65
|
+
if (!deviceId) {
|
|
66
|
+
deviceId = (0, import_expo_crypto.randomUUID)();
|
|
67
|
+
localStorage.setItem("device_id", deviceId);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return deviceId;
|
|
71
|
+
}
|
|
72
|
+
function getDeviceType() {
|
|
73
|
+
switch (import_expo_device.deviceType) {
|
|
74
|
+
case import_expo_device.DeviceType.PHONE:
|
|
75
|
+
return "mobile";
|
|
76
|
+
case import_expo_device.DeviceType.TABLET:
|
|
77
|
+
return "tablet";
|
|
78
|
+
case import_expo_device.DeviceType.DESKTOP:
|
|
79
|
+
return "desktop";
|
|
80
|
+
case import_expo_device.DeviceType.TV:
|
|
81
|
+
return "smarttv";
|
|
82
|
+
default:
|
|
83
|
+
return void 0;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
async function getTags(release) {
|
|
87
|
+
var _a, _b, _c, _d;
|
|
88
|
+
const screen = import_react_native.Dimensions.get("screen");
|
|
89
|
+
const screen_width = Math.floor(screen.width);
|
|
90
|
+
const screen_height = Math.floor(screen.height);
|
|
91
|
+
const install_referrer = import_react_native.Platform.OS === "android" ? await (0, import_expo_application.getInstallReferrerAsync)() : void 0;
|
|
92
|
+
const params = new import_react_native_url_polyfill.URLSearchParams(install_referrer);
|
|
93
|
+
return {
|
|
94
|
+
os: `${import_expo_device.osName} ${import_expo_device.osVersion}`,
|
|
95
|
+
os_name: import_expo_device.osName ?? void 0,
|
|
96
|
+
os_version: import_expo_device.osVersion ?? void 0,
|
|
97
|
+
platform: import_react_native.Platform.OS,
|
|
98
|
+
device: import_expo_device.modelName ?? void 0,
|
|
99
|
+
device_id: await getDeviceId(),
|
|
100
|
+
device_type: getDeviceType(),
|
|
101
|
+
device_vendor: import_expo_device.manufacturer ?? void 0,
|
|
102
|
+
device_model_id: import_expo_device.modelId ?? void 0,
|
|
103
|
+
device_pixel_ratio: `${import_react_native.PixelRatio.get()}`,
|
|
104
|
+
screen_width,
|
|
105
|
+
screen_height,
|
|
106
|
+
screen_resolution: `${screen_width}x${screen_height}`,
|
|
107
|
+
release,
|
|
108
|
+
language: ((_b = (_a = (0, import_expo_localization.getLocales)()) == null ? void 0 : _a[0]) == null ? void 0 : _b.languageTag) ?? "en",
|
|
109
|
+
time_zone: ((_d = (_c = (0, import_expo_localization.getCalendars)()) == null ? void 0 : _c[0]) == null ? void 0 : _d.timeZone) ?? "UTC",
|
|
110
|
+
environment: __DEV__ ? "development" : "production",
|
|
111
|
+
source: "app",
|
|
112
|
+
// ads
|
|
113
|
+
advertising_id: (0, import_expo_tracking_transparency.getAdvertisingId)() ?? void 0,
|
|
114
|
+
install_referrer,
|
|
115
|
+
// utm params
|
|
116
|
+
utm_source: params.get("utm_source") ?? void 0,
|
|
117
|
+
utm_medium: params.get("utm_medium") ?? void 0,
|
|
118
|
+
utm_campaign: params.get("utm_campaign") ?? void 0,
|
|
119
|
+
utm_term: params.get("utm_term") ?? void 0,
|
|
120
|
+
utm_content: params.get("utm_content") ?? void 0,
|
|
121
|
+
utm_id: params.get("utm_id") ?? void 0,
|
|
122
|
+
utm_source_platform: params.get("utm_source_platform") ?? void 0,
|
|
123
|
+
utm_creative_format: params.get("utm_creative_format") ?? void 0,
|
|
124
|
+
utm_marketing_tactic: params.get("utm_marketing_tactic") ?? void 0
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
128
|
+
0 && (module.exports = {
|
|
129
|
+
getDeviceId,
|
|
130
|
+
getDeviceType,
|
|
131
|
+
getTags,
|
|
132
|
+
storage
|
|
133
|
+
});
|
|
134
|
+
//# sourceMappingURL=setup.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/native/setup.ts"],"sourcesContent":["import 'expo-sqlite/localStorage/install';\nimport { getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync } from 'expo-application';\nimport { randomUUID } from 'expo-crypto';\nimport {\n DeviceType,\n deviceType,\n manufacturer,\n modelId,\n modelName,\n osName,\n osVersion,\n} from 'expo-device';\nimport { getCalendars, getLocales } from 'expo-localization';\nimport { getAdvertisingId } from 'expo-tracking-transparency';\nimport { Dimensions, PixelRatio, Platform } from 'react-native';\nimport { URLSearchParams } from 'react-native-url-polyfill';\nimport type { Storage } from '../setup/index';\nimport type { TrackTags } from '../track/types';\n\nconst map = new Map<string, string>();\n\nexport const storage: Storage = {\n getItem: (key) => {\n try {\n return localStorage.getItem(key);\n } catch {\n console.error('localStorage is not available');\n return map.get(key) ?? null;\n }\n },\n setItem: (key, value) => {\n try {\n localStorage.setItem(key, value);\n } catch {\n console.error('localStorage is not available');\n map.set(key, value);\n }\n },\n};\n\nexport async function getDeviceId(): Promise<string> {\n let deviceId: string | null = null;\n if (Platform.OS === 'ios') {\n deviceId = await getIosIdForVendorAsync();\n } else if (Platform.OS === 'android') {\n deviceId = getAndroidId();\n }\n if (!deviceId) {\n deviceId = localStorage.getItem('device_id');\n if (!deviceId) {\n deviceId = randomUUID();\n localStorage.setItem('device_id', deviceId);\n }\n }\n return deviceId;\n}\n\nexport function getDeviceType(): string | undefined {\n switch (deviceType) {\n case DeviceType.PHONE:\n return 'mobile';\n case DeviceType.TABLET:\n return 'tablet';\n case DeviceType.DESKTOP:\n return 'desktop';\n case DeviceType.TV:\n return 'smarttv';\n default:\n return undefined;\n }\n}\n\nexport async function getTags(release: string): Promise<TrackTags> {\n const screen = Dimensions.get('screen');\n const screen_width = Math.floor(screen.width);\n const screen_height = Math.floor(screen.height);\n\n const install_referrer = Platform.OS === 'android' ? await getInstallReferrerAsync() : undefined;\n const params = new URLSearchParams(install_referrer);\n\n return {\n os: `${osName} ${osVersion}`,\n os_name: osName ?? undefined,\n os_version: osVersion ?? undefined,\n platform: Platform.OS,\n device: modelName ?? undefined,\n device_id: await getDeviceId(),\n device_type: getDeviceType(),\n device_vendor: manufacturer ?? undefined,\n device_model_id: modelId ?? undefined,\n device_pixel_ratio: `${PixelRatio.get()}`,\n screen_width,\n screen_height,\n screen_resolution: `${screen_width}x${screen_height}`,\n release: release,\n language: getLocales()?.[0]?.languageTag ?? 'en',\n time_zone: getCalendars()?.[0]?.timeZone ?? 'UTC',\n environment: __DEV__ ? 'development' : 'production',\n source: 'app',\n // ads\n advertising_id: getAdvertisingId() ?? undefined,\n install_referrer,\n // utm params\n utm_source: params.get('utm_source') ?? undefined,\n utm_medium: params.get('utm_medium') ?? undefined,\n utm_campaign: params.get('utm_campaign') ?? undefined,\n utm_term: params.get('utm_term') ?? undefined,\n utm_content: params.get('utm_content') ?? undefined,\n utm_id: params.get('utm_id') ?? undefined,\n utm_source_platform: params.get('utm_source_platform') ?? undefined,\n utm_creative_format: params.get('utm_creative_format') ?? undefined,\n utm_marketing_tactic: params.get('utm_marketing_tactic') ?? undefined,\n };\n}\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Storage } from '../setup/index.cjs';
|
|
2
|
+
import { TrackTags } from '../track/types.cjs';
|
|
3
|
+
import 'axios';
|
|
4
|
+
import '../visitor/types.cjs';
|
|
5
|
+
import '../track/gtag.cjs';
|
|
6
|
+
|
|
7
|
+
declare const storage: Storage;
|
|
8
|
+
declare function getDeviceId(): Promise<string>;
|
|
9
|
+
declare function getDeviceType(): string | undefined;
|
|
10
|
+
declare function getTags(release: string): Promise<TrackTags>;
|
|
11
|
+
|
|
12
|
+
export { getDeviceId, getDeviceType, getTags, storage };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Storage } from '../setup/index.js';
|
|
2
|
+
import { TrackTags } from '../track/types.js';
|
|
3
|
+
import 'axios';
|
|
4
|
+
import '../visitor/types.js';
|
|
5
|
+
import '../track/gtag.js';
|
|
6
|
+
|
|
7
|
+
declare const storage: Storage;
|
|
8
|
+
declare function getDeviceId(): Promise<string>;
|
|
9
|
+
declare function getDeviceType(): string | undefined;
|
|
10
|
+
declare function getTags(release: string): Promise<TrackTags>;
|
|
11
|
+
|
|
12
|
+
export { getDeviceId, getDeviceType, getTags, storage };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// src/native/setup.ts
|
|
2
|
+
import "expo-sqlite/localStorage/install";
|
|
3
|
+
import { getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync } from "expo-application";
|
|
4
|
+
import { randomUUID } from "expo-crypto";
|
|
5
|
+
import {
|
|
6
|
+
DeviceType,
|
|
7
|
+
deviceType,
|
|
8
|
+
manufacturer,
|
|
9
|
+
modelId,
|
|
10
|
+
modelName,
|
|
11
|
+
osName,
|
|
12
|
+
osVersion
|
|
13
|
+
} from "expo-device";
|
|
14
|
+
import { getCalendars, getLocales } from "expo-localization";
|
|
15
|
+
import { getAdvertisingId } from "expo-tracking-transparency";
|
|
16
|
+
import { Dimensions, PixelRatio, Platform } from "react-native";
|
|
17
|
+
import { URLSearchParams } from "react-native-url-polyfill";
|
|
18
|
+
var map = /* @__PURE__ */ new Map();
|
|
19
|
+
var storage = {
|
|
20
|
+
getItem: (key) => {
|
|
21
|
+
try {
|
|
22
|
+
return localStorage.getItem(key);
|
|
23
|
+
} catch {
|
|
24
|
+
console.error("localStorage is not available");
|
|
25
|
+
return map.get(key) ?? null;
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
setItem: (key, value) => {
|
|
29
|
+
try {
|
|
30
|
+
localStorage.setItem(key, value);
|
|
31
|
+
} catch {
|
|
32
|
+
console.error("localStorage is not available");
|
|
33
|
+
map.set(key, value);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
async function getDeviceId() {
|
|
38
|
+
let deviceId = null;
|
|
39
|
+
if (Platform.OS === "ios") {
|
|
40
|
+
deviceId = await getIosIdForVendorAsync();
|
|
41
|
+
} else if (Platform.OS === "android") {
|
|
42
|
+
deviceId = getAndroidId();
|
|
43
|
+
}
|
|
44
|
+
if (!deviceId) {
|
|
45
|
+
deviceId = localStorage.getItem("device_id");
|
|
46
|
+
if (!deviceId) {
|
|
47
|
+
deviceId = randomUUID();
|
|
48
|
+
localStorage.setItem("device_id", deviceId);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return deviceId;
|
|
52
|
+
}
|
|
53
|
+
function getDeviceType() {
|
|
54
|
+
switch (deviceType) {
|
|
55
|
+
case DeviceType.PHONE:
|
|
56
|
+
return "mobile";
|
|
57
|
+
case DeviceType.TABLET:
|
|
58
|
+
return "tablet";
|
|
59
|
+
case DeviceType.DESKTOP:
|
|
60
|
+
return "desktop";
|
|
61
|
+
case DeviceType.TV:
|
|
62
|
+
return "smarttv";
|
|
63
|
+
default:
|
|
64
|
+
return void 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async function getTags(release) {
|
|
68
|
+
var _a, _b, _c, _d;
|
|
69
|
+
const screen = Dimensions.get("screen");
|
|
70
|
+
const screen_width = Math.floor(screen.width);
|
|
71
|
+
const screen_height = Math.floor(screen.height);
|
|
72
|
+
const install_referrer = Platform.OS === "android" ? await getInstallReferrerAsync() : void 0;
|
|
73
|
+
const params = new URLSearchParams(install_referrer);
|
|
74
|
+
return {
|
|
75
|
+
os: `${osName} ${osVersion}`,
|
|
76
|
+
os_name: osName ?? void 0,
|
|
77
|
+
os_version: osVersion ?? void 0,
|
|
78
|
+
platform: Platform.OS,
|
|
79
|
+
device: modelName ?? void 0,
|
|
80
|
+
device_id: await getDeviceId(),
|
|
81
|
+
device_type: getDeviceType(),
|
|
82
|
+
device_vendor: manufacturer ?? void 0,
|
|
83
|
+
device_model_id: modelId ?? void 0,
|
|
84
|
+
device_pixel_ratio: `${PixelRatio.get()}`,
|
|
85
|
+
screen_width,
|
|
86
|
+
screen_height,
|
|
87
|
+
screen_resolution: `${screen_width}x${screen_height}`,
|
|
88
|
+
release,
|
|
89
|
+
language: ((_b = (_a = getLocales()) == null ? void 0 : _a[0]) == null ? void 0 : _b.languageTag) ?? "en",
|
|
90
|
+
time_zone: ((_d = (_c = getCalendars()) == null ? void 0 : _c[0]) == null ? void 0 : _d.timeZone) ?? "UTC",
|
|
91
|
+
environment: __DEV__ ? "development" : "production",
|
|
92
|
+
source: "app",
|
|
93
|
+
// ads
|
|
94
|
+
advertising_id: getAdvertisingId() ?? void 0,
|
|
95
|
+
install_referrer,
|
|
96
|
+
// utm params
|
|
97
|
+
utm_source: params.get("utm_source") ?? void 0,
|
|
98
|
+
utm_medium: params.get("utm_medium") ?? void 0,
|
|
99
|
+
utm_campaign: params.get("utm_campaign") ?? void 0,
|
|
100
|
+
utm_term: params.get("utm_term") ?? void 0,
|
|
101
|
+
utm_content: params.get("utm_content") ?? void 0,
|
|
102
|
+
utm_id: params.get("utm_id") ?? void 0,
|
|
103
|
+
utm_source_platform: params.get("utm_source_platform") ?? void 0,
|
|
104
|
+
utm_creative_format: params.get("utm_creative_format") ?? void 0,
|
|
105
|
+
utm_marketing_tactic: params.get("utm_marketing_tactic") ?? void 0
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
export {
|
|
109
|
+
getDeviceId,
|
|
110
|
+
getDeviceType,
|
|
111
|
+
getTags,
|
|
112
|
+
storage
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=setup.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/native/setup.ts"],"sourcesContent":["import 'expo-sqlite/localStorage/install';\nimport { getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync } from 'expo-application';\nimport { randomUUID } from 'expo-crypto';\nimport {\n DeviceType,\n deviceType,\n manufacturer,\n modelId,\n modelName,\n osName,\n osVersion,\n} from 'expo-device';\nimport { getCalendars, getLocales } from 'expo-localization';\nimport { getAdvertisingId } from 'expo-tracking-transparency';\nimport { Dimensions, PixelRatio, Platform } from 'react-native';\nimport { URLSearchParams } from 'react-native-url-polyfill';\nimport type { Storage } from '../setup/index';\nimport type { TrackTags } from '../track/types';\n\nconst map = new Map<string, string>();\n\nexport const storage: Storage = {\n getItem: (key) => {\n try {\n return localStorage.getItem(key);\n } catch {\n console.error('localStorage is not available');\n return map.get(key) ?? null;\n }\n },\n setItem: (key, value) => {\n try {\n localStorage.setItem(key, value);\n } catch {\n console.error('localStorage is not available');\n map.set(key, value);\n }\n },\n};\n\nexport async function getDeviceId(): Promise<string> {\n let deviceId: string | null = null;\n if (Platform.OS === 'ios') {\n deviceId = await getIosIdForVendorAsync();\n } else if (Platform.OS === 'android') {\n deviceId = getAndroidId();\n }\n if (!deviceId) {\n deviceId = localStorage.getItem('device_id');\n if (!deviceId) {\n deviceId = randomUUID();\n localStorage.setItem('device_id', deviceId);\n }\n }\n return deviceId;\n}\n\nexport function getDeviceType(): string | undefined {\n switch (deviceType) {\n case DeviceType.PHONE:\n return 'mobile';\n case DeviceType.TABLET:\n return 'tablet';\n case DeviceType.DESKTOP:\n return 'desktop';\n case DeviceType.TV:\n return 'smarttv';\n default:\n return undefined;\n }\n}\n\nexport async function getTags(release: string): Promise<TrackTags> {\n const screen = Dimensions.get('screen');\n const screen_width = Math.floor(screen.width);\n const screen_height = Math.floor(screen.height);\n\n const install_referrer = Platform.OS === 'android' ? await getInstallReferrerAsync() : undefined;\n const params = new URLSearchParams(install_referrer);\n\n return {\n os: `${osName} ${osVersion}`,\n os_name: osName ?? undefined,\n os_version: osVersion ?? undefined,\n platform: Platform.OS,\n device: modelName ?? undefined,\n device_id: await getDeviceId(),\n device_type: getDeviceType(),\n device_vendor: manufacturer ?? undefined,\n device_model_id: modelId ?? undefined,\n device_pixel_ratio: `${PixelRatio.get()}`,\n screen_width,\n screen_height,\n screen_resolution: `${screen_width}x${screen_height}`,\n release: release,\n language: getLocales()?.[0]?.languageTag ?? 'en',\n time_zone: getCalendars()?.[0]?.timeZone ?? 'UTC',\n environment: __DEV__ ? 'development' : 'production',\n source: 'app',\n // ads\n advertising_id: getAdvertisingId() ?? undefined,\n install_referrer,\n // utm params\n utm_source: params.get('utm_source') ?? undefined,\n utm_medium: params.get('utm_medium') ?? undefined,\n utm_campaign: params.get('utm_campaign') ?? undefined,\n utm_term: params.get('utm_term') ?? undefined,\n utm_content: params.get('utm_content') ?? undefined,\n utm_id: params.get('utm_id') ?? undefined,\n utm_source_platform: params.get('utm_source_platform') ?? undefined,\n utm_creative_format: params.get('utm_creative_format') ?? undefined,\n utm_marketing_tactic: params.get('utm_marketing_tactic') ?? undefined,\n };\n}\n"],"mappings":"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","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shware/analytics",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
"@repo/typescript-config": "0.0.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@react-native-async-storage/async-storage": "^2.2.0",
|
|
79
78
|
"@react-native-firebase/analytics": "^23.3.1",
|
|
80
79
|
"expo-application": "7.0.7",
|
|
81
80
|
"expo-crypto": "^15.0.7",
|
|
82
81
|
"expo-device": "^8.0.7",
|
|
83
82
|
"expo-localization": "^17.0.7",
|
|
84
83
|
"expo-router": "^6.0.6",
|
|
84
|
+
"expo-sqlite": "^16.0.8",
|
|
85
85
|
"expo-tracking-transparency": "^6.0.7",
|
|
86
86
|
"facebook-nodejs-business-sdk": "^23",
|
|
87
87
|
"next": "^15",
|
|
@@ -92,9 +92,6 @@
|
|
|
92
92
|
"react-router": "^7"
|
|
93
93
|
},
|
|
94
94
|
"peerDependenciesMeta": {
|
|
95
|
-
"@react-native-async-storage/async-storage": {
|
|
96
|
-
"optional": true
|
|
97
|
-
},
|
|
98
95
|
"@react-native-firebase/analytics": {
|
|
99
96
|
"optional": true
|
|
100
97
|
},
|
|
@@ -113,6 +110,9 @@
|
|
|
113
110
|
"expo-router": {
|
|
114
111
|
"optional": true
|
|
115
112
|
},
|
|
113
|
+
"expo-sqlite": {
|
|
114
|
+
"optional": true
|
|
115
|
+
},
|
|
116
116
|
"expo-tracking-transparency": {
|
|
117
117
|
"optional": true
|
|
118
118
|
},
|