@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.mjs CHANGED
@@ -1541,8 +1541,8 @@ class JourniumAnalytics {
1541
1541
  // This handles cached remote options or local options with autocapture enabled
1542
1542
  this.startAutocaptureIfEnabled(initialEffectiveOptions);
1543
1543
  }
1544
- resolvePageviewOptions(autoTrackPageviews) {
1545
- if (autoTrackPageviews === false) {
1544
+ resolvePageviewOptions(autoTrackPageviews, frameworkHandlesPageviews) {
1545
+ if (autoTrackPageviews === false || frameworkHandlesPageviews) {
1546
1546
  return { enabled: false, trackSpaPageviews: false, captureInitialPageview: false };
1547
1547
  }
1548
1548
  if (autoTrackPageviews === true || autoTrackPageviews === undefined) {
@@ -1596,7 +1596,7 @@ class JourniumAnalytics {
1596
1596
  // Only start if effectiveOptions are actually loaded (non-empty)
1597
1597
  const hasOptions = effectiveOptions && Object.keys(effectiveOptions).length > 0;
1598
1598
  const { enabled: autoTrackPageviews, trackSpaPageviews, captureInitialPageview } = hasOptions
1599
- ? this.resolvePageviewOptions(effectiveOptions.autoTrackPageviews)
1599
+ ? this.resolvePageviewOptions(effectiveOptions.autoTrackPageviews, effectiveOptions._frameworkHandlesPageviews)
1600
1600
  : { enabled: false, trackSpaPageviews: false, captureInitialPageview: false };
1601
1601
  const autocaptureEnabled = hasOptions
1602
1602
  ? effectiveOptions.autocapture !== false
@@ -1632,7 +1632,7 @@ class JourniumAnalytics {
1632
1632
  const hasActualOptions = effectiveOptions && Object.keys(effectiveOptions).length > 0;
1633
1633
  if (hasActualOptions) {
1634
1634
  // Use same logic as manual startAutocapture() but only start automatically
1635
- const { enabled: autoTrackPageviews, trackSpaPageviews, captureInitialPageview } = this.resolvePageviewOptions(effectiveOptions.autoTrackPageviews);
1635
+ const { enabled: autoTrackPageviews, trackSpaPageviews, captureInitialPageview } = this.resolvePageviewOptions(effectiveOptions.autoTrackPageviews, effectiveOptions._frameworkHandlesPageviews);
1636
1636
  const autocaptureEnabled = effectiveOptions.autocapture !== false;
1637
1637
  // Update autocapture tracker options
1638
1638
  const autocaptureOptions = this.resolveAutocaptureOptions(effectiveOptions.autocapture);
@@ -1663,7 +1663,7 @@ class JourniumAnalytics {
1663
1663
  this.autocaptureTracker.stop();
1664
1664
  this.autocaptureStarted = false;
1665
1665
  }
1666
- const { enabled: autoTrackPageviews, trackSpaPageviews, captureInitialPageview } = this.resolvePageviewOptions(effectiveOptions.autoTrackPageviews);
1666
+ const { enabled: autoTrackPageviews, trackSpaPageviews, captureInitialPageview } = this.resolvePageviewOptions(effectiveOptions.autoTrackPageviews, effectiveOptions._frameworkHandlesPageviews);
1667
1667
  const autocaptureEnabled = effectiveOptions.autocapture !== false;
1668
1668
  const autocaptureOptions = this.resolveAutocaptureOptions(effectiveOptions.autocapture);
1669
1669
  this.autocaptureTracker.updateOptions(autocaptureOptions);