@honeypot-run/core
Advanced tools
Comparing version 0.2.42 to 0.2.43
@@ -90,10 +90,6 @@ "use strict"; | ||
if (window.honeypot.track) { | ||
console.log('found track'); | ||
console.log(window.honeypot.track); | ||
window.honeypot.track(eventType, eventProperties); | ||
} | ||
else { | ||
console.log('no track pushing to q'); | ||
window.honeypot.q.push([eventType, eventProperties]); | ||
console.log(window.honeypot.q); | ||
} | ||
@@ -134,2 +130,16 @@ }); | ||
scriptUrl.searchParams.append('title', pageTitle || 'Title not available'); | ||
try { | ||
const includeParams = [ | ||
"hpdebug", | ||
"hpgeotest", | ||
]; | ||
const params = new URLSearchParams(window.location.search); | ||
includeParams.forEach((p) => { | ||
if (params.has(p)) { | ||
scriptUrl.searchParams.append(p, params.get(p) || ''); | ||
} | ||
}); | ||
} | ||
catch (error) { | ||
} | ||
if (identity) { | ||
@@ -136,0 +146,0 @@ scriptUrl.searchParams.append('identity', identity); |
@@ -87,10 +87,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
if (window.honeypot.track) { | ||
console.log('found track'); | ||
console.log(window.honeypot.track); | ||
window.honeypot.track(eventType, eventProperties); | ||
} | ||
else { | ||
console.log('no track pushing to q'); | ||
window.honeypot.q.push([eventType, eventProperties]); | ||
console.log(window.honeypot.q); | ||
} | ||
@@ -131,2 +127,16 @@ }); | ||
scriptUrl.searchParams.append('title', pageTitle || 'Title not available'); | ||
try { | ||
const includeParams = [ | ||
"hpdebug", | ||
"hpgeotest", | ||
]; | ||
const params = new URLSearchParams(window.location.search); | ||
includeParams.forEach((p) => { | ||
if (params.has(p)) { | ||
scriptUrl.searchParams.append(p, params.get(p) || ''); | ||
} | ||
}); | ||
} | ||
catch (error) { | ||
} | ||
if (identity) { | ||
@@ -133,0 +143,0 @@ scriptUrl.searchParams.append('identity', identity); |
@@ -5,3 +5,3 @@ { | ||
"author": "https://honeypot.run", | ||
"version": "0.2.42", | ||
"version": "0.2.43", | ||
"license": "BUSL-1.1", | ||
@@ -8,0 +8,0 @@ "keywords": [ |
24992
644