@jmp-technologies/analytics 0.1.27 → 0.1.32
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/astro/client.cjs +256 -11
- package/dist/astro/client.cjs.map +1 -1
- package/dist/astro/client.d.cts +2 -2
- package/dist/astro/client.d.ts +2 -2
- package/dist/astro/client.js +2 -2
- package/dist/astro/content.cjs +308 -13
- package/dist/astro/content.cjs.map +1 -1
- package/dist/astro/content.d.cts +12 -3
- package/dist/astro/content.d.ts +12 -3
- package/dist/astro/content.js +9 -3
- package/dist/astro/integration.cjs +228 -10
- package/dist/astro/integration.cjs.map +1 -1
- package/dist/astro/integration.js +3 -3
- package/dist/astro/middleware.cjs +2 -1
- package/dist/astro/middleware.cjs.map +1 -1
- package/dist/astro/middleware.d.cts +2 -2
- package/dist/astro/middleware.d.ts +2 -2
- package/dist/astro/middleware.js +2 -2
- package/dist/astro/register.cjs +228 -10
- package/dist/astro/register.cjs.map +1 -1
- package/dist/astro/register.js +3 -3
- package/dist/{chunk-KZ4WVDGL.js → chunk-7623G3XL.js} +3 -3
- package/dist/{chunk-A4RRTY5D.js → chunk-AIFJ7DVO.js} +3 -2
- package/dist/{chunk-A4RRTY5D.js.map → chunk-AIFJ7DVO.js.map} +1 -1
- package/dist/{chunk-YCVHRMM6.js → chunk-G5BMWPQ6.js} +2 -3
- package/dist/{chunk-YCVHRMM6.js.map → chunk-G5BMWPQ6.js.map} +1 -1
- package/dist/{chunk-HODG4NJQ.js → chunk-HFLU7HQE.js} +2 -2
- package/dist/{chunk-PG3IOI5O.js → chunk-HKMDWTA2.js} +53 -6
- package/dist/chunk-HKMDWTA2.js.map +1 -0
- package/dist/{chunk-DNYJF7BG.js → chunk-KPTMZQCY.js} +3 -3
- package/dist/{chunk-FNWE2DT5.js → chunk-NDSPSAWQ.js} +18 -8
- package/dist/chunk-NDSPSAWQ.js.map +1 -0
- package/dist/{chunk-UVYF33XE.js → chunk-NI7R6QZQ.js} +293 -13
- package/dist/chunk-NI7R6QZQ.js.map +1 -0
- package/dist/chunk-RI3KKDPX.js +75 -0
- package/dist/chunk-RI3KKDPX.js.map +1 -0
- package/dist/{create-jmp-analytics-D4Qw_d6o.d.cts → create-jmp-analytics-D1dUsqCQ.d.cts} +1 -2
- package/dist/{create-jmp-analytics-DpG5Hdl5.d.ts → create-jmp-analytics-htx2oOEf.d.ts} +1 -2
- package/dist/index.cjs +295 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +10 -2
- package/dist/next/content.cjs +310 -13
- package/dist/next/content.cjs.map +1 -1
- package/dist/next/content.d.cts +7 -5
- package/dist/next/content.d.ts +7 -5
- package/dist/next/content.js +11 -3
- package/dist/next/content.js.map +1 -1
- package/dist/next/instrumentation.cjs +228 -10
- package/dist/next/instrumentation.cjs.map +1 -1
- package/dist/next/instrumentation.js +2 -2
- package/dist/next/landing-capture-script-server.cjs +1 -2
- package/dist/next/landing-capture-script-server.cjs.map +1 -1
- package/dist/next/landing-capture-script-server.js +1 -1
- package/dist/next/landing-pages.cjs +228 -12
- package/dist/next/landing-pages.cjs.map +1 -1
- package/dist/next/landing-pages.d.cts +4 -16
- package/dist/next/landing-pages.d.ts +4 -16
- package/dist/next/landing-pages.js +13 -67
- package/dist/next/landing-pages.js.map +1 -1
- package/dist/next/locations.cjs +737 -0
- package/dist/next/locations.cjs.map +1 -0
- package/dist/next/locations.d.cts +55 -0
- package/dist/next/locations.d.ts +55 -0
- package/dist/next/locations.js +158 -0
- package/dist/next/locations.js.map +1 -0
- package/dist/next/middleware.cjs +2 -1
- package/dist/next/middleware.cjs.map +1 -1
- package/dist/next/middleware.d.cts +2 -2
- package/dist/next/middleware.d.ts +2 -2
- package/dist/next/middleware.js +2 -2
- package/dist/next/site-root-server.cjs +259 -14
- package/dist/next/site-root-server.cjs.map +1 -1
- package/dist/next/site-root-server.js +5 -5
- package/dist/next.cjs +270 -17
- package/dist/next.cjs.map +1 -1
- package/dist/next.d.cts +3 -3
- package/dist/next.d.ts +3 -3
- package/dist/next.js +4 -4
- package/dist/react.cjs +389 -136
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +3 -3
- package/dist/{site-config-UTzDG-UG.d.ts → site-config-B7USGGzu.d.cts} +22 -2
- package/dist/{site-config-CJqYnZm7.d.cts → site-config-C4bcUoLI.d.ts} +22 -2
- package/dist/{track-page-view-tX0Magkd.d.cts → track-page-view-C4TbbULE.d.cts} +1 -1
- package/dist/{track-page-view-CMAqyhD_.d.ts → track-page-view-RiB-xgIx.d.ts} +1 -1
- package/dist/{types-B-111Wht.d.ts → types-DRljY1Yy.d.cts} +92 -2
- package/dist/{types-B-111Wht.d.cts → types-DRljY1Yy.d.ts} +92 -2
- package/dist/utils-BajG58pj.d.cts +15 -0
- package/dist/utils-CHT3SQFv.d.ts +15 -0
- package/package.json +7 -2
- package/dist/chunk-FNWE2DT5.js.map +0 -1
- package/dist/chunk-PG3IOI5O.js.map +0 -1
- package/dist/chunk-UVYF33XE.js.map +0 -1
- /package/dist/{chunk-KZ4WVDGL.js.map → chunk-7623G3XL.js.map} +0 -0
- /package/dist/{chunk-HODG4NJQ.js.map → chunk-HFLU7HQE.js.map} +0 -0
- /package/dist/{chunk-DNYJF7BG.js.map → chunk-KPTMZQCY.js.map} +0 -0
|
@@ -121,6 +121,209 @@ async function getContentText(config, path) {
|
|
|
121
121
|
return text;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
// src/content/manifest.ts
|
|
125
|
+
var JMP_CONTENT_MANIFEST_VERSION = 1;
|
|
126
|
+
var TRUST_SECTIONS = /* @__PURE__ */ new Set([
|
|
127
|
+
"summary",
|
|
128
|
+
"testimonials",
|
|
129
|
+
"reviews",
|
|
130
|
+
"stats",
|
|
131
|
+
"logos",
|
|
132
|
+
"credentials"
|
|
133
|
+
]);
|
|
134
|
+
function normalizeKey(value) {
|
|
135
|
+
return value.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
136
|
+
}
|
|
137
|
+
function isValidExtraKey(key) {
|
|
138
|
+
return /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(key);
|
|
139
|
+
}
|
|
140
|
+
var MAX_EXTERNAL_ADMIN_LINKS = 10;
|
|
141
|
+
var MAX_EXTERNAL_ADMIN_LINK_LABEL_LENGTH = 80;
|
|
142
|
+
var EXTERNAL_ADMIN_LINK_ID_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
143
|
+
function tryNormalizeHttpUrl(input) {
|
|
144
|
+
if (typeof input !== "string" || !input.trim()) {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
try {
|
|
148
|
+
const url = new URL(input.trim());
|
|
149
|
+
if (url.protocol !== "https:" && url.protocol !== "http:") {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
return url.toString().replace(/\/$/, "");
|
|
153
|
+
} catch {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function normalizeShopifyExternalSource(shopify) {
|
|
158
|
+
if (!shopify || typeof shopify !== "object") {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
const adminUrl = tryNormalizeHttpUrl(shopify.adminUrl);
|
|
162
|
+
const storeUrl = tryNormalizeHttpUrl(shopify.storeUrl);
|
|
163
|
+
if (!adminUrl && !storeUrl) {
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
...adminUrl ? { adminUrl } : {},
|
|
168
|
+
...storeUrl ? { storeUrl } : {}
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function normalizeExternalAdminLinkEntries(links) {
|
|
172
|
+
if (!Array.isArray(links)) {
|
|
173
|
+
return [];
|
|
174
|
+
}
|
|
175
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
176
|
+
const out = [];
|
|
177
|
+
for (const raw of links) {
|
|
178
|
+
if (!raw || typeof raw !== "object" || out.length >= MAX_EXTERNAL_ADMIN_LINKS) {
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
const id = typeof raw.id === "string" ? raw.id.trim().toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/^-+|-+$/g, "") : "";
|
|
182
|
+
const label = typeof raw.label === "string" ? raw.label.trim().slice(0, MAX_EXTERNAL_ADMIN_LINK_LABEL_LENGTH) : "";
|
|
183
|
+
const url = tryNormalizeHttpUrl(raw.url);
|
|
184
|
+
if (!id || !label || !url || !EXTERNAL_ADMIN_LINK_ID_PATTERN.test(id) || seenIds.has(id)) {
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
seenIds.add(id);
|
|
188
|
+
out.push({ id, label, url });
|
|
189
|
+
}
|
|
190
|
+
return out;
|
|
191
|
+
}
|
|
192
|
+
function normalizeExternalSources(externalSources) {
|
|
193
|
+
if (!externalSources || typeof externalSources !== "object") {
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
const studioUrl = tryNormalizeHttpUrl(externalSources.sanity?.studioUrl);
|
|
197
|
+
const shopify = normalizeShopifyExternalSource(externalSources.shopify);
|
|
198
|
+
const links = normalizeExternalAdminLinkEntries(externalSources.links);
|
|
199
|
+
if (!studioUrl && !shopify && links.length === 0) {
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
202
|
+
return {
|
|
203
|
+
...studioUrl ? { sanity: { studioUrl } } : {},
|
|
204
|
+
...shopify ? { shopify } : {},
|
|
205
|
+
...links.length > 0 ? { links } : {}
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
function normalizeJmpContentManifest(input) {
|
|
209
|
+
if (!input || typeof input !== "object") {
|
|
210
|
+
return null;
|
|
211
|
+
}
|
|
212
|
+
const routes = normalizeRoutes(input.routes);
|
|
213
|
+
const externalSources = normalizeExternalSources(input.externalSources);
|
|
214
|
+
const trust = normalizeTrust(input.trust);
|
|
215
|
+
const contact = normalizeContact(input.contact);
|
|
216
|
+
if (routes.length === 0 && !externalSources && !trust && !contact) {
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
219
|
+
return {
|
|
220
|
+
version: JMP_CONTENT_MANIFEST_VERSION,
|
|
221
|
+
...routes.length > 0 ? { routes } : {},
|
|
222
|
+
...externalSources ? { externalSources } : {},
|
|
223
|
+
...trust ? { trust } : {},
|
|
224
|
+
...contact ? { contact } : {}
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
function normalizeRoutes(routes) {
|
|
228
|
+
if (!Array.isArray(routes)) {
|
|
229
|
+
return [];
|
|
230
|
+
}
|
|
231
|
+
const seen = /* @__PURE__ */ new Set();
|
|
232
|
+
const out = [];
|
|
233
|
+
for (const raw of routes) {
|
|
234
|
+
if (!raw || typeof raw !== "object") continue;
|
|
235
|
+
const wrapper = typeof raw.wrapper === "string" ? raw.wrapper.trim().toLowerCase() : "";
|
|
236
|
+
const pattern = typeof raw.pattern === "string" ? raw.pattern.trim() : "";
|
|
237
|
+
if (!wrapper || !pattern) continue;
|
|
238
|
+
const dedupe = `${wrapper}:${pattern}`;
|
|
239
|
+
if (seen.has(dedupe)) continue;
|
|
240
|
+
seen.add(dedupe);
|
|
241
|
+
out.push({
|
|
242
|
+
wrapper,
|
|
243
|
+
pattern,
|
|
244
|
+
...typeof raw.index === "string" && raw.index.trim() ? { index: raw.index.trim() } : {},
|
|
245
|
+
...typeof raw.label === "string" && raw.label.trim() ? { label: raw.label.trim() } : {}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
return out;
|
|
249
|
+
}
|
|
250
|
+
function normalizeTrust(trust) {
|
|
251
|
+
if (!trust || typeof trust !== "object") return null;
|
|
252
|
+
const blocks = normalizeTrustBlocks(trust.blocks);
|
|
253
|
+
const labels = normalizeTrustLabels(trust.labels);
|
|
254
|
+
const mergeTestimonialsReviews = trust.mergeTestimonialsReviews === true;
|
|
255
|
+
if (blocks.length === 0 && !labels && !mergeTestimonialsReviews) return null;
|
|
256
|
+
return {
|
|
257
|
+
...blocks.length > 0 ? { blocks } : {},
|
|
258
|
+
...labels ? { labels } : {},
|
|
259
|
+
...mergeTestimonialsReviews ? { mergeTestimonialsReviews: true } : {}
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
function normalizeTrustBlocks(blocks) {
|
|
263
|
+
if (!Array.isArray(blocks)) return [];
|
|
264
|
+
const seen = /* @__PURE__ */ new Set();
|
|
265
|
+
const out = [];
|
|
266
|
+
for (const raw of blocks) {
|
|
267
|
+
if (!raw || typeof raw !== "object") continue;
|
|
268
|
+
const section = typeof raw.section === "string" ? raw.section.trim().toLowerCase() : "";
|
|
269
|
+
if (!TRUST_SECTIONS.has(section) || seen.has(section)) continue;
|
|
270
|
+
seen.add(section);
|
|
271
|
+
out.push({
|
|
272
|
+
section,
|
|
273
|
+
...typeof raw.label === "string" && raw.label.trim() ? { label: raw.label.trim() } : {}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
return out;
|
|
277
|
+
}
|
|
278
|
+
function normalizeTrustLabels(labels) {
|
|
279
|
+
if (!labels || typeof labels !== "object") return null;
|
|
280
|
+
const out = {};
|
|
281
|
+
for (const [key, value] of Object.entries(labels)) {
|
|
282
|
+
if (TRUST_SECTIONS.has(key) && typeof value === "string" && value.trim()) {
|
|
283
|
+
out[key] = value.trim();
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return Object.keys(out).length > 0 ? out : null;
|
|
287
|
+
}
|
|
288
|
+
function normalizeContact(contact) {
|
|
289
|
+
if (!contact || typeof contact !== "object") return null;
|
|
290
|
+
const extras = normalizeContactExtras(contact.extras);
|
|
291
|
+
return extras.length > 0 ? { extras } : null;
|
|
292
|
+
}
|
|
293
|
+
function normalizeContactExtras(extras) {
|
|
294
|
+
if (!Array.isArray(extras)) return [];
|
|
295
|
+
const seen = /* @__PURE__ */ new Set();
|
|
296
|
+
const out = [];
|
|
297
|
+
for (const raw of extras) {
|
|
298
|
+
if (!raw || typeof raw !== "object") continue;
|
|
299
|
+
const label = typeof raw.label === "string" ? raw.label.trim() : "";
|
|
300
|
+
const key = normalizeKey(
|
|
301
|
+
typeof raw.key === "string" && raw.key.trim() ? raw.key : label
|
|
302
|
+
);
|
|
303
|
+
if (!key || !label || !isValidExtraKey(key) || seen.has(key)) continue;
|
|
304
|
+
seen.add(key);
|
|
305
|
+
out.push({ key, label });
|
|
306
|
+
}
|
|
307
|
+
return out;
|
|
308
|
+
}
|
|
309
|
+
function stableJmpManifestFingerprint(manifest) {
|
|
310
|
+
return manifest ? JSON.stringify(manifest) : "";
|
|
311
|
+
}
|
|
312
|
+
function inferWrapperSlotsFromManifest(manifest) {
|
|
313
|
+
const slots = /* @__PURE__ */ new Set();
|
|
314
|
+
for (const route of manifest?.routes ?? []) {
|
|
315
|
+
slots.add(route.wrapper);
|
|
316
|
+
}
|
|
317
|
+
for (const block of manifest?.trust?.blocks ?? []) {
|
|
318
|
+
slots.add(`trust.${block.section}`);
|
|
319
|
+
slots.add("trust");
|
|
320
|
+
}
|
|
321
|
+
if (manifest?.contact?.extras?.length) {
|
|
322
|
+
slots.add("contact");
|
|
323
|
+
}
|
|
324
|
+
return [...slots];
|
|
325
|
+
}
|
|
326
|
+
|
|
124
327
|
// src/content/wrapper-discovery.ts
|
|
125
328
|
var WRAPPER_SLOT_ORDER = [
|
|
126
329
|
"blog",
|
|
@@ -149,16 +352,22 @@ function markContentWrapper(slot) {
|
|
|
149
352
|
function getDiscoveredContentWrappers() {
|
|
150
353
|
return sortWrapperSlots([...discovered]);
|
|
151
354
|
}
|
|
355
|
+
function resolveContentManifestForReport(config) {
|
|
356
|
+
return normalizeJmpContentManifest(config.contentManifest);
|
|
357
|
+
}
|
|
152
358
|
function resolveContentWrappersForReport(config) {
|
|
153
359
|
const explicit = config.contentWrappers ?? [];
|
|
154
360
|
const auto = getDiscoveredContentWrappers();
|
|
361
|
+
const fromManifest = inferWrapperSlotsFromManifest(
|
|
362
|
+
resolveContentManifestForReport(config)
|
|
363
|
+
);
|
|
155
364
|
if (config.contentWrapperMode === "manual") {
|
|
156
|
-
return sortWrapperSlots([...explicit]);
|
|
365
|
+
return sortWrapperSlots([...explicit, ...fromManifest]);
|
|
157
366
|
}
|
|
158
367
|
if (config.contentWrapperMode === "explicit-only") {
|
|
159
|
-
return sortWrapperSlots([...explicit]);
|
|
368
|
+
return sortWrapperSlots([...explicit, ...fromManifest]);
|
|
160
369
|
}
|
|
161
|
-
const merged = /* @__PURE__ */ new Set([...explicit, ...auto]);
|
|
370
|
+
const merged = /* @__PURE__ */ new Set([...explicit, ...auto, ...fromManifest]);
|
|
162
371
|
return sortWrapperSlots([...merged]);
|
|
163
372
|
}
|
|
164
373
|
function hasReportedContentWrappers(dedupeKey) {
|
|
@@ -219,7 +428,8 @@ async function registerJmpContentWrappers(config) {
|
|
|
219
428
|
if (!wrappers.length) {
|
|
220
429
|
return { ok: false, skipped: true };
|
|
221
430
|
}
|
|
222
|
-
const
|
|
431
|
+
const manifest = resolveContentManifestForReport(config);
|
|
432
|
+
const dedupeKey = `${config.trackingKey}:${[...wrappers].sort().join(",")}:${stableJmpManifestFingerprint(manifest)}`;
|
|
223
433
|
if (hasReportedContentWrappers(dedupeKey)) {
|
|
224
434
|
return { ok: true, wrappers };
|
|
225
435
|
}
|
|
@@ -232,7 +442,17 @@ async function registerJmpContentWrappers(config) {
|
|
|
232
442
|
}
|
|
233
443
|
const url = `${baseUrl}/api/content/capabilities`;
|
|
234
444
|
if (config.debug) {
|
|
235
|
-
console.debug("[@jmp-technologies/analytics]", "POST", url, {
|
|
445
|
+
console.debug("[@jmp-technologies/analytics]", "POST", url, {
|
|
446
|
+
wrappers,
|
|
447
|
+
manifest
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
const body = {
|
|
451
|
+
wrappers,
|
|
452
|
+
sdkVersion: JMP_ANALYTICS_SDK_VERSION
|
|
453
|
+
};
|
|
454
|
+
if (manifest) {
|
|
455
|
+
body.manifest = manifest;
|
|
236
456
|
}
|
|
237
457
|
const res = await resolvedFetch(url, {
|
|
238
458
|
method: "POST",
|
|
@@ -240,10 +460,7 @@ async function registerJmpContentWrappers(config) {
|
|
|
240
460
|
"Content-Type": "application/json",
|
|
241
461
|
"X-JMP-Tracking-Key": config.trackingKey
|
|
242
462
|
},
|
|
243
|
-
body: JSON.stringify(
|
|
244
|
-
wrappers,
|
|
245
|
-
sdkVersion: JMP_ANALYTICS_SDK_VERSION
|
|
246
|
-
})
|
|
463
|
+
body: JSON.stringify(body)
|
|
247
464
|
});
|
|
248
465
|
const text = await res.text();
|
|
249
466
|
if (!res.ok) {
|
|
@@ -322,7 +539,8 @@ function getJmpContentConfig() {
|
|
|
322
539
|
return {
|
|
323
540
|
baseUrl: analyticsUrl,
|
|
324
541
|
trackingKey,
|
|
325
|
-
contentWrappers: site?.contentWrappers ?? void 0
|
|
542
|
+
contentWrappers: site?.contentWrappers ?? void 0,
|
|
543
|
+
contentManifest: site?.contentManifest ?? void 0
|
|
326
544
|
};
|
|
327
545
|
}
|
|
328
546
|
|
|
@@ -621,6 +839,26 @@ function classifyContactHref(href) {
|
|
|
621
839
|
}
|
|
622
840
|
return null;
|
|
623
841
|
}
|
|
842
|
+
function extractTelTarget(href) {
|
|
843
|
+
const raw = href.trim();
|
|
844
|
+
if (!raw.toLowerCase().startsWith("tel:")) {
|
|
845
|
+
return null;
|
|
846
|
+
}
|
|
847
|
+
const target = decodeURIComponent(
|
|
848
|
+
raw.slice(4).split("?")[0]?.split(";")[0] ?? ""
|
|
849
|
+
).trim();
|
|
850
|
+
return target || null;
|
|
851
|
+
}
|
|
852
|
+
function extractMailtoTarget(href) {
|
|
853
|
+
const raw = href.trim();
|
|
854
|
+
if (!raw.toLowerCase().startsWith("mailto:")) {
|
|
855
|
+
return null;
|
|
856
|
+
}
|
|
857
|
+
const target = decodeURIComponent(
|
|
858
|
+
raw.slice(7).split("?")[0]?.split(",")[0] ?? ""
|
|
859
|
+
).trim();
|
|
860
|
+
return target || null;
|
|
861
|
+
}
|
|
624
862
|
|
|
625
863
|
// src/consent.ts
|
|
626
864
|
var moduleTrackingConsentGranted = true;
|
|
@@ -972,14 +1210,22 @@ function createJmpAnalytics(config) {
|
|
|
972
1210
|
if (dedupeContactClick(`call_click:${path}`)) {
|
|
973
1211
|
return;
|
|
974
1212
|
}
|
|
975
|
-
|
|
1213
|
+
const contactTarget = extractTelTarget(href);
|
|
1214
|
+
void trackCallClick(
|
|
1215
|
+
path,
|
|
1216
|
+
contactTarget ? { contactTarget } : void 0
|
|
1217
|
+
);
|
|
976
1218
|
return;
|
|
977
1219
|
}
|
|
978
1220
|
if (classified.kind === "email") {
|
|
979
1221
|
if (dedupeContactClick(`email_click:${path}`)) {
|
|
980
1222
|
return;
|
|
981
1223
|
}
|
|
982
|
-
|
|
1224
|
+
const contactTarget = extractMailtoTarget(href);
|
|
1225
|
+
void trackEmailClick(
|
|
1226
|
+
path,
|
|
1227
|
+
contactTarget ? { contactTarget } : void 0
|
|
1228
|
+
);
|
|
983
1229
|
return;
|
|
984
1230
|
}
|
|
985
1231
|
if (dedupeContactClick(`contact_click:${classified.channel}:${path}`)) {
|
|
@@ -1214,8 +1460,7 @@ function JmpLandingCaptureScriptServer({
|
|
|
1214
1460
|
dangerouslySetInnerHTML: {
|
|
1215
1461
|
__html: buildLandingCaptureInlineScript()
|
|
1216
1462
|
},
|
|
1217
|
-
id: "jmp-landing-capture"
|
|
1218
|
-
suppressHydrationWarning: true
|
|
1463
|
+
id: "jmp-landing-capture"
|
|
1219
1464
|
}
|
|
1220
1465
|
);
|
|
1221
1466
|
}
|