Skip to content

An excluded logged-in user gets a paused tracker instead of none - #25

Merged
padams merged 2 commits into
masterfrom
fix/logged-in-users-get-a-paused-tracker
Nov 2, 2026
Merged

padams merged 2 commits into
masterfrom
fix/logged-in-users-get-a-paused-tracker

Conversation

@padams

@padams padams commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

With Don't Track Logged-in Users on (the default since 2.4.0), the plugin printed no tag for a logged-in user. OWA's heatmap and Domstream player start from the tracker, so opening one from OWA's reports did nothing for a site admin.

Now the tag is printed with pause queued first. Both trackers apply page commands before the page view (the 2.x bundle puts them between its config and trackPageView), and pause stops trackEvent/logEvent, so nothing is sent. The overlay check runs in the tracker's constructor, so the overlay still starts. Track Named Users is skipped for these users.

Checked on www.facesofopensource.com in Chromium, with pause injected into the live snippet and log.php requests aborted:

beacons overlay
unpaused 2 —
paused 0 —
paused + overlay link 0 loads, fetches owa.heatmap.js and the report

Tests: testLoggedInUsersCanBeExcludedInBothVersions becomes testAnExcludedLoggedInUserGetsAPausedTrackerInBothVersions: the bundle is in the tag, pause is the first command (before trackPageView on 1.x), and there is no setUserName. Unit suite 112/112.

padams added 2 commits November 2, 2026 02:55
With Don't Track Logged-in Users on, the plugin printed no tag for a
logged-in user. OWA's heatmap and Domstream player start from the
tracker, so they never opened for the site's own admins.

The tag is now printed with a pause command queued first. The tracker
applies it before the page view, so nothing is sent; the overlay still
starts. Track Named Users is skipped for them, since nothing is sent.
With Track WP Admin Pages (1.x) and Don't Track Logged-in Users both on,
every admin screen loaded a paused tracker. No overlay opens there, so an
excluded user gets no tracker on admin screens, as before.
@padams
padams merged commit 4f46954 into master Nov 2, 2026
9 checks passed
@padams
padams deleted the fix/logged-in-users-get-a-paused-tracker branch November 2, 2026 03:11
@padams padams mentioned this pull request Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant