@honeypot-run/core
Advanced tools
Comparing version 0.2.56 to 0.2.57
@@ -14,2 +14,3 @@ "use strict"; | ||
const createAmplitudePlugin = (track, get, pluginConfig) => { | ||
let pageViews = 0; | ||
return { | ||
@@ -19,2 +20,3 @@ name: 'honeypot-enrichment', | ||
setup: (config) => __awaiter(void 0, void 0, void 0, function* () { | ||
yield get(); | ||
}), | ||
@@ -29,2 +31,8 @@ execute: (event) => __awaiter(void 0, void 0, void 0, function* () { | ||
: event_type; | ||
if (isInternal && cleanedEventType === 'Page Viewed') { | ||
pageViews = pageViews + 1; | ||
if (pageViews == 1) { | ||
return event; | ||
} | ||
} | ||
const shouldIgnore = ((_a = pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.excludeEvents) === null || _a === void 0 ? void 0 : _a.includes(cleanedEventType)) || | ||
@@ -31,0 +39,0 @@ (((_b = pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.includeEvents) === null || _b === void 0 ? void 0 : _b.length) && !(pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.includeEvents.includes(cleanedEventType))); |
@@ -11,2 +11,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
export const createAmplitudePlugin = (track, get, pluginConfig) => { | ||
let pageViews = 0; | ||
return { | ||
@@ -16,2 +17,3 @@ name: 'honeypot-enrichment', | ||
setup: (config) => __awaiter(void 0, void 0, void 0, function* () { | ||
yield get(); | ||
}), | ||
@@ -26,2 +28,8 @@ execute: (event) => __awaiter(void 0, void 0, void 0, function* () { | ||
: event_type; | ||
if (isInternal && cleanedEventType === 'Page Viewed') { | ||
pageViews = pageViews + 1; | ||
if (pageViews == 1) { | ||
return event; | ||
} | ||
} | ||
const shouldIgnore = ((_a = pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.excludeEvents) === null || _a === void 0 ? void 0 : _a.includes(cleanedEventType)) || | ||
@@ -28,0 +36,0 @@ (((_b = pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.includeEvents) === null || _b === void 0 ? void 0 : _b.length) && !(pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.includeEvents.includes(cleanedEventType))); |
@@ -5,3 +5,3 @@ { | ||
"author": "https://honeypot.run", | ||
"version": "0.2.56", | ||
"version": "0.2.57", | ||
"license": "BUSL-1.1", | ||
@@ -8,0 +8,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47444
1102