Mida allows you to control how much of your visitors' IP addresses are stored, helping you comply with privacy regulations like GDPR while maintaining useful geolocation data for your A/B tests.
What is IP Masking?
By default, Mida masks the last octet of visitor IP addresses before storing them. For example, 192.168.1.123 becomes 192.168.1.0. This provides a balance between privacy and geolocation accuracy.
You can increase the masking level for stricter privacy compliance.
Available Privacy Levels
Level | Example | Accuracy | Best For |
Level 1 (default) | 157.123.10.0 (/24) | City-level | Precise geo-targeting while maintaining privacy |
Level 2 | 157.123.0.0 (/16) | Country-level | GDPR compliance with regional insights |
Level 3 | 157.0.0.0 (/8) | Very broad | Maximum privacy (may be inaccurate even at country level) |
How to Configure
Add the ip-mask parameter to your Mida script tag:
Level 1 (Default)
No changes needed. This is the default behavior.
<script type="text/javascript" async src="https://cdn.mida.so/js/optimize.js?key=YOUR_KEY"></script>
Level 2 - Country Level
<script type="text/javascript" async src="https://cdn.mida.so/js/optimize.js?key=YOUR_KEY&ip-mask=2"></script>
Level 3 - Maximum Privacy
<script type="text/javascript" async src="https://cdn.mida.so/js/optimize.js?key=YOUR_KEY&ip-mask=3"></script>
Using the Installation Guide
You can also configure IP masking directly from the Mida dashboard:
Go to Settings β Installation
Click Advanced Configuration
Select your preferred IP Address Privacy Level
Copy the updated code snippet
Replace the existing script on your website
β οΈ Important: After changing your configuration, you must update the script on your website for changes to take effect.
Considerations
Higher privacy = less accurate geolocation: Level 3 masking may result in inaccurate country detection
Existing data is not affected: This setting only applies to new visitors after the change
FAQ
Q: Does IP masking affect my A/B test results?
A: No, IP masking only affects stored geolocation data. Your test variations and conversion tracking work normally.
Q: Can I change the masking level later?
A: Yes, simply update the ip-mask parameter in your script tag. New visitors will use the new setting.
Q: What about IPv6 addresses?
A: Mida automatically handles IPv6 addresses with equivalent masking levels.

