@shware/analytics 15.0.0 → 16.0.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/README.md +90 -37
- package/dist/native/fbsdk.cjs +45 -1
- package/dist/native/fbsdk.cjs.map +1 -1
- package/dist/native/fbsdk.d.cts +23 -1
- package/dist/native/fbsdk.d.cts.map +1 -1
- package/dist/native/fbsdk.d.mts +23 -1
- package/dist/native/fbsdk.d.mts.map +1 -1
- package/dist/native/fbsdk.mjs +44 -2
- package/dist/native/fbsdk.mjs.map +1 -1
- package/dist/native/firebase.cjs +27 -0
- package/dist/native/firebase.cjs.map +1 -1
- package/dist/native/firebase.d.cts +11 -0
- package/dist/native/firebase.d.cts.map +1 -1
- package/dist/native/firebase.d.mts +11 -0
- package/dist/native/firebase.d.mts.map +1 -1
- package/dist/native/firebase.mjs +27 -2
- package/dist/native/firebase.mjs.map +1 -1
- package/dist/next/index.cjs +10 -123
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.cts +2 -31
- package/dist/next/index.d.cts.map +1 -1
- package/dist/next/index.d.mts +2 -31
- package/dist/next/index.d.mts.map +1 -1
- package/dist/next/index.mjs +10 -123
- package/dist/next/index.mjs.map +1 -1
- package/dist/react/index.cjs +45 -0
- package/dist/react/index.cjs.map +1 -0
- package/dist/react/index.d.cts +15 -0
- package/dist/react/index.d.cts.map +1 -0
- package/dist/react/index.d.mts +15 -0
- package/dist/react/index.d.mts.map +1 -0
- package/dist/react/index.mjs +43 -0
- package/dist/react/index.mjs.map +1 -0
- package/dist/react/use-feature-flag.cjs +23 -0
- package/dist/react/use-feature-flag.cjs.map +1 -0
- package/dist/react/use-feature-flag.d.cts +10 -0
- package/dist/react/use-feature-flag.d.cts.map +1 -0
- package/dist/react/use-feature-flag.d.mts +10 -0
- package/dist/react/use-feature-flag.d.mts.map +1 -0
- package/dist/react/use-feature-flag.mjs +22 -0
- package/dist/react/use-feature-flag.mjs.map +1 -0
- package/dist/server/reddit-conversions-api.d.cts +1 -1
- package/dist/server/reddit-conversions-api.d.mts +1 -1
- package/dist/setup/index.cjs +4 -4
- package/dist/setup/index.cjs.map +1 -1
- package/dist/setup/index.d.cts +16 -6
- package/dist/setup/index.d.cts.map +1 -1
- package/dist/setup/index.d.mts +16 -6
- package/dist/setup/index.d.mts.map +1 -1
- package/dist/setup/index.mjs +4 -4
- package/dist/setup/index.mjs.map +1 -1
- package/dist/tanstack/index.cjs +0 -2
- package/dist/tanstack/index.d.cts +1 -2
- package/dist/tanstack/index.d.mts +1 -2
- package/dist/tanstack/index.mjs +1 -3
- package/dist/third-parties/analytics-props.cjs +28 -0
- package/dist/third-parties/analytics-props.cjs.map +1 -0
- package/dist/third-parties/analytics-props.d.cts +23 -0
- package/dist/third-parties/analytics-props.d.cts.map +1 -0
- package/dist/third-parties/analytics-props.d.mts +23 -0
- package/dist/third-parties/analytics-props.d.mts.map +1 -0
- package/dist/third-parties/analytics-props.mjs +26 -0
- package/dist/third-parties/analytics-props.mjs.map +1 -0
- package/dist/third-parties/google-analytics.cjs +32 -0
- package/dist/third-parties/google-analytics.cjs.map +1 -1
- package/dist/third-parties/google-analytics.d.cts +11 -1
- package/dist/third-parties/google-analytics.d.cts.map +1 -1
- package/dist/third-parties/google-analytics.d.mts +11 -1
- package/dist/third-parties/google-analytics.d.mts.map +1 -1
- package/dist/third-parties/google-analytics.mjs +32 -1
- package/dist/third-parties/google-analytics.mjs.map +1 -1
- package/dist/third-parties/index.cjs +16 -0
- package/dist/third-parties/index.d.cts +9 -7
- package/dist/third-parties/index.d.mts +9 -7
- package/dist/third-parties/index.mjs +9 -7
- package/dist/third-parties/integration.cjs +39 -0
- package/dist/third-parties/integration.cjs.map +1 -0
- package/dist/third-parties/integration.d.cts +57 -0
- package/dist/third-parties/integration.d.cts.map +1 -0
- package/dist/third-parties/integration.d.mts +57 -0
- package/dist/third-parties/integration.d.mts.map +1 -0
- package/dist/third-parties/integration.mjs +37 -0
- package/dist/third-parties/integration.mjs.map +1 -0
- package/dist/third-parties/linkedin-insight-tag.cjs +33 -0
- package/dist/third-parties/linkedin-insight-tag.cjs.map +1 -1
- package/dist/third-parties/linkedin-insight-tag.d.cts +12 -8
- package/dist/third-parties/linkedin-insight-tag.d.cts.map +1 -1
- package/dist/third-parties/linkedin-insight-tag.d.mts +12 -8
- package/dist/third-parties/linkedin-insight-tag.d.mts.map +1 -1
- package/dist/third-parties/linkedin-insight-tag.mjs +33 -1
- package/dist/third-parties/linkedin-insight-tag.mjs.map +1 -1
- package/dist/third-parties/meta-pixel.cjs +34 -0
- package/dist/third-parties/meta-pixel.cjs.map +1 -1
- package/dist/third-parties/meta-pixel.d.cts +5 -0
- package/dist/third-parties/meta-pixel.d.cts.map +1 -1
- package/dist/third-parties/meta-pixel.d.mts +5 -0
- package/dist/third-parties/meta-pixel.d.mts.map +1 -1
- package/dist/third-parties/meta-pixel.mjs +34 -1
- package/dist/third-parties/meta-pixel.mjs.map +1 -1
- package/dist/third-parties/microsoft-uet.cjs +49 -0
- package/dist/third-parties/microsoft-uet.cjs.map +1 -1
- package/dist/third-parties/microsoft-uet.d.cts +29 -0
- package/dist/third-parties/microsoft-uet.d.cts.map +1 -1
- package/dist/third-parties/microsoft-uet.d.mts +29 -0
- package/dist/third-parties/microsoft-uet.d.mts.map +1 -1
- package/dist/third-parties/microsoft-uet.mjs +48 -1
- package/dist/third-parties/microsoft-uet.mjs.map +1 -1
- package/dist/third-parties/openai-pixel.cjs +31 -0
- package/dist/third-parties/openai-pixel.cjs.map +1 -1
- package/dist/third-parties/openai-pixel.d.cts +5 -0
- package/dist/third-parties/openai-pixel.d.cts.map +1 -1
- package/dist/third-parties/openai-pixel.d.mts +5 -0
- package/dist/third-parties/openai-pixel.d.mts.map +1 -1
- package/dist/third-parties/openai-pixel.mjs +31 -1
- package/dist/third-parties/openai-pixel.mjs.map +1 -1
- package/dist/third-parties/posthog.cjs +97 -4
- package/dist/third-parties/posthog.cjs.map +1 -1
- package/dist/third-parties/posthog.d.cts +56 -1
- package/dist/third-parties/posthog.d.cts.map +1 -1
- package/dist/third-parties/posthog.d.mts +56 -1
- package/dist/third-parties/posthog.d.mts.map +1 -1
- package/dist/third-parties/posthog.mjs +91 -2
- package/dist/third-parties/posthog.mjs.map +1 -1
- package/dist/third-parties/reddit-pixel.cjs +32 -0
- package/dist/third-parties/reddit-pixel.cjs.map +1 -1
- package/dist/third-parties/reddit-pixel.d.cts +5 -0
- package/dist/third-parties/reddit-pixel.d.cts.map +1 -1
- package/dist/third-parties/reddit-pixel.d.mts +5 -0
- package/dist/third-parties/reddit-pixel.d.mts.map +1 -1
- package/dist/third-parties/reddit-pixel.mjs +32 -1
- package/dist/third-parties/reddit-pixel.mjs.map +1 -1
- package/dist/track/fbq.cjs +1 -1
- package/dist/track/fbq.cjs.map +1 -1
- package/dist/track/fbq.mjs +1 -1
- package/dist/track/fbq.mjs.map +1 -1
- package/dist/track/index.cjs +7 -7
- package/dist/track/index.cjs.map +1 -1
- package/dist/track/index.d.cts.map +1 -1
- package/dist/track/index.d.mts.map +1 -1
- package/dist/track/index.mjs +7 -7
- package/dist/track/index.mjs.map +1 -1
- package/dist/visitor/index.cjs +36 -20
- package/dist/visitor/index.cjs.map +1 -1
- package/dist/visitor/index.d.cts +9 -6
- package/dist/visitor/index.d.cts.map +1 -1
- package/dist/visitor/index.d.mts +9 -6
- package/dist/visitor/index.d.mts.map +1 -1
- package/dist/visitor/index.mjs +36 -20
- package/dist/visitor/index.mjs.map +1 -1
- package/package.json +11 -24
- package/dist/react-router/index.cjs +0 -160
- package/dist/react-router/index.cjs.map +0 -1
- package/dist/react-router/index.d.cts +0 -22
- package/dist/react-router/index.d.cts.map +0 -1
- package/dist/react-router/index.d.mts +0 -22
- package/dist/react-router/index.d.mts.map +0 -1
- package/dist/react-router/index.mjs +0 -159
- package/dist/react-router/index.mjs.map +0 -1
- package/dist/tanstack/analytics.cjs +0 -184
- package/dist/tanstack/analytics.cjs.map +0 -1
- package/dist/tanstack/analytics.d.cts +0 -33
- package/dist/tanstack/analytics.d.cts.map +0 -1
- package/dist/tanstack/analytics.d.mts +0 -33
- package/dist/tanstack/analytics.d.mts.map +0 -1
- package/dist/tanstack/analytics.mjs +0 -183
- package/dist/tanstack/analytics.mjs.map +0 -1
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { track } from "../track/index.mjs";
|
|
2
|
-
import { useOutboundClickAnalytics } from "../hooks/use-outbound-click-analytics.mjs";
|
|
3
|
-
import { useReportWebVitals } from "../hooks/use-report-web-vitals.mjs";
|
|
4
|
-
import { useUETIdSync } from "../hooks/use-uet-id-sync.mjs";
|
|
5
|
-
import { useWebAnalytics } from "../hooks/use-web-analytics.mjs";
|
|
6
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { useLocation } from "@tanstack/react-router";
|
|
8
|
-
// src/tanstack/analytics.tsx
|
|
9
|
-
function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, openaiPixelId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, uetConsent = { ad_storage: "granted" }, hotjarId, facebookAppId, reportWebVitals = true }) {
|
|
10
|
-
const { pathname, searchStr } = useLocation();
|
|
11
|
-
useWebAnalytics(pathname, searchStr);
|
|
12
|
-
useOutboundClickAnalytics();
|
|
13
|
-
useUETIdSync(uetCustomerId);
|
|
14
|
-
useReportWebVitals((metric) => {
|
|
15
|
-
if (!reportWebVitals) return;
|
|
16
|
-
const properties = {
|
|
17
|
-
value: metric.delta,
|
|
18
|
-
metric_id: metric.id,
|
|
19
|
-
metric_value: metric.value,
|
|
20
|
-
metric_delta: metric.delta,
|
|
21
|
-
metric_rating: metric.rating,
|
|
22
|
-
metric_navigation_type: metric.navigationType,
|
|
23
|
-
non_interaction: true
|
|
24
|
-
};
|
|
25
|
-
track(metric.name, properties);
|
|
26
|
-
});
|
|
27
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
|
-
facebookAppId && /* @__PURE__ */ jsx("meta", {
|
|
29
|
-
property: "fb:app_id",
|
|
30
|
-
content: facebookAppId
|
|
31
|
-
}),
|
|
32
|
-
gaId && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("script", {
|
|
33
|
-
async: true,
|
|
34
|
-
id: "gtag",
|
|
35
|
-
nonce,
|
|
36
|
-
src: gaSrc ?? `https://www.googletagmanager.com/gtag/js?id=${gaId}`
|
|
37
|
-
}), /* @__PURE__ */ jsx("script", {
|
|
38
|
-
async: true,
|
|
39
|
-
nonce,
|
|
40
|
-
id: "gtag-init",
|
|
41
|
-
dangerouslySetInnerHTML: { __html: `
|
|
42
|
-
window.dataLayer = window.dataLayer || [];
|
|
43
|
-
function gtag(){dataLayer.push(arguments);}
|
|
44
|
-
gtag('js', new Date());
|
|
45
|
-
gtag('config', '${gaId}'${debugMode ? " ,{ 'debug_mode': true }" : ""});
|
|
46
|
-
` }
|
|
47
|
-
})] }),
|
|
48
|
-
metaPixelId && /* @__PURE__ */ jsx("script", {
|
|
49
|
-
async: true,
|
|
50
|
-
id: "meta-pixel",
|
|
51
|
-
nonce,
|
|
52
|
-
dangerouslySetInnerHTML: { __html: `
|
|
53
|
-
!(function (f, b, e, v, n, t, s) {
|
|
54
|
-
if (f.fbq) return;
|
|
55
|
-
n = f.fbq = function () {
|
|
56
|
-
n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments);
|
|
57
|
-
};
|
|
58
|
-
if (!f._fbq) f._fbq = n;
|
|
59
|
-
n.push = n;
|
|
60
|
-
n.loaded = !0;
|
|
61
|
-
n.version = '2.0';
|
|
62
|
-
n.queue = [];
|
|
63
|
-
t = b.createElement(e);
|
|
64
|
-
t.async = !0;
|
|
65
|
-
t.src = v;
|
|
66
|
-
s = b.getElementsByTagName(e)[0];
|
|
67
|
-
s.parentNode.insertBefore(t, s);
|
|
68
|
-
})(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js');
|
|
69
|
-
fbq('init', '${metaPixelId}');
|
|
70
|
-
fbq('track', 'PageView');` }
|
|
71
|
-
}),
|
|
72
|
-
openaiPixelId && /* @__PURE__ */ jsx("script", {
|
|
73
|
-
async: true,
|
|
74
|
-
id: "openai-pixel",
|
|
75
|
-
nonce,
|
|
76
|
-
dangerouslySetInnerHTML: { __html: `
|
|
77
|
-
(function (w, d, s, u) {
|
|
78
|
-
if (w.oaiq) return;
|
|
79
|
-
var q = function () {
|
|
80
|
-
q.q.push(arguments);
|
|
81
|
-
};
|
|
82
|
-
q.q = [];
|
|
83
|
-
w.oaiq = q;
|
|
84
|
-
var js = d.createElement(s);
|
|
85
|
-
js.async = true;
|
|
86
|
-
js.src = u;
|
|
87
|
-
var f = d.getElementsByTagName(s)[0];
|
|
88
|
-
f.parentNode.insertBefore(js, f);
|
|
89
|
-
})(window, document, "script", "https://bzrcdn.openai.com/sdk/oaiq.min.js");
|
|
90
|
-
|
|
91
|
-
oaiq("init", { pixelId: "${openaiPixelId}" });
|
|
92
|
-
oaiq("measure", "page_viewed", { type: "contents" });
|
|
93
|
-
` }
|
|
94
|
-
}),
|
|
95
|
-
redditPixelId && /* @__PURE__ */ jsx("script", {
|
|
96
|
-
async: true,
|
|
97
|
-
id: "reddit-pixel",
|
|
98
|
-
nonce,
|
|
99
|
-
dangerouslySetInnerHTML: { __html: `
|
|
100
|
-
!function(w,d) {
|
|
101
|
-
if(!w.rdt) {
|
|
102
|
-
var p = w.rdt = function() {
|
|
103
|
-
p.sendEvent ? p.sendEvent.apply(p,arguments) : p.callQueue.push(arguments)
|
|
104
|
-
};
|
|
105
|
-
p.callQueue = [];
|
|
106
|
-
var t = d.createElement("script");
|
|
107
|
-
t.src = "https://www.redditstatic.com/ads/pixel.js";
|
|
108
|
-
t.async = !0;
|
|
109
|
-
var s = d.getElementsByTagName("script")[0];
|
|
110
|
-
s.parentNode.insertBefore(t,s)
|
|
111
|
-
}
|
|
112
|
-
}(window, document);
|
|
113
|
-
rdt('init', '${redditPixelId}');
|
|
114
|
-
rdt('track', 'PageVisit');` }
|
|
115
|
-
}),
|
|
116
|
-
linkedInPartnerId && /* @__PURE__ */ jsx("script", {
|
|
117
|
-
async: true,
|
|
118
|
-
id: "linkedin-insight-tag",
|
|
119
|
-
nonce,
|
|
120
|
-
dangerouslySetInnerHTML: { __html: `
|
|
121
|
-
_linkedin_partner_id = "${linkedInPartnerId}";
|
|
122
|
-
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
|
|
123
|
-
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
|
|
124
|
-
|
|
125
|
-
(function(l) {
|
|
126
|
-
if (!l){
|
|
127
|
-
window.lintrk = function(a,b){
|
|
128
|
-
window.lintrk.q.push([a,b])
|
|
129
|
-
};
|
|
130
|
-
window.lintrk.q=[]
|
|
131
|
-
}
|
|
132
|
-
var s = document.getElementsByTagName("script")[0];
|
|
133
|
-
var b = document.createElement("script");
|
|
134
|
-
b.type = "text/javascript";b.async = true;
|
|
135
|
-
b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
|
|
136
|
-
s.parentNode.insertBefore(b, s);
|
|
137
|
-
})(window.lintrk);
|
|
138
|
-
` }
|
|
139
|
-
}),
|
|
140
|
-
uetTagId && /* @__PURE__ */ jsx("script", {
|
|
141
|
-
async: true,
|
|
142
|
-
id: "uet-tag",
|
|
143
|
-
nonce,
|
|
144
|
-
dangerouslySetInnerHTML: { __html: `
|
|
145
|
-
(function (w, d, t, u, o) {
|
|
146
|
-
w[u] = w[u] || [], o.ts = (new Date).getTime();
|
|
147
|
-
${uetConsent ? `w[u].push("consent", "default", ${JSON.stringify(uetConsent)});` : ""}
|
|
148
|
-
var n = d.createElement(t);
|
|
149
|
-
n.src = "https://bat.bing.net/bat.js?ti=" + o.ti + ("uetq" != u ? "&q=" + u : ""),
|
|
150
|
-
n.async = 1, n.onload = n.onreadystatechange = function() {
|
|
151
|
-
var s = this.readyState;
|
|
152
|
-
s && "loaded" !== s && "complete" !== s ||
|
|
153
|
-
(o.q = w[u], w[u] = new UET(o), w[u].push("pageLoad"),
|
|
154
|
-
n.onload = n.onreadystatechange = null)
|
|
155
|
-
};
|
|
156
|
-
var i = d.getElementsByTagName(t)[0];
|
|
157
|
-
i.parentNode.insertBefore(n, i);
|
|
158
|
-
})(window, document, "script", "uetq", {
|
|
159
|
-
ti: "${uetTagId}",
|
|
160
|
-
enableAutoSpaTracking: true
|
|
161
|
-
});
|
|
162
|
-
` }
|
|
163
|
-
}),
|
|
164
|
-
hotjarId && /* @__PURE__ */ jsx("script", {
|
|
165
|
-
async: true,
|
|
166
|
-
id: "hotjar",
|
|
167
|
-
nonce,
|
|
168
|
-
dangerouslySetInnerHTML: { __html: `
|
|
169
|
-
(function(h,o,t,j,a,r){
|
|
170
|
-
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
|
|
171
|
-
h._hjSettings={hjid:${hotjarId},hjsv:6};
|
|
172
|
-
a=o.getElementsByTagName('head')[0];
|
|
173
|
-
r=o.createElement('script');r.async=1;
|
|
174
|
-
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
|
|
175
|
-
a.appendChild(r);
|
|
176
|
-
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
|
|
177
|
-
` }
|
|
178
|
-
})
|
|
179
|
-
] });
|
|
180
|
-
}
|
|
181
|
-
export { Analytics };
|
|
182
|
-
|
|
183
|
-
//# sourceMappingURL=analytics.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.mjs","names":[],"sources":["../../src/tanstack/analytics.tsx"],"sourcesContent":["import { useLocation } from '@tanstack/react-router';\nimport { useOutboundClickAnalytics } from '../hooks/use-outbound-click-analytics';\nimport { useReportWebVitals } from '../hooks/use-report-web-vitals';\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 } from '../track/gtag';\nimport { track } from '../track/index';\nimport type { PixelId as RedditPixelId } from '../track/rdt';\nimport type { UETConsent } from '../track/uetq';\n\ninterface Props {\n gaId?: GaId;\n gaSrc?: string;\n metaPixelId?: MetaPixelId;\n openaiPixelId?: string;\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 /**\n * UET consent mode default, pushed inside the tag snippet so bat.js reads it before the first\n * page load. Defaults to `ad_storage: granted`, which is how the tag behaves without a signal,\n * so Microsoft stops flagging EEA/UK/CH events as missing consent. Sites with a consent banner\n * pass `{ ad_storage: 'denied' }` and send `update` with `setUETConsent` when the visitor\n * decides; `false` pushes no default.\n * https://help.ads.microsoft.com/#apex/ads/en/60119/1\n */\n uetConsent?: UETConsent | false;\n hotjarId?: `${number}`;\n facebookAppId?: string;\n nonce?: string;\n debugMode?: boolean;\n reportWebVitals?: boolean;\n}\n\nexport function Analytics({\n gaId,\n gaSrc,\n nonce,\n debugMode,\n metaPixelId,\n openaiPixelId,\n redditPixelId,\n linkedInPartnerId,\n uetTagId,\n uetCustomerId,\n uetConsent = { ad_storage: 'granted' },\n hotjarId,\n facebookAppId,\n reportWebVitals = true,\n}: Props) {\n const { pathname, searchStr } = useLocation();\n useWebAnalytics(pathname, searchStr);\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 {facebookAppId && <meta property=\"fb:app_id\" content={facebookAppId} />}\n {gaId && (\n <>\n <script\n async\n id=\"gtag\"\n nonce={nonce}\n src={gaSrc ?? `https://www.googletagmanager.com/gtag/js?id=${gaId}`}\n />\n <script\n async\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 async\n id=\"meta-pixel\"\n nonce={nonce}\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 {openaiPixelId && (\n <script\n async\n id=\"openai-pixel\"\n nonce={nonce}\n dangerouslySetInnerHTML={{\n __html: `\n (function (w, d, s, u) {\n if (w.oaiq) return;\n var q = function () {\n q.q.push(arguments);\n };\n q.q = [];\n w.oaiq = q;\n var js = d.createElement(s);\n js.async = true;\n js.src = u;\n var f = d.getElementsByTagName(s)[0];\n f.parentNode.insertBefore(js, f);\n })(window, document, \"script\", \"https://bzrcdn.openai.com/sdk/oaiq.min.js\");\n\n oaiq(\"init\", { pixelId: \"${openaiPixelId}\" });\n oaiq(\"measure\", \"page_viewed\", { type: \"contents\" });\n `,\n }}\n />\n )}\n {redditPixelId && (\n <script\n async\n id=\"reddit-pixel\"\n nonce={nonce}\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 async\n id=\"linkedin-insight-tag\"\n nonce={nonce}\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 async\n id=\"uet-tag\"\n nonce={nonce}\n dangerouslySetInnerHTML={{\n __html: `\n (function (w, d, t, u, o) {\n w[u] = w[u] || [], o.ts = (new Date).getTime();\n ${uetConsent ? `w[u].push(\"consent\", \"default\", ${JSON.stringify(uetConsent)});` : ''}\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 async\n id=\"hotjar\"\n nonce={nonce}\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":";;;;;;;;AAsCA,SAAgB,UAAU,EACxB,MACA,OACA,OACA,WACA,aACA,eACA,eACA,mBACA,UACA,eACA,aAAa,EAAE,YAAY,UAAU,GACrC,UACA,eACA,kBAAkB,QACV;CACR,MAAM,EAAE,UAAU,cAAc,YAAY;CAC5C,gBAAgB,UAAU,SAAS;CACnC,0BAA0B;CAC1B,aAAa,aAAa;CAE1B,oBAAoB,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,MAAM,OAAO,MAAM,UAAU;CAC/B,CAAC;CAED,OACE,qBAAA,UAAA,EAAA,UAAA;EACG,iBAAiB,oBAAC,QAAD;GAAM,UAAS;GAAY,SAAS;EAAgB,CAAA;EACrE,QACC,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,UAAD;GACE,OAAA;GACA,IAAG;GACI;GACP,KAAK,SAAS,+CAA+C;EAC9D,CAAA,GACD,oBAAC,UAAD;GACE,OAAA;GACO;GACP,IAAG;GACH,yBAAyB,EACvB,QAAQ;;;;gCAIU,KAAK,GAAG,YAAY,6BAA6B,GAAG;cAExE;EACD,CAAA,CACD,EAAA,CAAA;EAEH,eACC,oBAAC,UAAD;GACE,OAAA;GACA,IAAG;GACI;GACP,yBAAyB,EACvB,QAAQ;;;;;;;;;;;;;;;;;2BAiBO,YAAY;uCAE7B;EACD,CAAA;EAEF,iBACC,oBAAC,UAAD;GACE,OAAA;GACA,IAAG;GACI;GACP,yBAAyB,EACvB,QAAQ;;;;;;;;;;;;;;;2CAeuB,cAAc;;cAG/C;EACD,CAAA;EAEF,iBACC,oBAAC,UAAD;GACE,OAAA;GACA,IAAG;GACI;GACP,yBAAyB,EACvB,QAAQ;;;;;;;;;;;;;;2BAcO,cAAc;wCAE/B;EACD,CAAA;EAEF,qBACC,oBAAC,UAAD;GACE,OAAA;GACA,IAAG;GACI;GACP,yBAAyB,EACvB,QAAQ;sCACkB,kBAAkB;;;;;;;;;;;;;;;;;cAkB9C;EACD,CAAA;EAEF,YACC,oBAAC,UAAD;GACE,OAAA;GACA,IAAG;GACI;GACP,yBAAyB,EACvB,QAAQ;;;kBAGF,aAAa,mCAAmC,KAAK,UAAU,UAAU,EAAE,MAAM,GAAG;;;;;;;;;;;;uBAY/E,SAAS;;;cAItB;EACD,CAAA;EAEF,YACC,oBAAC,UAAD;GACE,OAAA;GACA,IAAG;GACI;GACP,yBAAyB,EACvB,QAAQ;;;oCAGgB,SAAS;;;;;;cAOnC;EACD,CAAA;CAEH,EAAA,CAAA;AAEN"}
|