I’m trying to not collect the user_ipaddress (but keep collecting domain_userid and domain_sessionid).
This doesn’t seem possible with anonymous tracking (which prevents collection of all 3 fields).
However, the docs say that I could override the value for ip (or user_ipaddress). How can I achieve this (either via an exposed function or by editing the sp.js tracker itself)?
@whitepanda , it is achieved in Enrich. That is while you cannot prevent sending the IP address to the collector (it is a part of HTTP protocol), you can mutate it in Enrich with one of the available enrichments. There are three enrichments that can do the job for you with a different outcome:
- IP anonymization enrichment is used to mask the IP address
- PII pseudonymization enrichment is used to hash the IP address
user_ipaddress is defined as a string with up to 128 characters and could be nullable you can replace the actual IP with any string or just nullify it.
The IP anonymization enrichment is the simplest to deploy.