Feature request: GeoLocation (Ip2Country)
In Prebid-server-java we see https://github.com/prebid/prebid-server-java/blob/c5e7782b15c3bd47267a9268fd25a21a8bf34d98/src/main/java/org/prebid/server/geolocation/MaxMindGeoLocationService.java geolocation services.
In Prebid-server (Go) no reference to any geolocation database (maxmind?) is found.
We see filtering based on Geo.Country as one of the most important filters in the campaign, and having this data already in bidrequest to DSP simplifies filtering. This is even more important in case where enduser ip is masked (x.x.x.0)
Our feature request is that prebid-server fills Geolocation (country, city) in openrtb.geo fields.
Hi @josepowera. We appreciate the feature request, however the team prefers to lean on community contributions for this. If you or someone else is interested in leading the development of this feature, we are happy to review and provide feedback.
@josepowera - we would welcome your contribution to the project. I will note that the implementation of the GDPR feature in PBS-Java masks the IP address before doing the geo-lookup. This is because our understanding of the intention of GDPR is better aligned with a policy of location privacy. We debated this aspect and determined that we could not afford to do two IP lookups: one unmasked and one masked... too expensive.
The algorithm is documented in the flowchart at https://docs.google.com/document/d/1g0zAYc_EfqyilKD8N2qQ47uz0hdahY-t8vfb-vxZL5w/edit#heading=h.yjh8s4sv17vv
just let you know that I'm working on this feature. please assigns this task to me if possible
@aptxx - that's good news, thanks! Some notes...
-
The system needs to architected so it can support different lookup services. You don't have to build them all, but it needs to be possible for others to swap in a different service.
-
There's been a change in PBS-Java since the comment from 2 years ago - it's doing the IP lookup before masking the address, but in PreciseGeo anonymization scenarios it places only the following fields in the device.geo object: country, region, and utcOffset. Don't place any other fields (metro, city, etc) in privacy scenarios.
-
Please make sure that the values placed into the OpenRTB match the ORTB spec:
- country: ISO-3166-1-alpha-3
- region: ISO-3166-2; 2-letter state code if USA
This is important because some IP lookup services use different values. e.g. if your service uses 2-letter country codes, a map from 2-to-3 is needed.
- PBS standard is to prefer values that come in on the request. i.e. if device.geo.country is on the request, don't replace it with the value from the service.
@bretg thank you for notes, that's so helpful
@bretg hi bretg, PR has been submitted, please take a look, thanks