@journium/react 1.2.0 → 1.2.1
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.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1543,8 +1543,8 @@ class JourniumAnalytics {
|
|
|
1543
1543
|
// This handles cached remote options or local options with autocapture enabled
|
|
1544
1544
|
this.startAutocaptureIfEnabled(initialEffectiveOptions);
|
|
1545
1545
|
}
|
|
1546
|
-
resolvePageviewOptions(autoTrackPageviews) {
|
|
1547
|
-
if (autoTrackPageviews === false) {
|
|
1546
|
+
resolvePageviewOptions(autoTrackPageviews, frameworkHandlesPageviews) {
|
|
1547
|
+
if (autoTrackPageviews === false || frameworkHandlesPageviews) {
|
|
1548
1548
|
return { enabled: false, trackSpaPageviews: false, captureInitialPageview: false };
|
|
1549
1549
|
}
|
|
1550
1550
|
if (autoTrackPageviews === true || autoTrackPageviews === undefined) {
|
|
@@ -1598,7 +1598,7 @@ class JourniumAnalytics {
|
|
|
1598
1598
|
// Only start if effectiveOptions are actually loaded (non-empty)
|
|
1599
1599
|
const hasOptions = effectiveOptions && Object.keys(effectiveOptions).length > 0;
|
|
1600
1600
|
const { enabled: autoTrackPageviews, trackSpaPageviews, captureInitialPageview } = hasOptions
|
|
1601
|
-
? this.resolvePageviewOptions(effectiveOptions.autoTrackPageviews)
|
|
1601
|
+
? this.resolvePageviewOptions(effectiveOptions.autoTrackPageviews, effectiveOptions._frameworkHandlesPageviews)
|
|
1602
1602
|
: { enabled: false, trackSpaPageviews: false, captureInitialPageview: false };
|
|
1603
1603
|
const autocaptureEnabled = hasOptions
|
|
1604
1604
|
? effectiveOptions.autocapture !== false
|
|
@@ -1634,7 +1634,7 @@ class JourniumAnalytics {
|
|
|
1634
1634
|
const hasActualOptions = effectiveOptions && Object.keys(effectiveOptions).length > 0;
|
|
1635
1635
|
if (hasActualOptions) {
|
|
1636
1636
|
// Use same logic as manual startAutocapture() but only start automatically
|
|
1637
|
-
const { enabled: autoTrackPageviews, trackSpaPageviews, captureInitialPageview } = this.resolvePageviewOptions(effectiveOptions.autoTrackPageviews);
|
|
1637
|
+
const { enabled: autoTrackPageviews, trackSpaPageviews, captureInitialPageview } = this.resolvePageviewOptions(effectiveOptions.autoTrackPageviews, effectiveOptions._frameworkHandlesPageviews);
|
|
1638
1638
|
const autocaptureEnabled = effectiveOptions.autocapture !== false;
|
|
1639
1639
|
// Update autocapture tracker options
|
|
1640
1640
|
const autocaptureOptions = this.resolveAutocaptureOptions(effectiveOptions.autocapture);
|
|
@@ -1665,7 +1665,7 @@ class JourniumAnalytics {
|
|
|
1665
1665
|
this.autocaptureTracker.stop();
|
|
1666
1666
|
this.autocaptureStarted = false;
|
|
1667
1667
|
}
|
|
1668
|
-
const { enabled: autoTrackPageviews, trackSpaPageviews, captureInitialPageview } = this.resolvePageviewOptions(effectiveOptions.autoTrackPageviews);
|
|
1668
|
+
const { enabled: autoTrackPageviews, trackSpaPageviews, captureInitialPageview } = this.resolvePageviewOptions(effectiveOptions.autoTrackPageviews, effectiveOptions._frameworkHandlesPageviews);
|
|
1669
1669
|
const autocaptureEnabled = effectiveOptions.autocapture !== false;
|
|
1670
1670
|
const autocaptureOptions = this.resolveAutocaptureOptions(effectiveOptions.autocapture);
|
|
1671
1671
|
this.autocaptureTracker.updateOptions(autocaptureOptions);
|