Vireo 0.23.0 adds a setting called “Shorten IP addresses”. It’s off by default and it’s in the free plugin. When you turn it on, Vireo drops the last part of each visitor’s address before it uses the address for anything it stores.
We built it for one condition in the analytics guidance from CNIL, France’s data protection authority. That guidance lists conditions for exempting audience measurement from consent, and one is about IP addresses: “To truncate the last byte of the IP address”. This setting covers that condition, at some cost in precision.
What it changes
For IPv4, Vireo keeps the first three numbers and zeroes the last one, so 203.0.113.9 becomes 203.0.113.0. For IPv6, it keeps the first 48 bits and zeroes the rest, so 2001:db8:85a3:8d3:1319:8a2e:370:7348 becomes 2001:db8:85a3::. An IPv4 address written in IPv6 form, like ::ffff:203.0.113.9, comes out as the shortened IPv4 address.
With the setting on, the full address never reaches:
- the daily visitor code, a keyed hash of address plus browser, using a secret that changes every day
- the country lookup and the 30-day country cache
- the short-lived file that holds each view until it reaches the database, usually within a minute
Turning the setting on changes nothing that’s already stored.
Vireo sets no cookies and doesn’t store raw IP addresses in its analytics tables.
What still sees the full address
A few checks still work from the exact address, in memory only. They keep nothing from it except a yes or no answer.
Your excluded IPs list (Settings, “Excluded IPs / CIDR”) needs the exact address, because an address or range you excluded has to match exactly. The bot and hosting-network range checks need it too. The rate limit on incoming tracking requests, a cap per address per minute against floods, also uses the full address.
When it’s on
Country lookups use the shortened address.
Visitors on the same network who share a browser count as one person more often.
Switching the setting on or off partway through a day gives everyone a new visitor code, so switch it at the start of a day.
The CNIL exemption
CNIL’s Sheet n°16 on analytics, dated June 11, 2020, says audience measurement tools that use cookies or trackers are subject to consent, with one exception. The page says it concerns the ePrivacy directive and may vary by country, and suggests checking your local data protection authority’s position.
CNIL’s guidelines on cookies and other trackers list the conditions for that exception:
- inform users of their use
- give users the ability to object
- limit the purposes to audience measurement and A/B testing only
- don’t cross-check the data with other processing, such as customer files or stats on visits to other sites
- limit the tracker’s scope to a single site or app publisher
- “To truncate the last byte of the IP address”
- limit the lifetime of trackers to 13 months
If a site meets them, the rule switches from opt-in to opt-out.
Shorten IP addresses covers the IP line and nothing else on that list. The rest depends on how you run your site: your privacy notice, a way for visitors to object, and what else you combine the data with. That’s for you and your own advisor to decide. The privacy documentation describes the setting in full, and Analytics without cookies looks at whether a cookieless setup still needs a banner.
Turning it on
Go to Settings, then the Tracking tab, then the Geo-location section. In the “IP addresses” row, check “Shorten IP addresses”. The settings reference lists the rest of the options.
Also in 0.23.0
The Google Analytics 4 and Jetpack importers now bring in the whole history with no dates to pick, and running an import again skips days already imported.