Skip to content

Exclude device.geo.country from the request. - #947

Closed
mdanylov-sigma wants to merge 1 commit into
masterfrom
feature/872-excluding-device.geo.country
Closed

mdanylov-sigma wants to merge 1 commit into
masterfrom
feature/872-excluding-device.geo.country

Conversation

@mdanylov-sigma

Copy link
Copy Markdown
Collaborator

#872

Summary

Fixes Android device.geo.country population to align with iOS behavior and OpenRTB expectations.

Previously, the SDK populated device.geo.country from carrier/locale data, which could produce ISO-3166-1 alpha-2 values such as US or CA. OpenRTB expects this field to use ISO-3166-1 alpha-3 when populated, and the value should generally come from location-based reverse geocoding rather than SIM/network carrier data.

Changes

  • Removed SDK-side population of device.geo.country from carrier, locale, and geocoder fallbacks.
  • Added test coverage to verify geo.country is not populated from SIM/network carrier country values.
  • Aligns Android behavior with iOS, where this field is not populated by the SDK.

@YuriyVelichkoPI YuriyVelichkoPI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the population of country code was removed instead of converting it into the needed format using the system function?

@mdanylov-sigma

mdanylov-sigma commented Jul 29, 2026 •

Copy link
Copy Markdown
Collaborator Author

Why the population of country code was removed instead of converting it into the needed format using the system function?

Based on expected behaviour in the issue ->
image

Should we choose other way to resolve the issue? If yes, we need to align iOS to send
geo.country ?

@YuriyVelichkoPI

Copy link
Copy Markdown
Contributor

I've asked the issue owner about motivation to remove avaliable signal. Leet's wait for a feedback

@postindustria-code postindustria-code left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@YuriyVelichkoPI

Copy link
Copy Markdown
Contributor

We discussed this ticket on PMC and agreed that we need more detailed investigation of what should be sent in the request. Different IAB standards require different format.

Don't merge this one so far.

@mdanylov-sigma

Copy link
Copy Markdown
Collaborator Author

Closing in favor of #1022. Following @YuriyVelichkoPI's decision in #872 (comment), we're keeping device.geo.country and converting it to alpha-3 behind an SDK-level config flag rather than removing it from the request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants