@shware/analytics 4.1.0 → 4.2.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/native/fingerprint.cjs +1 -1
- package/dist/native/fingerprint.mjs +1 -1
- package/dist/native/firebase.cjs +2 -2
- package/dist/native/firebase.cjs.map +1 -1
- package/dist/native/firebase.mjs +2 -2
- package/dist/native/firebase.mjs.map +1 -1
- package/dist/native/index.cjs +1 -1
- package/dist/native/index.mjs +1 -1
- package/dist/native/setup.cjs +1 -1
- package/dist/native/setup.mjs +1 -1
- package/dist/react-router/index.cjs +1 -1
- package/dist/react-router/index.mjs +1 -1
- package/dist/tanstack/analytics.cjs +1 -1
- package/dist/tanstack/analytics.mjs +1 -1
- package/package.json +10 -10
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let react_native = require("react-native");
|
|
2
3
|
let expo_application = require("expo-application");
|
|
3
4
|
let expo_clipboard = require("expo-clipboard");
|
|
4
5
|
let expo_device = require("expo-device");
|
|
5
6
|
let expo_localization = require("expo-localization");
|
|
6
|
-
let react_native = require("react-native");
|
|
7
7
|
//#region src/native/fingerprint.ts
|
|
8
8
|
/**
|
|
9
9
|
* reference: https://docs.swmansion.com/detour/docs/Architecture/matching
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { Dimensions, PixelRatio, Platform } from "react-native";
|
|
1
2
|
import { getInstallReferrerAsync } from "expo-application";
|
|
2
3
|
import { getStringAsync } from "expo-clipboard";
|
|
3
4
|
import { manufacturer, modelId, modelName, osName, osVersion, supportedCpuArchitectures } from "expo-device";
|
|
4
5
|
import { getCalendars, getLocales } from "expo-localization";
|
|
5
|
-
import { Dimensions, PixelRatio, Platform } from "react-native";
|
|
6
6
|
//#region src/native/fingerprint.ts
|
|
7
7
|
/**
|
|
8
8
|
* reference: https://docs.swmansion.com/detour/docs/Architecture/matching
|
package/dist/native/firebase.cjs
CHANGED
|
@@ -3,11 +3,11 @@ let _react_native_firebase_analytics = require("@react-native-firebase/analytics
|
|
|
3
3
|
//#region src/native/firebase.ts
|
|
4
4
|
const analytics = (0, _react_native_firebase_analytics.getAnalytics)();
|
|
5
5
|
async function sendFirebaseEvent(name, properties) {
|
|
6
|
-
if (name === "screen_view")
|
|
6
|
+
if (name === "screen_view") (0, _react_native_firebase_analytics.logEvent)(analytics, "screen_view", {
|
|
7
7
|
firebase_screen: properties?.screen_name,
|
|
8
8
|
firebase_screen_class: properties?.screen_class
|
|
9
9
|
});
|
|
10
|
-
else
|
|
10
|
+
else (0, _react_native_firebase_analytics.logEvent)(analytics, name, properties);
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
exports.sendFirebaseEvent = sendFirebaseEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firebase.cjs","names":[],"sources":["../../src/native/firebase.ts"],"sourcesContent":["import { getAnalytics, logEvent } from '@react-native-firebase/analytics';\nimport type { StandardEvents } from '../track/gtag';\nimport type { EventName, TrackName, TrackProperties } from '../track/types';\n\nconst analytics = getAnalytics();\n\nexport async function sendFirebaseEvent<T extends EventName>(\n name: TrackName<T>,\n properties?: TrackProperties<T>\n) {\n if (name === 'screen_view') {\n
|
|
1
|
+
{"version":3,"file":"firebase.cjs","names":[],"sources":["../../src/native/firebase.ts"],"sourcesContent":["import { getAnalytics, logEvent } from '@react-native-firebase/analytics';\nimport type { StandardEvents } from '../track/gtag';\nimport type { EventName, TrackName, TrackProperties } from '../track/types';\n\nconst analytics = getAnalytics();\n\nexport async function sendFirebaseEvent<T extends EventName>(\n name: TrackName<T>,\n properties?: TrackProperties<T>\n) {\n // @react-native-firebase/analytics 26 made the modular logEvent fire-and-forget (void).\n // sendFirebaseEvent stays async so callers that await it keep compiling.\n if (name === 'screen_view') {\n logEvent(analytics, 'screen_view', {\n firebase_screen: (properties as StandardEvents['screen_view'] | undefined)?.screen_name,\n firebase_screen_class: (properties as StandardEvents['screen_view'] | undefined)\n ?.screen_class,\n });\n } else {\n logEvent(analytics, name, properties);\n }\n}\n"],"mappings":";;;AAIA,MAAM,aAAA,GAAA,iCAAA,aAAA,CAAyB;AAE/B,eAAsB,kBACpB,MACA,YACA;CAGA,IAAI,SAAS,eACX,CAAA,GAAA,iCAAA,SAAA,CAAS,WAAW,eAAe;EACjC,iBAAkB,YAA0D;EAC5E,uBAAwB,YACpB;CACN,CAAC;MAED,CAAA,GAAA,iCAAA,SAAA,CAAS,WAAW,MAAM,UAAU;AAExC"}
|
package/dist/native/firebase.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import { getAnalytics, logEvent } from "@react-native-firebase/analytics";
|
|
|
2
2
|
//#region src/native/firebase.ts
|
|
3
3
|
const analytics = getAnalytics();
|
|
4
4
|
async function sendFirebaseEvent(name, properties) {
|
|
5
|
-
if (name === "screen_view")
|
|
5
|
+
if (name === "screen_view") logEvent(analytics, "screen_view", {
|
|
6
6
|
firebase_screen: properties?.screen_name,
|
|
7
7
|
firebase_screen_class: properties?.screen_class
|
|
8
8
|
});
|
|
9
|
-
else
|
|
9
|
+
else logEvent(analytics, name, properties);
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
12
|
export { sendFirebaseEvent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firebase.mjs","names":[],"sources":["../../src/native/firebase.ts"],"sourcesContent":["import { getAnalytics, logEvent } from '@react-native-firebase/analytics';\nimport type { StandardEvents } from '../track/gtag';\nimport type { EventName, TrackName, TrackProperties } from '../track/types';\n\nconst analytics = getAnalytics();\n\nexport async function sendFirebaseEvent<T extends EventName>(\n name: TrackName<T>,\n properties?: TrackProperties<T>\n) {\n if (name === 'screen_view') {\n
|
|
1
|
+
{"version":3,"file":"firebase.mjs","names":[],"sources":["../../src/native/firebase.ts"],"sourcesContent":["import { getAnalytics, logEvent } from '@react-native-firebase/analytics';\nimport type { StandardEvents } from '../track/gtag';\nimport type { EventName, TrackName, TrackProperties } from '../track/types';\n\nconst analytics = getAnalytics();\n\nexport async function sendFirebaseEvent<T extends EventName>(\n name: TrackName<T>,\n properties?: TrackProperties<T>\n) {\n // @react-native-firebase/analytics 26 made the modular logEvent fire-and-forget (void).\n // sendFirebaseEvent stays async so callers that await it keep compiling.\n if (name === 'screen_view') {\n logEvent(analytics, 'screen_view', {\n firebase_screen: (properties as StandardEvents['screen_view'] | undefined)?.screen_name,\n firebase_screen_class: (properties as StandardEvents['screen_view'] | undefined)\n ?.screen_class,\n });\n } else {\n logEvent(analytics, name, properties);\n }\n}\n"],"mappings":";;AAIA,MAAM,YAAY,aAAa;AAE/B,eAAsB,kBACpB,MACA,YACA;CAGA,IAAI,SAAS,eACX,SAAS,WAAW,eAAe;EACjC,iBAAkB,YAA0D;EAC5E,uBAAwB,YACpB;CACN,CAAC;MAED,SAAS,WAAW,MAAM,UAAU;AAExC"}
|
package/dist/native/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_hooks_use_app_analytics = require("../hooks/use-app-analytics.cjs");
|
|
2
3
|
const require_native_fingerprint = require("./fingerprint.cjs");
|
|
3
4
|
const require_native_setup = require("./setup.cjs");
|
|
4
|
-
const require_hooks_use_app_analytics = require("../hooks/use-app-analytics.cjs");
|
|
5
5
|
exports.getDeterministicFingerprint = require_native_fingerprint.getDeterministicFingerprint;
|
|
6
6
|
exports.getDeviceId = require_native_setup.getDeviceId;
|
|
7
7
|
exports.getDeviceType = require_native_setup.getDeviceType;
|
package/dist/native/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import { useAppAnalytics } from "../hooks/use-app-analytics.mjs";
|
|
1
2
|
import { getDeterministicFingerprint, getProbabilisticFingerprint } from "./fingerprint.mjs";
|
|
2
3
|
import { getDeviceId, getDeviceType, getTags, storage } from "./setup.mjs";
|
|
3
|
-
import { useAppAnalytics } from "../hooks/use-app-analytics.mjs";
|
|
4
4
|
export { getDeterministicFingerprint, getDeviceId, getDeviceType, getProbabilisticFingerprint, getTags, storage, useAppAnalytics };
|
package/dist/native/setup.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_setup_index = require("../setup/index.cjs");
|
|
3
|
+
let react_native = require("react-native");
|
|
3
4
|
let expo_application = require("expo-application");
|
|
4
5
|
let expo_device = require("expo-device");
|
|
5
6
|
let expo_localization = require("expo-localization");
|
|
6
|
-
let react_native = require("react-native");
|
|
7
7
|
require("expo-sqlite/localStorage/install");
|
|
8
8
|
let expo_crypto = require("expo-crypto");
|
|
9
9
|
let expo_tracking_transparency = require("expo-tracking-transparency");
|
package/dist/native/setup.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cache, config } from "../setup/index.mjs";
|
|
2
|
+
import { Dimensions, PixelRatio, Platform } from "react-native";
|
|
2
3
|
import { getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync } from "expo-application";
|
|
3
4
|
import { DeviceType, deviceType, manufacturer, modelId, modelName, osName, osVersion } from "expo-device";
|
|
4
5
|
import { getCalendars, getLocales } from "expo-localization";
|
|
5
|
-
import { Dimensions, PixelRatio, Platform } from "react-native";
|
|
6
6
|
import "expo-sqlite/localStorage/install";
|
|
7
7
|
import { randomUUID } from "expo-crypto";
|
|
8
8
|
import { getAdvertisingId } from "expo-tracking-transparency";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_track_index = require("../track/index.cjs");
|
|
3
3
|
const require_hooks_use_outbound_click_analytics = require("../hooks/use-outbound-click-analytics.cjs");
|
|
4
|
-
const require_hooks_use_web_analytics = require("../hooks/use-web-analytics.cjs");
|
|
5
4
|
const require_hooks_use_report_web_vitals = require("../hooks/use-report-web-vitals.cjs");
|
|
5
|
+
const require_hooks_use_web_analytics = require("../hooks/use-web-analytics.cjs");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
let react_router = require("react-router");
|
|
8
8
|
//#region src/react-router/index.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { track } from "../track/index.mjs";
|
|
2
2
|
import { useOutboundClickAnalytics } from "../hooks/use-outbound-click-analytics.mjs";
|
|
3
|
-
import { useWebAnalytics } from "../hooks/use-web-analytics.mjs";
|
|
4
3
|
import { useReportWebVitals } from "../hooks/use-report-web-vitals.mjs";
|
|
4
|
+
import { useWebAnalytics } from "../hooks/use-web-analytics.mjs";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useLocation } from "react-router";
|
|
7
7
|
//#region src/react-router/index.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_track_index = require("../track/index.cjs");
|
|
3
3
|
const require_hooks_use_outbound_click_analytics = require("../hooks/use-outbound-click-analytics.cjs");
|
|
4
|
-
const require_hooks_use_web_analytics = require("../hooks/use-web-analytics.cjs");
|
|
5
4
|
const require_hooks_use_report_web_vitals = require("../hooks/use-report-web-vitals.cjs");
|
|
5
|
+
const require_hooks_use_web_analytics = require("../hooks/use-web-analytics.cjs");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
let _tanstack_react_router = require("@tanstack/react-router");
|
|
8
8
|
//#region src/tanstack/analytics.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { track } from "../track/index.mjs";
|
|
2
2
|
import { useOutboundClickAnalytics } from "../hooks/use-outbound-click-analytics.mjs";
|
|
3
|
-
import { useWebAnalytics } from "../hooks/use-web-analytics.mjs";
|
|
4
3
|
import { useReportWebVitals } from "../hooks/use-report-web-vitals.mjs";
|
|
4
|
+
import { useWebAnalytics } from "../hooks/use-web-analytics.mjs";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useLocation } from "@tanstack/react-router";
|
|
7
7
|
//#region src/tanstack/analytics.tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shware/analytics",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -128,23 +128,23 @@
|
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"cookie": "^2.0.1",
|
|
130
130
|
"uuid": "^14.0.1",
|
|
131
|
-
"web-vitals": "^
|
|
131
|
+
"web-vitals": "^6.0.1",
|
|
132
132
|
"zod": "^4.4.3",
|
|
133
133
|
"@shware/utils": "^1.5.2"
|
|
134
134
|
},
|
|
135
135
|
"devDependencies": {
|
|
136
136
|
"@types/facebook-nodejs-business-sdk": "^24.0.0",
|
|
137
|
-
"@types/node": "^26.1.
|
|
138
|
-
"@types/react": "^19.2.
|
|
137
|
+
"@types/node": "^26.1.2",
|
|
138
|
+
"@types/react": "^19.2.18",
|
|
139
139
|
"bowser": "^2.14.1",
|
|
140
140
|
"typescript": "^7.0.2",
|
|
141
141
|
"vitest": "^4.1.10",
|
|
142
142
|
"@repo/typescript-config": "0.0.0"
|
|
143
143
|
},
|
|
144
144
|
"peerDependencies": {
|
|
145
|
-
"@react-native-firebase/analytics": "^
|
|
145
|
+
"@react-native-firebase/analytics": "^26.0.0",
|
|
146
146
|
"@tanstack/react-router": "^1.170.18",
|
|
147
|
-
"@tanstack/react-start": "^1.168.
|
|
147
|
+
"@tanstack/react-start": "^1.168.34",
|
|
148
148
|
"expo-application": "^57.0.2",
|
|
149
149
|
"expo-clipboard": "^57.0.1",
|
|
150
150
|
"expo-crypto": "^57.0.1",
|
|
@@ -153,13 +153,13 @@
|
|
|
153
153
|
"expo-sqlite": "^57.0.1",
|
|
154
154
|
"expo-tracking-transparency": "^57.0.1",
|
|
155
155
|
"facebook-nodejs-business-sdk": "^24.0.1",
|
|
156
|
-
"next": "^16.2.
|
|
157
|
-
"posthog-js": "^1.
|
|
156
|
+
"next": "^16.2.12",
|
|
157
|
+
"posthog-js": "^1.409.5",
|
|
158
158
|
"react": "^19.2.8",
|
|
159
|
-
"react-native": "^0.86.
|
|
159
|
+
"react-native": "^0.86.2",
|
|
160
160
|
"react-native-fbsdk-next": "^13.4.3",
|
|
161
161
|
"react-native-url-polyfill": "^4.0.0",
|
|
162
|
-
"react-router": "^8.
|
|
162
|
+
"react-router": "^8.3.0"
|
|
163
163
|
},
|
|
164
164
|
"peerDependenciesMeta": {
|
|
165
165
|
"@react-native-firebase/analytics": {
|