Skip to content

Ignore blank GPP values; only send IABGPP_GppSID with IABGPP_HDR_GppString - #95

Open
jrosendahl-opt wants to merge 2 commits into
masterfrom
fix/gpp-blank-and-legacy-sid
Open

jrosendahl-opt wants to merge 2 commits into
masterfrom
fix/gpp-blank-and-legacy-sid

Conversation

@jrosendahl-opt

Copy link
Copy Markdown
Contributor

Follow-up to #86, mirroring the fix made in Optable/optable-android-sdk#49 after review there.

Changes

  • Blank values count as unset. IABConsent reads IABGPP_HDR_GppString, IABGPP_2_TCString and IABGPP_GppSID through a helper that returns nil for empty or whitespace-only strings. A blank IABGPP_HDR_GppString now falls back to the legacy key, and the SDK never sends gpp= or gpp_sid=.
  • IABGPP_GppSID only goes with IABGPP_HDR_GppString. The CMP's section IDs describe the CMP's own string, so IABConsent.gppSid returns nil unless IABGPP_HDR_GppString is set. They're no longer sent with a legacy IABGPP_2_TCString value. EdgeAPI's logic is unchanged.
  • OptableConfig.gppSid doc now says the UserDefaults fallback applies only when gpp comes from IABGPP_HDR_GppString.

Tests

New EdgeAPITests cases:

  • legacy key + IABGPP_GppSID = "2_7" → legacy gpp, no gpp_sid
  • IABGPP_HDR_GppString = "" + legacy key → legacy gpp
  • IABGPP_HDR_GppString set + IABGPP_GppSID = "" → no gpp_sid
  • both GPP keys blank → no gpp

Full suite passes locally on an iPhone 17 Pro simulator: 108 tests, 0 failures.

🤖 Generated with Claude Code

…tring

A blank (empty or whitespace-only) IABGPP_HDR_GppString, IABGPP_2_TCString
or IABGPP_GppSID now counts as unset, so gpp falls back to the legacy key
and the SDK never sends an empty gpp= or gpp_sid=. IABGPP_GppSID describes
the CMP's own string, so it's no longer sent alongside the legacy
IABGPP_2_TCString value.

Mirrors Optable/optable-android-sdk#49.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jrosendahl-opt
jrosendahl-opt requested review from a team as code owners November 9, 2026 22:27
…ides

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant