Looking up provider information requires a DNS reverse lookup which can severely
slow down bulk tracking.
Only try if IP is not anonymized and provider lookups are not explicitly disabled for the request (?dp=1).
The import_logs.py server log analytics import script allows to disable reverse DNS lookups to speed up bulk imports using the query parameter dp=1
. While the Provider
plugin does properly respect the parameter and skips any lookups if the parameter is set, the UserCountry
plugin ignores the parameter.
In my case this adds about 0.4s for each imported hit.
The only workaround would be to disable the UserCountry
plugin completely which is not great, since it should still be used for standard website tracking.
In addition, in my case the IP addresses were already sent anonymized and again, while the Provider
properly skips any reverse lookups – that would fail – if the IP is anonymized, the UserCountry
plugin takes any IP to try to detect the country based on provider information.