@shware/analytics 8.12.0 → 8.13.1
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/attribution/classify.cjs +35 -26
- package/dist/attribution/classify.cjs.map +1 -1
- package/dist/attribution/classify.d.cts +15 -9
- package/dist/attribution/classify.d.cts.map +1 -1
- package/dist/attribution/classify.d.mts +15 -9
- package/dist/attribution/classify.d.mts.map +1 -1
- package/dist/attribution/classify.mjs +36 -27
- package/dist/attribution/classify.mjs.map +1 -1
- package/dist/attribution/index.cjs +2 -0
- package/dist/attribution/index.d.cts +2 -2
- package/dist/attribution/index.d.mts +2 -2
- package/dist/attribution/index.mjs +2 -2
- package/dist/attribution/vocabulary.cjs +207 -34
- package/dist/attribution/vocabulary.cjs.map +1 -1
- package/dist/attribution/vocabulary.d.cts +75 -31
- package/dist/attribution/vocabulary.d.cts.map +1 -1
- package/dist/attribution/vocabulary.d.mts +75 -31
- package/dist/attribution/vocabulary.d.mts.map +1 -1
- package/dist/attribution/vocabulary.mjs +206 -35
- package/dist/attribution/vocabulary.mjs.map +1 -1
- package/dist/click-id/index.d.cts +18 -19
- package/dist/click-id/index.d.cts.map +1 -1
- package/dist/click-id/index.d.mts +18 -19
- package/dist/click-id/index.d.mts.map +1 -1
- package/dist/constants/storage.d.cts +1 -2
- package/dist/constants/storage.d.cts.map +1 -1
- package/dist/constants/storage.d.mts +1 -2
- package/dist/constants/storage.d.mts.map +1 -1
- package/dist/feedback/index.d.cts +1 -2
- package/dist/feedback/index.d.cts.map +1 -1
- package/dist/feedback/index.d.mts +1 -2
- package/dist/feedback/index.d.mts.map +1 -1
- package/dist/hooks/use-app-analytics.d.cts +1 -2
- package/dist/hooks/use-app-analytics.d.cts.map +1 -1
- package/dist/hooks/use-app-analytics.d.mts +1 -2
- package/dist/hooks/use-app-analytics.d.mts.map +1 -1
- package/dist/hooks/use-outbound-click-analytics.d.cts +1 -2
- package/dist/hooks/use-outbound-click-analytics.d.cts.map +1 -1
- package/dist/hooks/use-outbound-click-analytics.d.mts +1 -2
- package/dist/hooks/use-outbound-click-analytics.d.mts.map +1 -1
- package/dist/hooks/use-previous.d.cts +1 -2
- package/dist/hooks/use-previous.d.cts.map +1 -1
- package/dist/hooks/use-previous.d.mts +1 -2
- package/dist/hooks/use-previous.d.mts.map +1 -1
- package/dist/hooks/use-report-web-vitals.d.cts +1 -2
- package/dist/hooks/use-report-web-vitals.d.cts.map +1 -1
- package/dist/hooks/use-report-web-vitals.d.mts +1 -2
- package/dist/hooks/use-report-web-vitals.d.mts.map +1 -1
- package/dist/hooks/use-track-impression.d.cts +1 -2
- package/dist/hooks/use-track-impression.d.cts.map +1 -1
- package/dist/hooks/use-track-impression.d.mts +1 -2
- package/dist/hooks/use-track-impression.d.mts.map +1 -1
- package/dist/hooks/use-uet-id-sync.d.cts +1 -2
- package/dist/hooks/use-uet-id-sync.d.cts.map +1 -1
- package/dist/hooks/use-uet-id-sync.d.mts +1 -2
- package/dist/hooks/use-uet-id-sync.d.mts.map +1 -1
- package/dist/hooks/use-web-analytics.d.cts +1 -2
- package/dist/hooks/use-web-analytics.d.cts.map +1 -1
- package/dist/hooks/use-web-analytics.d.mts +1 -2
- package/dist/hooks/use-web-analytics.d.mts.map +1 -1
- package/dist/link/index.d.cts +3 -4
- package/dist/link/index.d.cts.map +1 -1
- package/dist/link/index.d.mts +3 -4
- package/dist/link/index.d.mts.map +1 -1
- package/dist/native/fbsdk.d.cts +1 -2
- package/dist/native/fbsdk.d.cts.map +1 -1
- package/dist/native/fbsdk.d.mts +1 -2
- package/dist/native/fbsdk.d.mts.map +1 -1
- package/dist/native/fingerprint.d.cts +4 -5
- package/dist/native/fingerprint.d.cts.map +1 -1
- package/dist/native/fingerprint.d.mts +4 -5
- package/dist/native/fingerprint.d.mts.map +1 -1
- package/dist/native/firebase.d.cts +1 -2
- package/dist/native/firebase.d.cts.map +1 -1
- package/dist/native/firebase.d.mts +1 -2
- package/dist/native/firebase.d.mts.map +1 -1
- package/dist/native/posthog.d.cts +1 -2
- package/dist/native/posthog.d.cts.map +1 -1
- package/dist/native/posthog.d.mts +1 -2
- package/dist/native/posthog.d.mts.map +1 -1
- package/dist/native/setup.d.cts +4 -5
- package/dist/native/setup.d.cts.map +1 -1
- package/dist/native/setup.d.mts +4 -5
- package/dist/native/setup.d.mts.map +1 -1
- package/dist/next/index.cjs +14 -14
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.cts +1 -2
- package/dist/next/index.d.cts.map +1 -1
- package/dist/next/index.d.mts +1 -2
- package/dist/next/index.d.mts.map +1 -1
- package/dist/next/index.mjs +3 -3
- package/dist/react-router/index.d.cts +1 -2
- package/dist/react-router/index.d.cts.map +1 -1
- package/dist/react-router/index.d.mts +1 -2
- package/dist/react-router/index.d.mts.map +1 -1
- package/dist/schema/index.d.cts +16 -17
- package/dist/schema/index.d.cts.map +1 -1
- package/dist/schema/index.d.mts +16 -17
- package/dist/schema/index.d.mts.map +1 -1
- package/dist/server/action-source.d.cts +3 -4
- package/dist/server/action-source.d.cts.map +1 -1
- package/dist/server/action-source.d.mts +3 -4
- package/dist/server/action-source.d.mts.map +1 -1
- package/dist/server/google-data-manager.d.cts +9 -10
- package/dist/server/google-data-manager.d.cts.map +1 -1
- package/dist/server/google-data-manager.d.mts +9 -10
- package/dist/server/google-data-manager.d.mts.map +1 -1
- package/dist/server/linkedin-conversions-api.d.cts +4 -5
- package/dist/server/linkedin-conversions-api.d.cts.map +1 -1
- package/dist/server/linkedin-conversions-api.d.mts +4 -5
- package/dist/server/linkedin-conversions-api.d.mts.map +1 -1
- package/dist/server/meta-capi.d.cts +5 -6
- package/dist/server/meta-capi.d.cts.map +1 -1
- package/dist/server/meta-capi.d.mts +5 -6
- package/dist/server/meta-capi.d.mts.map +1 -1
- package/dist/server/meta-conversions-api.d.cts +4 -5
- package/dist/server/meta-conversions-api.d.cts.map +1 -1
- package/dist/server/meta-conversions-api.d.mts +4 -5
- package/dist/server/meta-conversions-api.d.mts.map +1 -1
- package/dist/server/microsoft-conversions-api.d.cts +11 -12
- package/dist/server/microsoft-conversions-api.d.cts.map +1 -1
- package/dist/server/microsoft-conversions-api.d.mts +11 -12
- package/dist/server/microsoft-conversions-api.d.mts.map +1 -1
- package/dist/server/openai-conversions-api.d.cts +5 -6
- package/dist/server/openai-conversions-api.d.cts.map +1 -1
- package/dist/server/openai-conversions-api.d.mts +5 -6
- package/dist/server/openai-conversions-api.d.mts.map +1 -1
- package/dist/server/page-location.d.cts +1 -2
- package/dist/server/page-location.d.cts.map +1 -1
- package/dist/server/page-location.d.mts +1 -2
- package/dist/server/page-location.d.mts.map +1 -1
- package/dist/server/reddit-conversions-api.d.cts +4 -5
- package/dist/server/reddit-conversions-api.d.cts.map +1 -1
- package/dist/server/reddit-conversions-api.d.mts +4 -5
- package/dist/server/reddit-conversions-api.d.mts.map +1 -1
- package/dist/setup/index.d.cts +5 -6
- package/dist/setup/index.d.cts.map +1 -1
- package/dist/setup/index.d.mts +5 -6
- package/dist/setup/index.d.mts.map +1 -1
- package/dist/setup/session.d.cts +2 -3
- package/dist/setup/session.d.cts.map +1 -1
- package/dist/setup/session.d.mts +2 -3
- package/dist/setup/session.d.mts.map +1 -1
- package/dist/tanstack/analytics.d.cts +1 -2
- package/dist/tanstack/analytics.d.cts.map +1 -1
- package/dist/tanstack/analytics.d.mts +1 -2
- package/dist/tanstack/analytics.d.mts.map +1 -1
- package/dist/tanstack/middleware.d.cts +3 -4
- package/dist/tanstack/middleware.d.cts.map +1 -1
- package/dist/tanstack/middleware.d.mts +3 -4
- package/dist/tanstack/middleware.d.mts.map +1 -1
- package/dist/test/setup.d.cts +3 -4
- package/dist/test/setup.d.cts.map +1 -1
- package/dist/test/setup.d.mts +3 -4
- package/dist/test/setup.d.mts.map +1 -1
- package/dist/third-parties/google-analytics.d.cts +2 -3
- package/dist/third-parties/google-analytics.d.cts.map +1 -1
- package/dist/third-parties/google-analytics.d.mts +2 -3
- package/dist/third-parties/google-analytics.d.mts.map +1 -1
- package/dist/third-parties/ignored-events.d.cts +1 -2
- package/dist/third-parties/ignored-events.d.cts.map +1 -1
- package/dist/third-parties/ignored-events.d.mts +1 -2
- package/dist/third-parties/ignored-events.d.mts.map +1 -1
- package/dist/third-parties/linkedin-insight-tag.d.cts +3 -4
- package/dist/third-parties/linkedin-insight-tag.d.cts.map +1 -1
- package/dist/third-parties/linkedin-insight-tag.d.mts +3 -4
- package/dist/third-parties/linkedin-insight-tag.d.mts.map +1 -1
- package/dist/third-parties/meta-pixel.d.cts +2 -3
- package/dist/third-parties/meta-pixel.d.cts.map +1 -1
- package/dist/third-parties/meta-pixel.d.mts +2 -3
- package/dist/third-parties/meta-pixel.d.mts.map +1 -1
- package/dist/third-parties/microsoft-uet.d.cts +6 -7
- package/dist/third-parties/microsoft-uet.d.cts.map +1 -1
- package/dist/third-parties/microsoft-uet.d.mts +6 -7
- package/dist/third-parties/microsoft-uet.d.mts.map +1 -1
- package/dist/third-parties/openai-pixel.d.cts +2 -3
- package/dist/third-parties/openai-pixel.d.cts.map +1 -1
- package/dist/third-parties/openai-pixel.d.mts +2 -3
- package/dist/third-parties/openai-pixel.d.mts.map +1 -1
- package/dist/third-parties/posthog.d.cts +2 -3
- package/dist/third-parties/posthog.d.cts.map +1 -1
- package/dist/third-parties/posthog.d.mts +2 -3
- package/dist/third-parties/posthog.d.mts.map +1 -1
- package/dist/third-parties/reddit-pixel.d.cts +2 -3
- package/dist/third-parties/reddit-pixel.d.cts.map +1 -1
- package/dist/third-parties/reddit-pixel.d.mts +2 -3
- package/dist/third-parties/reddit-pixel.d.mts.map +1 -1
- package/dist/track/fbq.d.cts +10 -11
- package/dist/track/fbq.d.cts.map +1 -1
- package/dist/track/fbq.d.mts +10 -11
- package/dist/track/fbq.d.mts.map +1 -1
- package/dist/track/gtag.d.cts +26 -27
- package/dist/track/gtag.d.cts.map +1 -1
- package/dist/track/gtag.d.mts +26 -27
- package/dist/track/gtag.d.mts.map +1 -1
- package/dist/track/index.d.cts +4 -5
- package/dist/track/index.d.cts.map +1 -1
- package/dist/track/index.d.mts +4 -5
- package/dist/track/index.d.mts.map +1 -1
- package/dist/track/lintrk.d.cts +1 -2
- package/dist/track/lintrk.d.cts.map +1 -1
- package/dist/track/lintrk.d.mts +1 -2
- package/dist/track/lintrk.d.mts.map +1 -1
- package/dist/track/oaiq.d.cts +17 -18
- package/dist/track/oaiq.d.cts.map +1 -1
- package/dist/track/oaiq.d.mts +17 -18
- package/dist/track/oaiq.d.mts.map +1 -1
- package/dist/track/rdt.d.cts +10 -11
- package/dist/track/rdt.d.cts.map +1 -1
- package/dist/track/rdt.d.mts +10 -11
- package/dist/track/rdt.d.mts.map +1 -1
- package/dist/track/types.d.cts +20 -21
- package/dist/track/types.d.cts.map +1 -1
- package/dist/track/types.d.mts +20 -21
- package/dist/track/types.d.mts.map +1 -1
- package/dist/track/uetq.d.cts +8 -9
- package/dist/track/uetq.d.cts.map +1 -1
- package/dist/track/uetq.d.mts +8 -9
- package/dist/track/uetq.d.mts.map +1 -1
- package/dist/utils/field.d.cts +1 -2
- package/dist/utils/field.d.cts.map +1 -1
- package/dist/utils/field.d.mts +1 -2
- package/dist/utils/field.d.mts.map +1 -1
- package/dist/utils/sha256.d.cts +1 -2
- package/dist/utils/sha256.d.cts.map +1 -1
- package/dist/utils/sha256.d.mts +1 -2
- package/dist/utils/sha256.d.mts.map +1 -1
- package/dist/utils/stripe.d.cts +2 -3
- package/dist/utils/stripe.d.cts.map +1 -1
- package/dist/utils/stripe.d.mts +2 -3
- package/dist/utils/stripe.d.mts.map +1 -1
- package/dist/visitor/index.d.cts +2 -3
- package/dist/visitor/index.d.cts.map +1 -1
- package/dist/visitor/index.d.mts +2 -3
- package/dist/visitor/index.d.mts.map +1 -1
- package/dist/visitor/types.d.cts +4 -5
- package/dist/visitor/types.d.cts.map +1 -1
- package/dist/visitor/types.d.mts +4 -5
- package/dist/visitor/types.d.mts.map +1 -1
- package/dist/web/index.d.cts +3 -4
- package/dist/web/index.d.cts.map +1 -1
- package/dist/web/index.d.mts +3 -4
- package/dist/web/index.d.mts.map +1 -1
- package/dist/web/page-key.d.cts +1 -2
- package/dist/web/page-key.d.cts.map +1 -1
- package/dist/web/page-key.d.mts +1 -2
- package/dist/web/page-key.d.mts.map +1 -1
- package/package.json +27 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posthog.d.cts","names":[],"sources":["../../src/native/posthog.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"posthog.d.cts","names":[],"sources":["../../src/native/posthog.ts"],"mappings":";wBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posthog.d.mts","names":[],"sources":["../../src/native/posthog.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"posthog.d.mts","names":[],"sources":["../../src/native/posthog.ts"],"mappings":";wBAAgB"}
|
package/dist/native/setup.d.cts
CHANGED
|
@@ -2,10 +2,9 @@ import { TrackTags } from "../track/types.cjs";
|
|
|
2
2
|
import { Storage } from "../setup/index.cjs";
|
|
3
3
|
import "expo-sqlite/localStorage/install";
|
|
4
4
|
//#region src/native/setup.d.ts
|
|
5
|
-
declare const storage: Storage;
|
|
6
|
-
declare function getDeviceId(): Promise<string>;
|
|
7
|
-
declare function getDeviceType(): string | undefined;
|
|
8
|
-
declare function getTags(): Promise<TrackTags>;
|
|
5
|
+
export declare const storage: Storage;
|
|
6
|
+
export declare function getDeviceId(): Promise<string>;
|
|
7
|
+
export declare function getDeviceType(): string | undefined;
|
|
8
|
+
export declare function getTags(): Promise<TrackTags>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { getDeviceId, getDeviceType, getTags, storage };
|
|
11
10
|
//# sourceMappingURL=setup.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.cts","names":[],"sources":["../../src/native/setup.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"setup.d.cts","names":[],"sources":["../../src/native/setup.ts"],"mappings":";;;;qBAsBa,SAAS;wBA2BN,eAAe;wBAkCf;wBA0CM,WAAW,QAAQ"}
|
package/dist/native/setup.d.mts
CHANGED
|
@@ -2,10 +2,9 @@ import { TrackTags } from "../track/types.mjs";
|
|
|
2
2
|
import { Storage } from "../setup/index.mjs";
|
|
3
3
|
import "expo-sqlite/localStorage/install";
|
|
4
4
|
//#region src/native/setup.d.ts
|
|
5
|
-
declare const storage: Storage;
|
|
6
|
-
declare function getDeviceId(): Promise<string>;
|
|
7
|
-
declare function getDeviceType(): string | undefined;
|
|
8
|
-
declare function getTags(): Promise<TrackTags>;
|
|
5
|
+
export declare const storage: Storage;
|
|
6
|
+
export declare function getDeviceId(): Promise<string>;
|
|
7
|
+
export declare function getDeviceType(): string | undefined;
|
|
8
|
+
export declare function getTags(): Promise<TrackTags>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { getDeviceId, getDeviceType, getTags, storage };
|
|
11
10
|
//# sourceMappingURL=setup.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.mts","names":[],"sources":["../../src/native/setup.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"setup.d.mts","names":[],"sources":["../../src/native/setup.ts"],"mappings":";;;;qBAsBa,SAAS;wBA2BN,eAAe;wBAkCf;wBA0CM,WAAW,QAAQ"}
|
package/dist/next/index.cjs
CHANGED
|
@@ -6,10 +6,10 @@ const require_hooks_use_outbound_click_analytics = require("../hooks/use-outboun
|
|
|
6
6
|
const require_hooks_use_uet_id_sync = require("../hooks/use-uet-id-sync.cjs");
|
|
7
7
|
const require_hooks_use_web_analytics = require("../hooks/use-web-analytics.cjs");
|
|
8
8
|
let react = require("react");
|
|
9
|
-
let
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
let
|
|
9
|
+
let next_navigation = require("next/navigation");
|
|
10
|
+
let next_script = require("next/script");
|
|
11
|
+
next_script = require_runtime.__toESM(next_script, 1);
|
|
12
|
+
let next_web_vitals = require("next/web-vitals");
|
|
13
13
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
14
|
//#region src/next/index.tsx
|
|
15
15
|
/**
|
|
@@ -18,15 +18,15 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
18
18
|
* fails the build for a page that lets it. The boundary is here so a host does not have to know.
|
|
19
19
|
*/
|
|
20
20
|
function PageViews() {
|
|
21
|
-
const pathname = (0,
|
|
22
|
-
const searchParams = (0,
|
|
21
|
+
const pathname = (0, next_navigation.usePathname)();
|
|
22
|
+
const searchParams = (0, next_navigation.useSearchParams)();
|
|
23
23
|
require_hooks_use_web_analytics.useWebAnalytics(pathname, searchParams.toString());
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
26
|
function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, hotjarId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, facebookAppId, reportWebVitals = true }) {
|
|
27
27
|
require_hooks_use_outbound_click_analytics.useOutboundClickAnalytics();
|
|
28
28
|
require_hooks_use_uet_id_sync.useUETIdSync(uetCustomerId);
|
|
29
|
-
(0,
|
|
29
|
+
(0, next_web_vitals.useReportWebVitals)((metric) => {
|
|
30
30
|
if (!reportWebVitals) return;
|
|
31
31
|
const properties = {
|
|
32
32
|
value: metric.delta,
|
|
@@ -48,11 +48,11 @@ function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, hotjarId, reddi
|
|
|
48
48
|
property: "fb:app_id",
|
|
49
49
|
content: facebookAppId
|
|
50
50
|
}),
|
|
51
|
-
gaId && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
51
|
+
gaId && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(next_script.default, {
|
|
52
52
|
id: "gtag",
|
|
53
53
|
nonce,
|
|
54
54
|
src: gaSrc ?? `https://www.googletagmanager.com/gtag/js?id=${gaId}`
|
|
55
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
55
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(next_script.default, {
|
|
56
56
|
nonce,
|
|
57
57
|
id: "gtag-init",
|
|
58
58
|
dangerouslySetInnerHTML: { __html: `
|
|
@@ -62,7 +62,7 @@ function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, hotjarId, reddi
|
|
|
62
62
|
gtag('config', '${gaId}'${debugMode ? " ,{ 'debug_mode': true }" : ""});
|
|
63
63
|
` }
|
|
64
64
|
})] }),
|
|
65
|
-
metaPixelId && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
65
|
+
metaPixelId && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(next_script.default, {
|
|
66
66
|
id: "meta-pixel",
|
|
67
67
|
strategy: "afterInteractive",
|
|
68
68
|
dangerouslySetInnerHTML: { __html: `
|
|
@@ -85,7 +85,7 @@ function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, hotjarId, reddi
|
|
|
85
85
|
fbq('init', '${metaPixelId}');
|
|
86
86
|
fbq('track', 'PageView');` }
|
|
87
87
|
}),
|
|
88
|
-
redditPixelId && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
88
|
+
redditPixelId && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(next_script.default, {
|
|
89
89
|
id: "reddit-pixel",
|
|
90
90
|
strategy: "afterInteractive",
|
|
91
91
|
dangerouslySetInnerHTML: { __html: `
|
|
@@ -105,7 +105,7 @@ function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, hotjarId, reddi
|
|
|
105
105
|
rdt('init', '${redditPixelId}');
|
|
106
106
|
rdt('track', 'PageVisit');` }
|
|
107
107
|
}),
|
|
108
|
-
linkedInPartnerId && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
108
|
+
linkedInPartnerId && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(next_script.default, {
|
|
109
109
|
id: "linkedin-insight-tag",
|
|
110
110
|
strategy: "afterInteractive",
|
|
111
111
|
dangerouslySetInnerHTML: { __html: `
|
|
@@ -128,7 +128,7 @@ function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, hotjarId, reddi
|
|
|
128
128
|
})(window.lintrk);
|
|
129
129
|
` }
|
|
130
130
|
}),
|
|
131
|
-
uetTagId && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
131
|
+
uetTagId && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(next_script.default, {
|
|
132
132
|
strategy: "afterInteractive",
|
|
133
133
|
id: "uet-tag",
|
|
134
134
|
dangerouslySetInnerHTML: { __html: `
|
|
@@ -150,7 +150,7 @@ function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, hotjarId, reddi
|
|
|
150
150
|
});
|
|
151
151
|
` }
|
|
152
152
|
}),
|
|
153
|
-
hotjarId && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
153
|
+
hotjarId && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(next_script.default, {
|
|
154
154
|
id: "hotjar",
|
|
155
155
|
strategy: "afterInteractive",
|
|
156
156
|
dangerouslySetInnerHTML: { __html: `
|
package/dist/next/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["usePathname","useSearchParams","Suspense","Script"],"sources":["../../src/next/index.tsx"],"sourcesContent":["'use client';\n\nimport { usePathname, useSearchParams } from 'next/navigation';\nimport Script from 'next/script';\nimport { useReportWebVitals } from 'next/web-vitals';\nimport { Suspense } from 'react';\nimport { useOutboundClickAnalytics } from '../hooks/use-outbound-click-analytics';\nimport { useUETIdSync } from '../hooks/use-uet-id-sync';\nimport { useWebAnalytics } from '../hooks/use-web-analytics';\nimport type { PixelId as MetaPixelId } from '../track/fbq';\nimport type { GaId, GtmId } from '../track/gtag';\nimport { track } from '../track/index';\nimport type { PixelId as RedditPixelId } from '../track/rdt';\n\ninterface Props {\n gaId?: GaId;\n gaSrc?: string;\n gtmId?: GtmId;\n hotjarId?: `${number}`;\n metaPixelId?: MetaPixelId;\n redditPixelId?: RedditPixelId;\n linkedInPartnerId?: `${number}`;\n /** Microsoft Advertising UET tag id. The tag reports page loads itself (`enableAutoSpaTracking`). */\n uetTagId?: `${number}`;\n /** Microsoft Advertising customer id (`cid` in the ads UI's URLs): enables the Conversions API's ID Sync pixel. */\n uetCustomerId?: `${number}`;\n facebookAppId?: string;\n nonce?: string;\n debugMode?: boolean;\n reportWebVitals?: boolean;\n}\n\n/**\n * Its own component under a Suspense boundary: `useSearchParams` in a statically rendered route\n * bails the whole tree out to client rendering unless something above it suspends, and Next\n * fails the build for a page that lets it. The boundary is here so a host does not have to know.\n */\nfunction PageViews() {\n const pathname = usePathname();\n const searchParams = useSearchParams();\n useWebAnalytics(pathname, searchParams.toString());\n return null;\n}\n\nexport function Analytics({\n gaId,\n gaSrc,\n nonce,\n debugMode,\n metaPixelId,\n hotjarId,\n redditPixelId,\n linkedInPartnerId,\n uetTagId,\n uetCustomerId,\n facebookAppId,\n reportWebVitals = true,\n}: Props) {\n useOutboundClickAnalytics();\n useUETIdSync(uetCustomerId);\n\n useReportWebVitals((metric) => {\n if (!reportWebVitals) return;\n const properties = {\n value: metric.delta,\n metric_id: metric.id,\n metric_value: metric.value,\n metric_delta: metric.delta,\n metric_rating: metric.rating,\n metric_navigation_type: metric.navigationType,\n non_interaction: true, // avoids affecting bounce rate.\n };\n track(metric.name, properties);\n });\n\n return (\n <>\n <Suspense fallback={null}>\n <PageViews />\n </Suspense>\n {facebookAppId && <meta property=\"fb:app_id\" content={facebookAppId} />}\n {gaId && (\n <>\n <Script\n id=\"gtag\"\n nonce={nonce}\n src={gaSrc ?? `https://www.googletagmanager.com/gtag/js?id=${gaId}`}\n />\n <Script\n nonce={nonce}\n id=\"gtag-init\"\n dangerouslySetInnerHTML={{\n __html: `\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '${gaId}'${debugMode ? \" ,{ 'debug_mode': true }\" : ''});\n `,\n }}\n />\n </>\n )}\n {metaPixelId && (\n <Script\n id=\"meta-pixel\"\n strategy=\"afterInteractive\"\n dangerouslySetInnerHTML={{\n __html: `\n !(function (f, b, e, v, n, t, s) {\n if (f.fbq) return;\n n = f.fbq = function () {\n n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments);\n };\n if (!f._fbq) f._fbq = n;\n n.push = n;\n n.loaded = !0;\n n.version = '2.0';\n n.queue = [];\n t = b.createElement(e);\n t.async = !0;\n t.src = v;\n s = b.getElementsByTagName(e)[0];\n s.parentNode.insertBefore(t, s);\n })(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js');\n fbq('init', '${metaPixelId}');\n fbq('track', 'PageView');`,\n }}\n />\n )}\n {redditPixelId && (\n <Script\n id=\"reddit-pixel\"\n strategy=\"afterInteractive\"\n dangerouslySetInnerHTML={{\n __html: `\n !function(w,d) {\n if(!w.rdt) {\n var p = w.rdt = function() {\n p.sendEvent ? p.sendEvent.apply(p,arguments) : p.callQueue.push(arguments)\n };\n p.callQueue = [];\n var t = d.createElement(\"script\");\n t.src = \"https://www.redditstatic.com/ads/pixel.js\";\n t.async = !0;\n var s = d.getElementsByTagName(\"script\")[0];\n s.parentNode.insertBefore(t,s)\n }\n }(window, document);\n rdt('init', '${redditPixelId}');\n rdt('track', 'PageVisit');`,\n }}\n />\n )}\n {linkedInPartnerId && (\n <Script\n id=\"linkedin-insight-tag\"\n strategy=\"afterInteractive\"\n dangerouslySetInnerHTML={{\n __html: `\n _linkedin_partner_id = \"${linkedInPartnerId}\";\n window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];\n window._linkedin_data_partner_ids.push(_linkedin_partner_id);\n\n (function(l) {\n if (!l){\n window.lintrk = function(a,b){ \n window.lintrk.q.push([a,b])\n };\n window.lintrk.q=[]\n }\n var s = document.getElementsByTagName(\"script\")[0];\n var b = document.createElement(\"script\");\n b.type = \"text/javascript\";b.async = true;\n b.src = \"https://snap.licdn.com/li.lms-analytics/insight.min.js\";\n s.parentNode.insertBefore(b, s);\n })(window.lintrk);\n `,\n }}\n />\n )}\n {uetTagId && (\n <Script\n strategy=\"afterInteractive\"\n id=\"uet-tag\"\n dangerouslySetInnerHTML={{\n __html: `\n (function (w, d, t, u, o) {\n w[u] = w[u] || [], o.ts = (new Date).getTime();\n var n = d.createElement(t);\n n.src = \"https://bat.bing.net/bat.js?ti=\" + o.ti + (\"uetq\" != u ? \"&q=\" + u : \"\"),\n n.async = 1, n.onload = n.onreadystatechange = function() {\n var s = this.readyState;\n s && \"loaded\" !== s && \"complete\" !== s ||\n (o.q = w[u], w[u] = new UET(o), w[u].push(\"pageLoad\"),\n n.onload = n.onreadystatechange = null)\n };\n var i = d.getElementsByTagName(t)[0];\n i.parentNode.insertBefore(n, i);\n })(window, document, \"script\", \"uetq\", {\n ti: \"${uetTagId}\",\n enableAutoSpaTracking: true\n });\n `,\n }}\n />\n )}\n {hotjarId && (\n <Script\n id=\"hotjar\"\n strategy=\"afterInteractive\"\n dangerouslySetInnerHTML={{\n __html: `\n (function(h,o,t,j,a,r){\n h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n h._hjSettings={hjid:${hotjarId},hjsv:6};\n a=o.getElementsByTagName('head')[0];\n r=o.createElement('script');r.async=1;\n r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n a.appendChild(r);\n })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n `,\n }}\n />\n )}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqCA,SAAS,YAAY;CACnB,MAAM,YAAA,GAAWA,
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["usePathname","useSearchParams","Suspense","Script"],"sources":["../../src/next/index.tsx"],"sourcesContent":["'use client';\n\nimport { usePathname, useSearchParams } from 'next/navigation';\nimport Script from 'next/script';\nimport { useReportWebVitals } from 'next/web-vitals';\nimport { Suspense } from 'react';\nimport { useOutboundClickAnalytics } from '../hooks/use-outbound-click-analytics';\nimport { useUETIdSync } from '../hooks/use-uet-id-sync';\nimport { useWebAnalytics } from '../hooks/use-web-analytics';\nimport type { PixelId as MetaPixelId } from '../track/fbq';\nimport type { GaId, GtmId } from '../track/gtag';\nimport { track } from '../track/index';\nimport type { PixelId as RedditPixelId } from '../track/rdt';\n\ninterface Props {\n gaId?: GaId;\n gaSrc?: string;\n gtmId?: GtmId;\n hotjarId?: `${number}`;\n metaPixelId?: MetaPixelId;\n redditPixelId?: RedditPixelId;\n linkedInPartnerId?: `${number}`;\n /** Microsoft Advertising UET tag id. The tag reports page loads itself (`enableAutoSpaTracking`). */\n uetTagId?: `${number}`;\n /** Microsoft Advertising customer id (`cid` in the ads UI's URLs): enables the Conversions API's ID Sync pixel. */\n uetCustomerId?: `${number}`;\n facebookAppId?: string;\n nonce?: string;\n debugMode?: boolean;\n reportWebVitals?: boolean;\n}\n\n/**\n * Its own component under a Suspense boundary: `useSearchParams` in a statically rendered route\n * bails the whole tree out to client rendering unless something above it suspends, and Next\n * fails the build for a page that lets it. The boundary is here so a host does not have to know.\n */\nfunction PageViews() {\n const pathname = usePathname();\n const searchParams = useSearchParams();\n useWebAnalytics(pathname, searchParams.toString());\n return null;\n}\n\nexport function Analytics({\n gaId,\n gaSrc,\n nonce,\n debugMode,\n metaPixelId,\n hotjarId,\n redditPixelId,\n linkedInPartnerId,\n uetTagId,\n uetCustomerId,\n facebookAppId,\n reportWebVitals = true,\n}: Props) {\n useOutboundClickAnalytics();\n useUETIdSync(uetCustomerId);\n\n useReportWebVitals((metric) => {\n if (!reportWebVitals) return;\n const properties = {\n value: metric.delta,\n metric_id: metric.id,\n metric_value: metric.value,\n metric_delta: metric.delta,\n metric_rating: metric.rating,\n metric_navigation_type: metric.navigationType,\n non_interaction: true, // avoids affecting bounce rate.\n };\n track(metric.name, properties);\n });\n\n return (\n <>\n <Suspense fallback={null}>\n <PageViews />\n </Suspense>\n {facebookAppId && <meta property=\"fb:app_id\" content={facebookAppId} />}\n {gaId && (\n <>\n <Script\n id=\"gtag\"\n nonce={nonce}\n src={gaSrc ?? `https://www.googletagmanager.com/gtag/js?id=${gaId}`}\n />\n <Script\n nonce={nonce}\n id=\"gtag-init\"\n dangerouslySetInnerHTML={{\n __html: `\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '${gaId}'${debugMode ? \" ,{ 'debug_mode': true }\" : ''});\n `,\n }}\n />\n </>\n )}\n {metaPixelId && (\n <Script\n id=\"meta-pixel\"\n strategy=\"afterInteractive\"\n dangerouslySetInnerHTML={{\n __html: `\n !(function (f, b, e, v, n, t, s) {\n if (f.fbq) return;\n n = f.fbq = function () {\n n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments);\n };\n if (!f._fbq) f._fbq = n;\n n.push = n;\n n.loaded = !0;\n n.version = '2.0';\n n.queue = [];\n t = b.createElement(e);\n t.async = !0;\n t.src = v;\n s = b.getElementsByTagName(e)[0];\n s.parentNode.insertBefore(t, s);\n })(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js');\n fbq('init', '${metaPixelId}');\n fbq('track', 'PageView');`,\n }}\n />\n )}\n {redditPixelId && (\n <Script\n id=\"reddit-pixel\"\n strategy=\"afterInteractive\"\n dangerouslySetInnerHTML={{\n __html: `\n !function(w,d) {\n if(!w.rdt) {\n var p = w.rdt = function() {\n p.sendEvent ? p.sendEvent.apply(p,arguments) : p.callQueue.push(arguments)\n };\n p.callQueue = [];\n var t = d.createElement(\"script\");\n t.src = \"https://www.redditstatic.com/ads/pixel.js\";\n t.async = !0;\n var s = d.getElementsByTagName(\"script\")[0];\n s.parentNode.insertBefore(t,s)\n }\n }(window, document);\n rdt('init', '${redditPixelId}');\n rdt('track', 'PageVisit');`,\n }}\n />\n )}\n {linkedInPartnerId && (\n <Script\n id=\"linkedin-insight-tag\"\n strategy=\"afterInteractive\"\n dangerouslySetInnerHTML={{\n __html: `\n _linkedin_partner_id = \"${linkedInPartnerId}\";\n window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];\n window._linkedin_data_partner_ids.push(_linkedin_partner_id);\n\n (function(l) {\n if (!l){\n window.lintrk = function(a,b){ \n window.lintrk.q.push([a,b])\n };\n window.lintrk.q=[]\n }\n var s = document.getElementsByTagName(\"script\")[0];\n var b = document.createElement(\"script\");\n b.type = \"text/javascript\";b.async = true;\n b.src = \"https://snap.licdn.com/li.lms-analytics/insight.min.js\";\n s.parentNode.insertBefore(b, s);\n })(window.lintrk);\n `,\n }}\n />\n )}\n {uetTagId && (\n <Script\n strategy=\"afterInteractive\"\n id=\"uet-tag\"\n dangerouslySetInnerHTML={{\n __html: `\n (function (w, d, t, u, o) {\n w[u] = w[u] || [], o.ts = (new Date).getTime();\n var n = d.createElement(t);\n n.src = \"https://bat.bing.net/bat.js?ti=\" + o.ti + (\"uetq\" != u ? \"&q=\" + u : \"\"),\n n.async = 1, n.onload = n.onreadystatechange = function() {\n var s = this.readyState;\n s && \"loaded\" !== s && \"complete\" !== s ||\n (o.q = w[u], w[u] = new UET(o), w[u].push(\"pageLoad\"),\n n.onload = n.onreadystatechange = null)\n };\n var i = d.getElementsByTagName(t)[0];\n i.parentNode.insertBefore(n, i);\n })(window, document, \"script\", \"uetq\", {\n ti: \"${uetTagId}\",\n enableAutoSpaTracking: true\n });\n `,\n }}\n />\n )}\n {hotjarId && (\n <Script\n id=\"hotjar\"\n strategy=\"afterInteractive\"\n dangerouslySetInnerHTML={{\n __html: `\n (function(h,o,t,j,a,r){\n h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n h._hjSettings={hjid:${hotjarId},hjsv:6};\n a=o.getElementsByTagName('head')[0];\n r=o.createElement('script');r.async=1;\n r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n a.appendChild(r);\n })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n `,\n }}\n />\n )}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqCA,SAAS,YAAY;CACnB,MAAM,YAAA,GAAWA,gBAAAA,YAAAA,CAAY;CAC7B,MAAM,gBAAA,GAAeC,gBAAAA,gBAAAA,CAAgB;CACrC,gCAAA,gBAAgB,UAAU,aAAa,SAAS,CAAC;CACjD,OAAO;AACT;AAEA,SAAgB,UAAU,EACxB,MACA,OACA,OACA,WACA,aACA,UACA,eACA,mBACA,UACA,eACA,eACA,kBAAkB,QACV;CACR,2CAAA,0BAA0B;CAC1B,8BAAA,aAAa,aAAa;CAE1B,CAAA,GAAA,gBAAA,mBAAA,EAAoB,WAAW;EAC7B,IAAI,CAAC,iBAAiB;EACtB,MAAM,aAAa;GACjB,OAAO,OAAO;GACd,WAAW,OAAO;GAClB,cAAc,OAAO;GACrB,cAAc,OAAO;GACrB,eAAe,OAAO;GACtB,wBAAwB,OAAO;GAC/B,iBAAiB;EACnB;EACA,oBAAA,MAAM,OAAO,MAAM,UAAU;CAC/B,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA;EACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,MAAAA,UAAD;GAAU,UAAU;GAClB,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD,CAAY,CAAA;EACJ,CAAA;EACT,iBAAiB,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GAAM,UAAS;GAAY,SAAS;EAAgB,CAAA;EACrE,QACC,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,SAAD;GACE,IAAG;GACI;GACP,KAAK,SAAS,+CAA+C;EAC9D,CAAA,GACD,iBAAA,GAAA,kBAAA,IAAA,CAACA,YAAAA,SAAD;GACS;GACP,IAAG;GACH,yBAAyB,EACvB,QAAQ;;;;gCAIU,KAAK,GAAG,YAAY,6BAA6B,GAAG;cAExE;EACD,CAAA,CACD,EAAA,CAAA;EAEH,eACC,iBAAA,GAAA,kBAAA,IAAA,CAACA,YAAAA,SAAD;GACE,IAAG;GACH,UAAS;GACT,yBAAyB,EACvB,QAAQ;;;;;;;;;;;;;;;;;2BAiBO,YAAY;uCAE7B;EACD,CAAA;EAEF,iBACC,iBAAA,GAAA,kBAAA,IAAA,CAACA,YAAAA,SAAD;GACE,IAAG;GACH,UAAS;GACT,yBAAyB,EACvB,QAAQ;;;;;;;;;;;;;;2BAcO,cAAc;wCAE/B;EACD,CAAA;EAEF,qBACC,iBAAA,GAAA,kBAAA,IAAA,CAACA,YAAAA,SAAD;GACE,IAAG;GACH,UAAS;GACT,yBAAyB,EACvB,QAAQ;wCACoB,kBAAkB;;;;;;;;;;;;;;;;;gBAkBhD;EACD,CAAA;EAEF,YACC,iBAAA,GAAA,kBAAA,IAAA,CAACA,YAAAA,SAAD;GACE,UAAS;GACT,IAAG;GACH,yBAAyB,EACvB,QAAQ;;;;;;;;;;;;;;uBAcG,SAAS;;;cAItB;EACD,CAAA;EAEF,YACC,iBAAA,GAAA,kBAAA,IAAA,CAACA,YAAAA,SAAD;GACE,IAAG;GACH,UAAS;GACT,yBAAyB,EACvB,QAAQ;;;oCAGgB,SAAS;;;;;;cAOnC;EACD,CAAA;CAEH,EAAA,CAAA;AAEN"}
|
package/dist/next/index.d.cts
CHANGED
|
@@ -19,7 +19,6 @@ interface Props {
|
|
|
19
19
|
debugMode?: boolean;
|
|
20
20
|
reportWebVitals?: boolean;
|
|
21
21
|
}
|
|
22
|
-
declare function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, hotjarId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, facebookAppId, reportWebVitals }: Props): import("react").JSX.Element;
|
|
22
|
+
export declare function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, hotjarId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, facebookAppId, reportWebVitals }: Props): import("react").JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
|
-
export { Analytics };
|
|
25
24
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/next/index.tsx"],"mappings":";;;;UAcU;EACR,OAAO;EACP;EACA,QAAQ;EACR;EACA,
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":["MetaPixelId","RedditPixelId"],"sources":["../../src/next/index.tsx"],"mappings":";;;;UAcU;EACR,OAAO;EACP;EACA,QAAQ;EACR;EACA,cAAcA;EACd,gBAAgBC;EAChB;;EAEA;;EAEA;EACA;EACA;EACA;EACA;;wBAec,YACd,MACA,OACA,OACA,WACA,aACA,UACA,eACA,mBACA,UACA,eACA,eACA,mBACC,wBAAK,IAAA"}
|
package/dist/next/index.d.mts
CHANGED
|
@@ -19,7 +19,6 @@ interface Props {
|
|
|
19
19
|
debugMode?: boolean;
|
|
20
20
|
reportWebVitals?: boolean;
|
|
21
21
|
}
|
|
22
|
-
declare function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, hotjarId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, facebookAppId, reportWebVitals }: Props): import("react").JSX.Element;
|
|
22
|
+
export declare function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, hotjarId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, facebookAppId, reportWebVitals }: Props): import("react").JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
|
-
export { Analytics };
|
|
25
24
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/next/index.tsx"],"mappings":";;;;UAcU;EACR,OAAO;EACP;EACA,QAAQ;EACR;EACA,
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":["MetaPixelId","RedditPixelId"],"sources":["../../src/next/index.tsx"],"mappings":";;;;UAcU;EACR,OAAO;EACP;EACA,QAAQ;EACR;EACA,cAAcA;EACd,gBAAgBC;EAChB;;EAEA;;EAEA;EACA;EACA;EACA;EACA;;wBAec,YACd,MACA,OACA,OACA,WACA,aACA,UACA,eACA,mBACA,UACA,eACA,eACA,mBACC,wBAAK,IAAA"}
|
package/dist/next/index.mjs
CHANGED
|
@@ -4,9 +4,9 @@ import { useOutboundClickAnalytics } from "../hooks/use-outbound-click-analytics
|
|
|
4
4
|
import { useUETIdSync } from "../hooks/use-uet-id-sync.mjs";
|
|
5
5
|
import { useWebAnalytics } from "../hooks/use-web-analytics.mjs";
|
|
6
6
|
import { Suspense } from "react";
|
|
7
|
-
import { usePathname, useSearchParams } from "next/navigation
|
|
8
|
-
import Script from "next/script
|
|
9
|
-
import { useReportWebVitals } from "next/web-vitals
|
|
7
|
+
import { usePathname, useSearchParams } from "next/navigation";
|
|
8
|
+
import Script from "next/script";
|
|
9
|
+
import { useReportWebVitals } from "next/web-vitals";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/next/index.tsx
|
|
12
12
|
/**
|
|
@@ -19,7 +19,6 @@ interface Props {
|
|
|
19
19
|
debugMode?: boolean;
|
|
20
20
|
reportWebVitals?: boolean;
|
|
21
21
|
}
|
|
22
|
-
declare function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, hotjarId, facebookAppId, reportWebVitals }: Props): import("react").JSX.Element;
|
|
22
|
+
export declare function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, hotjarId, facebookAppId, reportWebVitals }: Props): import("react").JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
|
-
export { Analytics };
|
|
25
24
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/react-router/index.tsx"],"mappings":";;;;UAUU;EACR,OAAO;EACP;EACA,QAAQ;EACR,
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":["MetaPixelId","RedditPixelId"],"sources":["../../src/react-router/index.tsx"],"mappings":";;;;UAUU;EACR,OAAO;EACP;EACA,QAAQ;EACR,cAAcA;EACd,gBAAgBC;EAChB;;EAEA;;EAEA;EACA;EACA;EACA;EACA;EACA;;wBAGc,YACd,MACA,OACA,OACA,WACA,aACA,eACA,mBACA,UACA,eACA,UACA,eACA,mBACC,wBAAK,IAAA"}
|
|
@@ -19,7 +19,6 @@ interface Props {
|
|
|
19
19
|
debugMode?: boolean;
|
|
20
20
|
reportWebVitals?: boolean;
|
|
21
21
|
}
|
|
22
|
-
declare function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, hotjarId, facebookAppId, reportWebVitals }: Props): import("react").JSX.Element;
|
|
22
|
+
export declare function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, hotjarId, facebookAppId, reportWebVitals }: Props): import("react").JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
|
-
export { Analytics };
|
|
25
24
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/react-router/index.tsx"],"mappings":";;;;UAUU;EACR,OAAO;EACP;EACA,QAAQ;EACR,
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":["MetaPixelId","RedditPixelId"],"sources":["../../src/react-router/index.tsx"],"mappings":";;;;UAUU;EACR,OAAO;EACP;EACA,QAAQ;EACR,cAAcA;EACd,gBAAgBC;EAChB;;EAEA;;EAEA;EACA;EACA;EACA;EACA;EACA;;wBAGc,YACd,MACA,OACA,OACA,WACA,aACA,eACA,mBACA,UACA,eACA,UACA,eACA,mBACC,wBAAK,IAAA"}
|
package/dist/schema/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { iso, z } from "zod/mini";
|
|
2
2
|
//#region src/schema/index.d.ts
|
|
3
|
-
declare const ALL_PLATFORMS: ["ios", "android", "web", "macos", "windows", "linux", "unknown"];
|
|
4
|
-
declare const ALL_ENVIRONMENTS: ["development", "production"];
|
|
5
|
-
declare const tagsSchema: z.ZodMiniObject<{
|
|
3
|
+
export declare const ALL_PLATFORMS: ["ios", "android", "web", "macos", "windows", "linux", "unknown"];
|
|
4
|
+
export declare const ALL_ENVIRONMENTS: ["development", "production"];
|
|
5
|
+
export declare const tagsSchema: z.ZodMiniObject<{
|
|
6
6
|
os: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
7
7
|
os_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
8
8
|
os_version: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -63,8 +63,8 @@ declare const tagsSchema: z.ZodMiniObject<{
|
|
|
63
63
|
utm_creative_format: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
64
64
|
utm_marketing_tactic: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
65
65
|
}, z.core.$strip>;
|
|
66
|
-
declare const propertiesSchema: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull, z.ZodMiniPipe<z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>[], Record<string, string | number | boolean | null>[]>>]>>, z.ZodMiniTransform<Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>, Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>>>>;
|
|
67
|
-
declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
|
|
66
|
+
export declare const propertiesSchema: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull, z.ZodMiniPipe<z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>[], Record<string, string | number | boolean | null>[]>>]>>, z.ZodMiniTransform<Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>, Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>>>>;
|
|
67
|
+
export declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
|
|
68
68
|
name: z.ZodMiniString<string>;
|
|
69
69
|
visitor_id: z.ZodMiniUUID;
|
|
70
70
|
session_id: z.ZodMiniUUID;
|
|
@@ -145,7 +145,7 @@ declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
|
|
|
145
145
|
}, z.core.$strip>;
|
|
146
146
|
properties: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull, z.ZodMiniPipe<z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>[], Record<string, string | number | boolean | null>[]>>]>>, z.ZodMiniTransform<Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>, Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>>>>;
|
|
147
147
|
}, z.core.$strip>>;
|
|
148
|
-
declare const createVisitorSchema: z.ZodMiniObject<{
|
|
148
|
+
export declare const createVisitorSchema: z.ZodMiniObject<{
|
|
149
149
|
device_id: z.ZodMiniString<string>;
|
|
150
150
|
platform: z.ZodMiniEnum<{
|
|
151
151
|
android: "android";
|
|
@@ -233,7 +233,7 @@ declare const createVisitorSchema: z.ZodMiniObject<{
|
|
|
233
233
|
* @see https://support.google.com/analytics/answer/14078702
|
|
234
234
|
* @see https://support.google.com/google-ads/answer/13258081
|
|
235
235
|
*/
|
|
236
|
-
declare const userProvidedDataSchema: z.ZodMiniObject<{
|
|
236
|
+
export declare const userProvidedDataSchema: z.ZodMiniObject<{
|
|
237
237
|
email: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniEmail>, z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniEmail>>]>>;
|
|
238
238
|
phone_number: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniE164>, z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniE164>>]>>;
|
|
239
239
|
address: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
@@ -254,7 +254,7 @@ declare const userProvidedDataSchema: z.ZodMiniObject<{
|
|
|
254
254
|
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
255
255
|
}, z.core.$strip>>]>>;
|
|
256
256
|
}, z.core.$strip>;
|
|
257
|
-
declare const updateVisitorSchema: z.ZodMiniObject<{
|
|
257
|
+
export declare const updateVisitorSchema: z.ZodMiniObject<{
|
|
258
258
|
user_id: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
259
259
|
user_data: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
260
260
|
email: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniEmail>, z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniEmail>>]>>;
|
|
@@ -340,7 +340,7 @@ declare const updateVisitorSchema: z.ZodMiniObject<{
|
|
|
340
340
|
}, z.core.$strip>;
|
|
341
341
|
properties: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>>;
|
|
342
342
|
}, z.core.$strip>;
|
|
343
|
-
declare const createFeedbackSchema: z.ZodMiniObject<{
|
|
343
|
+
export declare const createFeedbackSchema: z.ZodMiniObject<{
|
|
344
344
|
name: z.ZodMiniString<string>;
|
|
345
345
|
email: z.ZodMiniEmail;
|
|
346
346
|
message: z.ZodMiniString<string>;
|
|
@@ -349,7 +349,7 @@ declare const createFeedbackSchema: z.ZodMiniObject<{
|
|
|
349
349
|
* The schema for creating a link.
|
|
350
350
|
* @see https://support.google.com/analytics/answer/10917952
|
|
351
351
|
* */
|
|
352
|
-
declare const createLinkSchema: z.ZodMiniObject<{
|
|
352
|
+
export declare const createLinkSchema: z.ZodMiniObject<{
|
|
353
353
|
url: z.ZodMiniURL;
|
|
354
354
|
utm_id: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
|
|
355
355
|
utm_source: z.ZodMiniString<string>;
|
|
@@ -361,12 +361,11 @@ declare const createLinkSchema: z.ZodMiniObject<{
|
|
|
361
361
|
utm_creative_format: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
|
|
362
362
|
utm_marketing_tactic: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
|
|
363
363
|
}, z.core.$strip>;
|
|
364
|
-
type CreateTrackEventDTO = z.output<typeof createTrackEventSchema>;
|
|
365
|
-
type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;
|
|
366
|
-
type CreateLinkDTO = z.output<typeof createLinkSchema>;
|
|
367
|
-
type CreateVisitorDTO = z.output<typeof createVisitorSchema>;
|
|
368
|
-
type UserProvidedDataDTO = z.output<typeof userProvidedDataSchema>;
|
|
369
|
-
type UpdateVisitorDTO = z.output<typeof updateVisitorSchema>;
|
|
364
|
+
export type CreateTrackEventDTO = z.output<typeof createTrackEventSchema>;
|
|
365
|
+
export type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;
|
|
366
|
+
export type CreateLinkDTO = z.output<typeof createLinkSchema>;
|
|
367
|
+
export type CreateVisitorDTO = z.output<typeof createVisitorSchema>;
|
|
368
|
+
export type UserProvidedDataDTO = z.output<typeof userProvidedDataSchema>;
|
|
369
|
+
export type UpdateVisitorDTO = z.output<typeof updateVisitorSchema>;
|
|
370
370
|
//#endregion
|
|
371
|
-
export { ALL_ENVIRONMENTS, ALL_PLATFORMS, CreateFeedbackDTO, CreateLinkDTO, CreateTrackEventDTO, CreateVisitorDTO, UpdateVisitorDTO, UserProvidedDataDTO, createFeedbackSchema, createLinkSchema, createTrackEventSchema, createVisitorSchema, propertiesSchema, tagsSchema, updateVisitorSchema, userProvidedDataSchema };
|
|
372
371
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/schema/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/schema/index.ts"],"mappings":";;qBAmFa;qBAUA;qBAEA,YAAU,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6ErB,EAAA,KAAA;qBAEW,kBAAgB,EAAA,gBAAA,EAAA,YAAA,EAAA,cAAA,EAAA,uBAAA,EAAA,uBAAA,EAAA,YAAA,EAAA,uBAAA,EAAA,mCAAA,EAAA,uBAAA,EAAA,yBAAA,EAAA,aAAA,EAAA,YAAA,EAAA,aAAA,EAAA,YAAA,EAAA,cAAA,EAAA,uBAAA,EAAA,uBAAA,EAAA,YAAA,EAAA,uBAAA,EAAA,mCAAA,EAAA,uBAAA,EAAA,yBAAA,EAAA,gBAAA,EAAA,iBAAA,kDAAA,qDAAA,EAAA,iBAAA,oDAAA,yDAAA,EAAA,iBAAA,2CAAA,4DAAA,2CAAA;qBAehB,wBAAsB,EAAA,aAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAWE,EAAA,KAAA;qBAExB,qBAAmB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM9B,EAAA,KAAA;;;;;;;;;;;qBA6BW,wBAAsB,EAAA;;;;;;;;;;;;;;;;;;;;GAIjC,EAAA,KAAA;qBAEW,qBAAmB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAK9B,EAAA,KAAA;qBAEW,sBAAoB,EAAA;;;;GAI/B,EAAA,KAAA;;;;;qBAWW,kBAAgB,EAAA;;;;;;;;;;;GA+C3B,EAAA,KAAA;YAEU,sBAAsB,EAAE,cAAc;YACtC,oBAAoB,EAAE,cAAc;YACpC,gBAAgB,EAAE,cAAc;YAChC,mBAAmB,EAAE,cAAc;YACnC,sBAAsB,EAAE,cAAc;YACtC,mBAAmB,EAAE,cAAc"}
|
package/dist/schema/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { iso, z } from "zod/mini";
|
|
2
2
|
//#region src/schema/index.d.ts
|
|
3
|
-
declare const ALL_PLATFORMS: ["ios", "android", "web", "macos", "windows", "linux", "unknown"];
|
|
4
|
-
declare const ALL_ENVIRONMENTS: ["development", "production"];
|
|
5
|
-
declare const tagsSchema: z.ZodMiniObject<{
|
|
3
|
+
export declare const ALL_PLATFORMS: ["ios", "android", "web", "macos", "windows", "linux", "unknown"];
|
|
4
|
+
export declare const ALL_ENVIRONMENTS: ["development", "production"];
|
|
5
|
+
export declare const tagsSchema: z.ZodMiniObject<{
|
|
6
6
|
os: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
7
7
|
os_name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
8
8
|
os_version: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -63,8 +63,8 @@ declare const tagsSchema: z.ZodMiniObject<{
|
|
|
63
63
|
utm_creative_format: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
64
64
|
utm_marketing_tactic: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
65
65
|
}, z.core.$strip>;
|
|
66
|
-
declare const propertiesSchema: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull, z.ZodMiniPipe<z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>[], Record<string, string | number | boolean | null>[]>>]>>, z.ZodMiniTransform<Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>, Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>>>>;
|
|
67
|
-
declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
|
|
66
|
+
export declare const propertiesSchema: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull, z.ZodMiniPipe<z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>[], Record<string, string | number | boolean | null>[]>>]>>, z.ZodMiniTransform<Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>, Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>>>>;
|
|
67
|
+
export declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
|
|
68
68
|
name: z.ZodMiniString<string>;
|
|
69
69
|
visitor_id: z.ZodMiniUUID;
|
|
70
70
|
session_id: z.ZodMiniUUID;
|
|
@@ -145,7 +145,7 @@ declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
|
|
|
145
145
|
}, z.core.$strip>;
|
|
146
146
|
properties: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull, z.ZodMiniPipe<z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>[], Record<string, string | number | boolean | null>[]>>]>>, z.ZodMiniTransform<Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>, Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>>>>;
|
|
147
147
|
}, z.core.$strip>>;
|
|
148
|
-
declare const createVisitorSchema: z.ZodMiniObject<{
|
|
148
|
+
export declare const createVisitorSchema: z.ZodMiniObject<{
|
|
149
149
|
device_id: z.ZodMiniString<string>;
|
|
150
150
|
platform: z.ZodMiniEnum<{
|
|
151
151
|
android: "android";
|
|
@@ -233,7 +233,7 @@ declare const createVisitorSchema: z.ZodMiniObject<{
|
|
|
233
233
|
* @see https://support.google.com/analytics/answer/14078702
|
|
234
234
|
* @see https://support.google.com/google-ads/answer/13258081
|
|
235
235
|
*/
|
|
236
|
-
declare const userProvidedDataSchema: z.ZodMiniObject<{
|
|
236
|
+
export declare const userProvidedDataSchema: z.ZodMiniObject<{
|
|
237
237
|
email: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniEmail>, z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniEmail>>]>>;
|
|
238
238
|
phone_number: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniE164>, z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniE164>>]>>;
|
|
239
239
|
address: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
@@ -254,7 +254,7 @@ declare const userProvidedDataSchema: z.ZodMiniObject<{
|
|
|
254
254
|
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
255
255
|
}, z.core.$strip>>]>>;
|
|
256
256
|
}, z.core.$strip>;
|
|
257
|
-
declare const updateVisitorSchema: z.ZodMiniObject<{
|
|
257
|
+
export declare const updateVisitorSchema: z.ZodMiniObject<{
|
|
258
258
|
user_id: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
259
259
|
user_data: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
260
260
|
email: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniEmail>, z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniEmail>>]>>;
|
|
@@ -340,7 +340,7 @@ declare const updateVisitorSchema: z.ZodMiniObject<{
|
|
|
340
340
|
}, z.core.$strip>;
|
|
341
341
|
properties: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>>;
|
|
342
342
|
}, z.core.$strip>;
|
|
343
|
-
declare const createFeedbackSchema: z.ZodMiniObject<{
|
|
343
|
+
export declare const createFeedbackSchema: z.ZodMiniObject<{
|
|
344
344
|
name: z.ZodMiniString<string>;
|
|
345
345
|
email: z.ZodMiniEmail;
|
|
346
346
|
message: z.ZodMiniString<string>;
|
|
@@ -349,7 +349,7 @@ declare const createFeedbackSchema: z.ZodMiniObject<{
|
|
|
349
349
|
* The schema for creating a link.
|
|
350
350
|
* @see https://support.google.com/analytics/answer/10917952
|
|
351
351
|
* */
|
|
352
|
-
declare const createLinkSchema: z.ZodMiniObject<{
|
|
352
|
+
export declare const createLinkSchema: z.ZodMiniObject<{
|
|
353
353
|
url: z.ZodMiniURL;
|
|
354
354
|
utm_id: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
|
|
355
355
|
utm_source: z.ZodMiniString<string>;
|
|
@@ -361,12 +361,11 @@ declare const createLinkSchema: z.ZodMiniObject<{
|
|
|
361
361
|
utm_creative_format: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
|
|
362
362
|
utm_marketing_tactic: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string | undefined, string>>>;
|
|
363
363
|
}, z.core.$strip>;
|
|
364
|
-
type CreateTrackEventDTO = z.output<typeof createTrackEventSchema>;
|
|
365
|
-
type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;
|
|
366
|
-
type CreateLinkDTO = z.output<typeof createLinkSchema>;
|
|
367
|
-
type CreateVisitorDTO = z.output<typeof createVisitorSchema>;
|
|
368
|
-
type UserProvidedDataDTO = z.output<typeof userProvidedDataSchema>;
|
|
369
|
-
type UpdateVisitorDTO = z.output<typeof updateVisitorSchema>;
|
|
364
|
+
export type CreateTrackEventDTO = z.output<typeof createTrackEventSchema>;
|
|
365
|
+
export type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;
|
|
366
|
+
export type CreateLinkDTO = z.output<typeof createLinkSchema>;
|
|
367
|
+
export type CreateVisitorDTO = z.output<typeof createVisitorSchema>;
|
|
368
|
+
export type UserProvidedDataDTO = z.output<typeof userProvidedDataSchema>;
|
|
369
|
+
export type UpdateVisitorDTO = z.output<typeof updateVisitorSchema>;
|
|
370
370
|
//#endregion
|
|
371
|
-
export { ALL_ENVIRONMENTS, ALL_PLATFORMS, CreateFeedbackDTO, CreateLinkDTO, CreateTrackEventDTO, CreateVisitorDTO, UpdateVisitorDTO, UserProvidedDataDTO, createFeedbackSchema, createLinkSchema, createTrackEventSchema, createVisitorSchema, propertiesSchema, tagsSchema, updateVisitorSchema, userProvidedDataSchema };
|
|
372
371
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/schema/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/schema/index.ts"],"mappings":";;qBAmFa;qBAUA;qBAEA,YAAU,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6ErB,EAAA,KAAA;qBAEW,kBAAgB,EAAA,gBAAA,EAAA,YAAA,EAAA,cAAA,EAAA,uBAAA,EAAA,uBAAA,EAAA,YAAA,EAAA,uBAAA,EAAA,mCAAA,EAAA,uBAAA,EAAA,yBAAA,EAAA,aAAA,EAAA,YAAA,EAAA,aAAA,EAAA,YAAA,EAAA,cAAA,EAAA,uBAAA,EAAA,uBAAA,EAAA,YAAA,EAAA,uBAAA,EAAA,mCAAA,EAAA,uBAAA,EAAA,yBAAA,EAAA,gBAAA,EAAA,iBAAA,kDAAA,qDAAA,EAAA,iBAAA,oDAAA,yDAAA,EAAA,iBAAA,2CAAA,4DAAA,2CAAA;qBAehB,wBAAsB,EAAA,aAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAWE,EAAA,KAAA;qBAExB,qBAAmB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM9B,EAAA,KAAA;;;;;;;;;;;qBA6BW,wBAAsB,EAAA;;;;;;;;;;;;;;;;;;;;GAIjC,EAAA,KAAA;qBAEW,qBAAmB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAK9B,EAAA,KAAA;qBAEW,sBAAoB,EAAA;;;;GAI/B,EAAA,KAAA;;;;;qBAWW,kBAAgB,EAAA;;;;;;;;;;;GA+C3B,EAAA,KAAA;YAEU,sBAAsB,EAAE,cAAc;YACtC,oBAAoB,EAAE,cAAc;YACpC,gBAAgB,EAAE,cAAc;YAChC,mBAAmB,EAAE,cAAc;YACnC,sBAAsB,EAAE,cAAc;YACtC,mBAAmB,EAAE,cAAc"}
|
|
@@ -5,16 +5,15 @@ import { Platform } from "../track/types.cjs";
|
|
|
5
5
|
* own name and its own spelling: Meta `action_source`, Reddit `action_source`, OpenAI
|
|
6
6
|
* `action_source`. Each sender maps this to its vendor vocabulary.
|
|
7
7
|
*/
|
|
8
|
-
type ActionSource = 'web' | 'app';
|
|
8
|
+
export type ActionSource = 'web' | 'app';
|
|
9
9
|
/**
|
|
10
10
|
* What a caller may state explicitly. `offline` is deliberately absent from the derived set:
|
|
11
11
|
* it describes how a conversion was collected — in store, imported from a CRM, taken over the
|
|
12
12
|
* phone — not what device it came from, so no platform implies it. Such events are built by a
|
|
13
13
|
* backend rather than reported by a client SDK, which is why the sender takes it as an argument.
|
|
14
14
|
*/
|
|
15
|
-
type EventActionSource = ActionSource | 'offline';
|
|
15
|
+
export type EventActionSource = ActionSource | 'offline';
|
|
16
16
|
/** An explicit action source always wins; otherwise it is derived from the event's platform. */
|
|
17
|
-
declare function resolveActionSource(platform: Platform, actionSource?: EventActionSource): EventActionSource | undefined;
|
|
17
|
+
export declare function resolveActionSource(platform: Platform, actionSource?: EventActionSource): EventActionSource | undefined;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { ActionSource, EventActionSource, resolveActionSource };
|
|
20
19
|
//# sourceMappingURL=action-source.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-source.d.cts","names":[],"sources":["../../src/server/action-source.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"action-source.d.cts","names":[],"sources":["../../src/server/action-source.ts"],"mappings":";;;;;;;YAOY;;;;;;;YAQA,oBAAoB;;wBAyBhB,oBACd,UAAU,UACV,eAAe,oBACd"}
|
|
@@ -5,16 +5,15 @@ import { Platform } from "../track/types.mjs";
|
|
|
5
5
|
* own name and its own spelling: Meta `action_source`, Reddit `action_source`, OpenAI
|
|
6
6
|
* `action_source`. Each sender maps this to its vendor vocabulary.
|
|
7
7
|
*/
|
|
8
|
-
type ActionSource = 'web' | 'app';
|
|
8
|
+
export type ActionSource = 'web' | 'app';
|
|
9
9
|
/**
|
|
10
10
|
* What a caller may state explicitly. `offline` is deliberately absent from the derived set:
|
|
11
11
|
* it describes how a conversion was collected — in store, imported from a CRM, taken over the
|
|
12
12
|
* phone — not what device it came from, so no platform implies it. Such events are built by a
|
|
13
13
|
* backend rather than reported by a client SDK, which is why the sender takes it as an argument.
|
|
14
14
|
*/
|
|
15
|
-
type EventActionSource = ActionSource | 'offline';
|
|
15
|
+
export type EventActionSource = ActionSource | 'offline';
|
|
16
16
|
/** An explicit action source always wins; otherwise it is derived from the event's platform. */
|
|
17
|
-
declare function resolveActionSource(platform: Platform, actionSource?: EventActionSource): EventActionSource | undefined;
|
|
17
|
+
export declare function resolveActionSource(platform: Platform, actionSource?: EventActionSource): EventActionSource | undefined;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { ActionSource, EventActionSource, resolveActionSource };
|
|
20
19
|
//# sourceMappingURL=action-source.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-source.d.mts","names":[],"sources":["../../src/server/action-source.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"action-source.d.mts","names":[],"sources":["../../src/server/action-source.ts"],"mappings":";;;;;;;YAOY;;;;;;;YAQA,oBAAoB;;wBAyBhB,oBACd,UAAU,UACV,eAAe,oBACd"}
|
|
@@ -5,8 +5,8 @@ import { TrackEvent, UserProvidedData } from "../track/types.cjs";
|
|
|
5
5
|
* events upload, everything else is skipped silently. In the hybrid setup this is the id of
|
|
6
6
|
* the SAME conversion action the gtag tag reports to.
|
|
7
7
|
*/
|
|
8
|
-
type GoogleAdsConversionConfig = Record<Lowercase<string>, number | string>;
|
|
9
|
-
interface GoogleAdsAuth {
|
|
8
|
+
export type GoogleAdsConversionConfig = Record<Lowercase<string>, number | string>;
|
|
9
|
+
export interface GoogleAdsAuth {
|
|
10
10
|
/** OAuth2 access token with the `datamanager` scope. Short-lived; the caller refreshes it. */
|
|
11
11
|
accessToken: string;
|
|
12
12
|
/** The Google Ads account the conversion actions live in. Dashes are tolerated: '123-456-7890'. */
|
|
@@ -18,11 +18,11 @@ interface GoogleAdsAuth {
|
|
|
18
18
|
* EEA/UK/CH consent, applied request-wide. Google drops EEA conversions without granted
|
|
19
19
|
* `adUserData` from bidding, so a host with consent signals should pass them.
|
|
20
20
|
*/
|
|
21
|
-
interface GoogleAdsConsent {
|
|
21
|
+
export interface GoogleAdsConsent {
|
|
22
22
|
adUserData?: 'CONSENT_GRANTED' | 'CONSENT_DENIED' | 'CONSENT_STATUS_UNSPECIFIED';
|
|
23
23
|
adPersonalization?: 'CONSENT_GRANTED' | 'CONSENT_DENIED' | 'CONSENT_STATUS_UNSPECIFIED';
|
|
24
24
|
}
|
|
25
|
-
interface GoogleAdsConversionsOptions {
|
|
25
|
+
export interface GoogleAdsConversionsOptions {
|
|
26
26
|
/** Validates the payload server-side without recording conversions. */
|
|
27
27
|
validateOnly?: boolean;
|
|
28
28
|
consent?: GoogleAdsConsent;
|
|
@@ -32,9 +32,9 @@ interface GoogleAdsConversionsOptions {
|
|
|
32
32
|
* username's dots and everything from '+' on are removed; for every other domain they are kept.
|
|
33
33
|
* https://developers.google.com/data-manager/api/devguides/format-data
|
|
34
34
|
*/
|
|
35
|
-
declare function normalizeEmail(input: string): string;
|
|
35
|
+
export declare function normalizeEmail(input: string): string;
|
|
36
36
|
/** One entry of the `events` array. Field names are the REST (camelCase) spellings. */
|
|
37
|
-
interface DataManagerEvent {
|
|
37
|
+
export interface DataManagerEvent {
|
|
38
38
|
destinationReferences: string[];
|
|
39
39
|
transactionId: string;
|
|
40
40
|
/** RFC 3339 — `created_at` as stored, unlike the legacy API's bespoke format. */
|
|
@@ -58,8 +58,8 @@ interface DataManagerEvent {
|
|
|
58
58
|
* the legacy upload, an event with no click id at all is still worth sending when it carries
|
|
59
59
|
* user identifiers — that is the enhanced-conversions match path.
|
|
60
60
|
*/
|
|
61
|
-
declare function getDataManagerEvent(event: TrackEvent<any>, config: GoogleAdsConversionConfig, data?: UserProvidedData): DataManagerEvent | undefined;
|
|
62
|
-
interface DataManagerResponse {
|
|
61
|
+
export declare function getDataManagerEvent(event: TrackEvent<any>, config: GoogleAdsConversionConfig, data?: UserProvidedData): DataManagerEvent | undefined;
|
|
62
|
+
export interface DataManagerResponse {
|
|
63
63
|
requestId?: string;
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
@@ -69,7 +69,6 @@ interface DataManagerResponse {
|
|
|
69
69
|
* the builder is strict about only emitting events the API can accept. A batch beyond the
|
|
70
70
|
* 2000-event request cap goes out as sequential requests; the first response is returned.
|
|
71
71
|
*/
|
|
72
|
-
declare function sendEvents(auth: GoogleAdsAuth, config: GoogleAdsConversionConfig, events: TrackEvent<any>[], data?: UserProvidedData, options?: GoogleAdsConversionsOptions): Promise<DataManagerResponse | undefined>;
|
|
72
|
+
export declare function sendEvents(auth: GoogleAdsAuth, config: GoogleAdsConversionConfig, events: TrackEvent<any>[], data?: UserProvidedData, options?: GoogleAdsConversionsOptions): Promise<DataManagerResponse | undefined>;
|
|
73
73
|
//#endregion
|
|
74
|
-
export { DataManagerEvent, DataManagerResponse, GoogleAdsAuth, GoogleAdsConsent, GoogleAdsConversionConfig, GoogleAdsConversionsOptions, getDataManagerEvent, normalizeEmail, sendEvents };
|
|
75
74
|
//# sourceMappingURL=google-data-manager.d.cts.map
|