@aranova/tracking-next 0.16.1 → 0.16.2
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/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1668,6 +1668,7 @@ function attachFormStart(client, config) {
|
|
|
1668
1668
|
}
|
|
1669
1669
|
|
|
1670
1670
|
// ../tracking-core/src/triggers/page-exit.ts
|
|
1671
|
+
var MIN_SEGMENT_MS = 50;
|
|
1671
1672
|
function attachPageExit(client) {
|
|
1672
1673
|
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
1673
1674
|
return () => {
|
|
@@ -1705,7 +1706,7 @@ function attachPageExit(client) {
|
|
|
1705
1706
|
}
|
|
1706
1707
|
function emitSegment(path, flush) {
|
|
1707
1708
|
const dwell = settledDwellMs();
|
|
1708
|
-
if (dwell
|
|
1709
|
+
if (dwell < MIN_SEGMENT_MS) return;
|
|
1709
1710
|
client.trackEvent({
|
|
1710
1711
|
eventType: "page_exit",
|
|
1711
1712
|
metadata: {
|
|
@@ -1720,7 +1721,7 @@ function attachPageExit(client) {
|
|
|
1720
1721
|
client.flushBeacon();
|
|
1721
1722
|
}
|
|
1722
1723
|
accumulatedMs = 0;
|
|
1723
|
-
activeSince =
|
|
1724
|
+
activeSince = null;
|
|
1724
1725
|
}
|
|
1725
1726
|
function onNavigate() {
|
|
1726
1727
|
const newPath = window.location.pathname;
|
|
@@ -2522,7 +2523,7 @@ function GoogleAdsTracking(props) {
|
|
|
2522
2523
|
import { usePathname, useSearchParams } from "next/navigation";
|
|
2523
2524
|
|
|
2524
2525
|
// package.json
|
|
2525
|
-
var version = "0.16.
|
|
2526
|
+
var version = "0.16.2";
|
|
2526
2527
|
|
|
2527
2528
|
// src/factory.tsx
|
|
2528
2529
|
import {
|