From 790354d3ac7baf6a3d6bb211399ff6ae016a7ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20F=C3=A9=20Santos?= Date: Thu, 30 Apr 2026 10:48:16 +0100 Subject: [PATCH] Add data-auto-pageview attribute to tracker script Allow disabling the automatic initial pageview while keeping performance tracking, click handling, and path change detection active. --- src/tracker/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tracker/index.js b/src/tracker/index.js index 85ad2ffea..68b7fe77b 100644 --- a/src/tracker/index.js +++ b/src/tracker/index.js @@ -37,6 +37,7 @@ const domain = config('domains') || ''; const credentials = config('fetch-credentials') || 'omit'; const perf = config('performance') === _true; + const autoPageview = config('auto-pageview') !== _false; const domains = domain.split(',').map(n => n.trim()); const host = @@ -197,7 +198,7 @@ const init = () => { if (!initialized) { initialized = true; - track(); + if (autoPageview) track(); handlePathChanges(); handleClicks(); if (perf) initPerformance();