Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: GeoLocation (Ip2Country) #2350

Open
josepowera opened this issue Aug 11, 2022 · 6 comments
Open

Feature request: GeoLocation (Ip2Country) #2350

josepowera opened this issue Aug 11, 2022 · 6 comments
Labels

Comments

@josepowera
Copy link

josepowera commented Aug 11, 2022

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.

@bsardo
Copy link
Collaborator

bsardo commented Aug 16, 2022

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.

@bretg
Copy link
Contributor

bretg commented Sep 1, 2022

@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

@aptxx
Copy link

aptxx commented Aug 3, 2024

just let you know that I'm working on this feature. please assigns this task to me if possible

@bretg
Copy link
Contributor

bretg commented Aug 3, 2024

@aptxx - that's good news, thanks! Some notes...

  1. 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.

  2. 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.

  3. 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.

  1. 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.

@aptxx
Copy link

aptxx commented Aug 4, 2024

@bretg thank you for notes, that's so helpful

@aptxx
Copy link

aptxx commented Aug 27, 2024

@bretg hi bretg, PR has been submitted, please take a look, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Ready for Dev
Development

No branches or pull requests

5 participants