@jmp-technologies/analytics 0.1.39 → 0.1.40
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 +6 -2
- package/ai-crawler-agents.json +63 -0
- package/dist/astro/client.cjs +115 -3
- 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 +1 -1
- package/dist/astro/content.cjs +115 -3
- package/dist/astro/content.cjs.map +1 -1
- package/dist/astro/content.d.cts +3 -3
- package/dist/astro/content.d.ts +3 -3
- package/dist/astro/content.js +2 -2
- package/dist/astro/integration.cjs +115 -3
- package/dist/astro/integration.cjs.map +1 -1
- package/dist/astro/integration.js +2 -2
- package/dist/astro/middleware.d.cts +2 -2
- package/dist/astro/middleware.d.ts +2 -2
- package/dist/astro/register.cjs +115 -3
- package/dist/astro/register.cjs.map +1 -1
- package/dist/astro/register.js +2 -2
- package/dist/{chunk-M66PHSBO.js → chunk-34LFIP3R.js} +2 -2
- package/dist/{chunk-BXPMVR7M.js → chunk-BRLCGVFJ.js} +2 -2
- package/dist/{chunk-OCIOQIE4.js → chunk-IY6Y636W.js} +2 -2
- package/dist/{chunk-XAEWXWSP.js → chunk-JC3G4XNR.js} +182 -4
- package/dist/chunk-JC3G4XNR.js.map +1 -0
- package/dist/{chunk-JJ3JP3RV.js → chunk-VSZRQSUN.js} +2 -2
- package/dist/{create-jmp-analytics-C1IH32ZF.d.cts → create-jmp-analytics-B7VqQJca.d.cts} +1 -1
- package/dist/{create-jmp-analytics-CjVYSmPJ.d.ts → create-jmp-analytics-BGt16QGY.d.ts} +1 -1
- package/dist/index.cjs +187 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -6
- package/dist/index.d.ts +30 -6
- package/dist/index.js +13 -1
- package/dist/next/content.cjs +115 -3
- package/dist/next/content.cjs.map +1 -1
- package/dist/next/content.d.cts +2 -2
- package/dist/next/content.d.ts +2 -2
- package/dist/next/content.js +2 -2
- package/dist/next/instrumentation.cjs +115 -3
- package/dist/next/instrumentation.cjs.map +1 -1
- package/dist/next/instrumentation.js +1 -1
- package/dist/next/landing-pages.cjs +115 -3
- package/dist/next/landing-pages.cjs.map +1 -1
- package/dist/next/landing-pages.d.cts +2 -2
- package/dist/next/landing-pages.d.ts +2 -2
- package/dist/next/landing-pages.js +2 -2
- package/dist/next/locations.cjs +116 -4
- package/dist/next/locations.cjs.map +1 -1
- package/dist/next/locations.d.cts +3 -3
- package/dist/next/locations.d.ts +3 -3
- package/dist/next/locations.js +3 -3
- package/dist/next/locations.js.map +1 -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.map +1 -1
- package/dist/next/site-root-server.cjs +115 -3
- package/dist/next/site-root-server.cjs.map +1 -1
- package/dist/next/site-root-server.d.cts +1 -1
- package/dist/next/site-root-server.d.ts +1 -1
- package/dist/next/site-root-server.js +3 -3
- package/dist/next/site-root-server.js.map +1 -1
- package/dist/next.cjs +115 -3
- 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 +3 -3
- package/dist/react.cjs +115 -3
- 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 +2 -2
- package/dist/{site-config-BN6Z2zIf.d.cts → site-config-CZl4PIbg.d.cts} +1 -1
- package/dist/{site-config-BEaYpZ3X.d.ts → site-config-Cq5K8hUp.d.ts} +1 -1
- package/dist/{track-page-view-B3OwUOYl.d.ts → track-page-view-BSlE0yI9.d.ts} +1 -1
- package/dist/{track-page-view-BeVjC-pV.d.cts → track-page-view-M9y_5WqT.d.cts} +1 -1
- package/dist/{types-uwXEaMD6.d.ts → types-DH_8sBu9.d.cts} +6 -0
- package/dist/{types-uwXEaMD6.d.cts → types-DH_8sBu9.d.ts} +6 -0
- package/dist/{utils-6a6lNKsg.d.ts → utils-C2JRomti.d.ts} +1 -1
- package/dist/{utils-Cbb3CO3i.d.cts → utils-JfjoqC-z.d.cts} +1 -1
- package/package.json +2 -1
- package/dist/chunk-XAEWXWSP.js.map +0 -1
- /package/dist/{chunk-M66PHSBO.js.map → chunk-34LFIP3R.js.map} +0 -0
- /package/dist/{chunk-BXPMVR7M.js.map → chunk-BRLCGVFJ.js.map} +0 -0
- /package/dist/{chunk-OCIOQIE4.js.map → chunk-IY6Y636W.js.map} +0 -0
- /package/dist/{chunk-JJ3JP3RV.js.map → chunk-VSZRQSUN.js.map} +0 -0
package/dist/next.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { q as JmpAnalyticsConfig } from './types-
|
|
3
|
+
import { q as JmpAnalyticsConfig } from './types-DH_8sBu9.cjs';
|
|
4
4
|
export { b as buildLandingCaptureInlineScript } from './landing-capture-C8pyZWuF.cjs';
|
|
5
|
-
import { J as JmpAnalytics } from './create-jmp-analytics-
|
|
6
|
-
export { i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-
|
|
5
|
+
import { J as JmpAnalytics } from './create-jmp-analytics-B7VqQJca.cjs';
|
|
6
|
+
export { i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-B7VqQJca.cjs';
|
|
7
7
|
export { r as readJmpPublicEnvFromProcess } from './env-public-B6Y0DG68.cjs';
|
|
8
8
|
export { JmpTrackedMailtoLink, JmpTrackedTelLink } from './react.cjs';
|
|
9
9
|
export { JmpGoogleTag } from './next/google-tag.cjs';
|
package/dist/next.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { q as JmpAnalyticsConfig } from './types-
|
|
3
|
+
import { q as JmpAnalyticsConfig } from './types-DH_8sBu9.js';
|
|
4
4
|
export { b as buildLandingCaptureInlineScript } from './landing-capture-C8pyZWuF.js';
|
|
5
|
-
import { J as JmpAnalytics } from './create-jmp-analytics-
|
|
6
|
-
export { i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-
|
|
5
|
+
import { J as JmpAnalytics } from './create-jmp-analytics-BGt16QGY.js';
|
|
6
|
+
export { i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-BGt16QGY.js';
|
|
7
7
|
export { r as readJmpPublicEnvFromProcess } from './env-public-B6Y0DG68.js';
|
|
8
8
|
export { JmpTrackedMailtoLink, JmpTrackedTelLink } from './react.js';
|
|
9
9
|
export { JmpGoogleTag } from './next/google-tag.js';
|
package/dist/next.js
CHANGED
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
JmpSiteRoot,
|
|
6
6
|
getOrCreateJmpAnalyticsForNextApp,
|
|
7
7
|
useJmpAnalytics
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BRLCGVFJ.js";
|
|
9
9
|
import {
|
|
10
10
|
JmpGoogleTag
|
|
11
11
|
} from "./chunk-2KAGOVRZ.js";
|
|
12
12
|
import {
|
|
13
13
|
JmpTrackedMailtoLink,
|
|
14
14
|
JmpTrackedTelLink
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VSZRQSUN.js";
|
|
16
16
|
import {
|
|
17
17
|
isJmpTrackingConsentGranted,
|
|
18
18
|
setJmpTrackingConsent,
|
|
19
19
|
subscribeJmpTrackingConsent
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JC3G4XNR.js";
|
|
21
21
|
import {
|
|
22
22
|
buildLandingCaptureInlineScript
|
|
23
23
|
} from "./chunk-TCZ6TC2L.js";
|
package/dist/react.cjs
CHANGED
|
@@ -306,7 +306,7 @@ function getOrCreateSessionIdFromStorage() {
|
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
// package.json
|
|
309
|
-
var version = "0.1.
|
|
309
|
+
var version = "0.1.40";
|
|
310
310
|
|
|
311
311
|
// src/constants.ts
|
|
312
312
|
var JMP_ANALYTICS_SDK_VERSION = version;
|
|
@@ -1110,7 +1110,50 @@ function normalizeManifestDefaults(defaults) {
|
|
|
1110
1110
|
function normalizeContact(contact) {
|
|
1111
1111
|
if (!contact || typeof contact !== "object") return null;
|
|
1112
1112
|
const extras = normalizeContactExtras(contact.extras);
|
|
1113
|
-
|
|
1113
|
+
const leadInbox = normalizeLeadInbox(contact.leadInbox);
|
|
1114
|
+
if (extras.length === 0 && !leadInbox) return null;
|
|
1115
|
+
return {
|
|
1116
|
+
...extras.length > 0 ? { extras } : {},
|
|
1117
|
+
...leadInbox ? { leadInbox } : {}
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
function normalizeLeadInbox(raw) {
|
|
1121
|
+
if (!raw || typeof raw !== "object") return null;
|
|
1122
|
+
const list = normalizeInboxKeyList(raw.list, 8);
|
|
1123
|
+
const detail = normalizeInboxKeyList(raw.detail, 24);
|
|
1124
|
+
const labels = normalizeInboxLabels(raw.labels);
|
|
1125
|
+
if (!list && !detail && !labels) return null;
|
|
1126
|
+
return {
|
|
1127
|
+
...list ? { list } : {},
|
|
1128
|
+
...detail ? { detail } : {},
|
|
1129
|
+
...labels ? { labels } : {}
|
|
1130
|
+
};
|
|
1131
|
+
}
|
|
1132
|
+
function normalizeInboxKeyList(raw, max) {
|
|
1133
|
+
if (!Array.isArray(raw)) return void 0;
|
|
1134
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1135
|
+
const out = [];
|
|
1136
|
+
for (const item of raw) {
|
|
1137
|
+
if (typeof item !== "string" || out.length >= max) continue;
|
|
1138
|
+
const key = item.trim();
|
|
1139
|
+
const token = key.replace(/[^a-zA-Z0-9]+/g, "").toLowerCase();
|
|
1140
|
+
if (!key || !token || seen.has(token)) continue;
|
|
1141
|
+
seen.add(token);
|
|
1142
|
+
out.push(key);
|
|
1143
|
+
}
|
|
1144
|
+
return out.length > 0 ? out : void 0;
|
|
1145
|
+
}
|
|
1146
|
+
function normalizeInboxLabels(raw) {
|
|
1147
|
+
if (!raw || typeof raw !== "object") return void 0;
|
|
1148
|
+
const out = {};
|
|
1149
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
1150
|
+
if (typeof value !== "string") continue;
|
|
1151
|
+
const label = value.trim().slice(0, 60);
|
|
1152
|
+
const token = key.trim();
|
|
1153
|
+
if (!token || !label) continue;
|
|
1154
|
+
out[token] = label;
|
|
1155
|
+
}
|
|
1156
|
+
return Object.keys(out).length > 0 ? out : void 0;
|
|
1114
1157
|
}
|
|
1115
1158
|
function normalizeContactExtras(extras) {
|
|
1116
1159
|
if (!Array.isArray(extras)) return [];
|
|
@@ -1140,7 +1183,7 @@ function inferWrapperSlotsFromManifest(manifest) {
|
|
|
1140
1183
|
slots.add(`trust.${block.section}`);
|
|
1141
1184
|
slots.add("trust");
|
|
1142
1185
|
}
|
|
1143
|
-
if (manifest?.contact?.extras?.length) {
|
|
1186
|
+
if (manifest?.contact?.extras?.length || manifest?.contact?.leadInbox) {
|
|
1144
1187
|
slots.add("contact");
|
|
1145
1188
|
}
|
|
1146
1189
|
return [...slots];
|
|
@@ -1328,6 +1371,75 @@ async function registerJmpContentWrappers(config) {
|
|
|
1328
1371
|
}
|
|
1329
1372
|
setContentWrapperSyncHandler(registerJmpContentWrappers);
|
|
1330
1373
|
|
|
1374
|
+
// ai-crawler-agents.json
|
|
1375
|
+
var ai_crawler_agents_default = {
|
|
1376
|
+
robotsUserAgents: [
|
|
1377
|
+
"GPTBot",
|
|
1378
|
+
"ChatGPT-User",
|
|
1379
|
+
"OAI-SearchBot",
|
|
1380
|
+
"OAI-AdsBot",
|
|
1381
|
+
"ClaudeBot",
|
|
1382
|
+
"Claude-User",
|
|
1383
|
+
"Claude-SearchBot",
|
|
1384
|
+
"Claude-Web",
|
|
1385
|
+
"PerplexityBot",
|
|
1386
|
+
"Perplexity-User",
|
|
1387
|
+
"Google-Extended",
|
|
1388
|
+
"GoogleOther",
|
|
1389
|
+
"GoogleOther-Image",
|
|
1390
|
+
"GoogleOther-Video",
|
|
1391
|
+
"Google-CloudVertexBot",
|
|
1392
|
+
"Meta-ExternalAgent",
|
|
1393
|
+
"Meta-ExternalFetcher",
|
|
1394
|
+
"FacebookBot",
|
|
1395
|
+
"Applebot",
|
|
1396
|
+
"Applebot-Extended",
|
|
1397
|
+
"CCBot",
|
|
1398
|
+
"Bytespider",
|
|
1399
|
+
"cohere-ai",
|
|
1400
|
+
"cohere-training-data-crawler",
|
|
1401
|
+
"YouBot",
|
|
1402
|
+
"MistralAI-User",
|
|
1403
|
+
"GrokBot",
|
|
1404
|
+
"Grok-DeepSearch",
|
|
1405
|
+
"xAI-Grok",
|
|
1406
|
+
"xAI-Bot"
|
|
1407
|
+
],
|
|
1408
|
+
wafUserAgents: [
|
|
1409
|
+
"GPTBot",
|
|
1410
|
+
"ChatGPT-User",
|
|
1411
|
+
"OAI-SearchBot",
|
|
1412
|
+
"OAI-AdsBot",
|
|
1413
|
+
"ClaudeBot",
|
|
1414
|
+
"Claude-User",
|
|
1415
|
+
"Claude-SearchBot",
|
|
1416
|
+
"Claude-Web",
|
|
1417
|
+
"PerplexityBot",
|
|
1418
|
+
"Perplexity-User",
|
|
1419
|
+
"Google-Extended",
|
|
1420
|
+
"GoogleOther",
|
|
1421
|
+
"Google-CloudVertexBot",
|
|
1422
|
+
"Meta-ExternalAgent",
|
|
1423
|
+
"Meta-ExternalFetcher",
|
|
1424
|
+
"FacebookBot",
|
|
1425
|
+
"Applebot-Extended",
|
|
1426
|
+
"CCBot",
|
|
1427
|
+
"Bytespider",
|
|
1428
|
+
"cohere-ai",
|
|
1429
|
+
"cohere-training-data-crawler",
|
|
1430
|
+
"YouBot",
|
|
1431
|
+
"MistralAI-User",
|
|
1432
|
+
"GrokBot",
|
|
1433
|
+
"Grok-DeepSearch",
|
|
1434
|
+
"xAI-Grok",
|
|
1435
|
+
"xAI-Bot"
|
|
1436
|
+
]
|
|
1437
|
+
};
|
|
1438
|
+
|
|
1439
|
+
// src/ai-crawlers.ts
|
|
1440
|
+
var AI_CRAWLER_ROBOTS_USER_AGENTS = ai_crawler_agents_default.robotsUserAgents;
|
|
1441
|
+
var JMP_AI_CRAWLER_WAF_USER_AGENTS = ai_crawler_agents_default.wafUserAgents;
|
|
1442
|
+
|
|
1331
1443
|
// src/env/browser.ts
|
|
1332
1444
|
function getJmpBrowserAnalyticsConfigFromEnv(overrides) {
|
|
1333
1445
|
const pub = readJmpPublicEnvFromProcess();
|