IP masking is the option that allows the websites' owners to hide their website visitors' IP addresses while processing the data in Google Analytics. Masking (or anonymization) and the partial storage of IP addresses help to comply with the personal data protection requirements, including both privacy policies of the platforms and national laws. The address is masked at once as it reaches the Analytics data collection network, before being processed and stored.(
Google Analytics Help Center)