For quite some use cases, I'd like to be able to set the visitor's IP address, exactly like the "cip" parameter does. The current hook "Tracker.setVisitorIp" is mainly used for anonymizing the IP address in the PrivacyManager, which is set too late in the request workflow (afterRequestProcessed).
An potential use case is VAST tracking - the client IP address can be delivered by X-Forwarded-For, or X-Device-IP or X-Client-IP. In some cases, there will be IP addresses in all of those headers and you'll have to run this through plugin business logic to set the correct one.
Introduce a hook to set the client IP address early in the request workflow (just like the cip parameter). Perhaps, we can also rename the "Tracker.setVisitorIp" because the name implies, that this method is not only for saving a certain IP address, but also for setting the IP before it gets processed by e.g. fingerprinting, visitor recognition, geolocation, etc.
@peterbo Did you try using a RequestProcessor for that? I think the method manipulateRequest
should be called before anything is done with the request parameters, so it could be used to maniuplate the cip
parameter for example. (But setting it, might also require a correct token_auth set for the request)
Hey @sgiehl ! - Yes, I'm going to use that as a workaround, until there is a hook. Thanks for the hint!