ip address geolocation lookup #3887
Open
+4,048
−112
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support ip to geo location #2350
Looking for reviews
MaxMind is implemented. The MaxMind reader returns a 3166-1 Alpha2 country code. We've added a mapping for countrycode that converts the parsed Alpha2 code to Alpha3. To align with prebid-server-java and make it easier for non-developers to configure, the mapping data is stored in the country-codes.csv file within the code repository. This file is will be packaged into the binary at compile time.
The configuration files are mostly ported from the Java version to maintain consistency, so the default configurations are identical. The URL https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz is no longer valid. You now need to register a MaxMind account and get download link.
However, you can anonymously download the MMDB file from here: https://github.com/P3TERX/GeoLite.mmdb. But please remember, you will need to package it yourself into a .tar.gz format.
Configs
New section example:
GeoLocation feature need actived at account side. For example, actived in default account
Privacy
Considering that the IP needs to be checked for privacy status before use, and to avoid unnecessary processing of private information, we've extracted a more general method to determine the privacy status.
Additionally, following the traffic diagram from Prebid Server and GDPR, we've also implemented the consent_string_means_in_scope configuration option, which can be configured in both account GDPR and global GDPR settings