Summary
IP masking, anonymity sets, and no more cookies
Checklist
Completed items are on master branch
IP Masking
Same approach as Google Analytics IP Anonymization
- IPv4 - set last octet to 0
- IPv6 - set last 80 bits to zeros
Anonymity Sets & Cookies
Instead of cookies, use the following formula for visit and visitor tokens.
uuid_v5("visit(or)/#{masked_ip_address}/#{user_agent}")
Visitors with the same masked IP address (see above) and user agent combo will be grouped together into an anonymity set
Note: Visits have an infinite duration - one approach is to add the current date/week to the hash, but this will interfere with active visits during switchover
Readme instructions
Update config/initializers/ahoy.rb to:
class Ahoy::Store < Ahoy::DatabaseStore
def authenticate(data)
# do not link visits and users automatically
end
end
Ahoy.mask_ips = true
Ahoy.cookies = false
If you use JavaScript tracking, set:
ahoy.configure({cookies: false});
Notes
- Encryption: Should already to do this with
config.force_ssl
- Data deletion: Data is stored in your data store, so already have full control
Resources
Summary
IP masking, anonymity sets, and no more cookies
Checklist
Completed items are on
masterbranchAhoy.mask_ips = true(side effect: reduces geocoding accuracy)Ahoy.cookies = falseto function server-side without cookiesAhoy.configure({cookies: false})to Ahoy.js to function client-side without cookiesIP Masking
Same approach as Google Analytics IP Anonymization
Anonymity Sets & Cookies
Instead of cookies, use the following formula for visit and visitor tokens.
Visitors with the same masked IP address (see above) and user agent combo will be grouped together into an anonymity set
Note: Visits have an infinite duration - one approach is to add the current date/week to the hash, but this will interfere with active visits during switchover
Readme instructions
Update
config/initializers/ahoy.rbto:If you use JavaScript tracking, set:
Notes
config.force_sslResources