Automattic / Automattic/jetpack
Enhancement Request: Enable IP exclusions in Jetpack Stats for cached environments
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Jetpack
### What
Support IP exclusions in Jetpack Stats with cached sites
### How
The current implementation of the `jetpack_stats_excluded_ips` filter does not work for sites using caching, as the logic to exclude IPs relies on dynamically determining visitor IP addresses before serving the tracking script. Cached pages bypass this logic, resulting in the inability to exclude specific IPs from being tracked.
This issue was initially reported by a user on an Atomic site ([ephillc.com](https://ephillc.com/)) reported here: https://github.com/Automattic/jpop-issues/issues/9399, but affects all users relying on caching for performance.
This was initially reported by a user and here's the follow-up ticket where we let them know: 9226409-zd-a8c
Contributor guide
Research direction
Start by tracing the jetpack_stats_excluded_ips filter and the Jetpack Stats tracking-script path, then investigate how cached pages bypass dynamic visitor-IP detection. Reproduce the behavior on a cached site and verify that configured IP exclusions prevent tracking for both cached and uncached pages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- analytics, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100