Repository navigation
Drop identifiers that are empty after normalization - #99
Open
jrosendahl-opt wants to merge 1 commit into
Open
jrosendahl-opt wants to merge 1 commit into
jrosendahl-opt wants to merge 1 commit into
Conversation
An identifier whose value normalizes to nothing, like .postalCode(" ")
or .custom(2, ""), was sent as a bare "prefix:". .emailAddress("") and
.phoneNumber(" ") were worse: they sent the SHA256 of an empty string,
which looks like a real ID. All of these now encode to an empty string
and are dropped from identify and targeting.
Targeting hids now skip empty identifiers, as ids already did, instead
of sending an empty hid=.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jrosendahl-opt
added a commit
that referenced
this pull request
Nov 10, 2026
An unknown type with a whitespace-only value, like "xyz: ", was sent as given. It's now dropped, matching #99, which drops typed identifiers that are empty after normalization. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
An identifier whose value is empty once normalized was still sent:
.postalCode(" ")or.custom(2, "")went out as a barez:orc2:..emailAddress("")and.phoneNumber(" ")sent the SHA-256 of an empty string (e3b0c442…b855), which looks like a real hashed ID. That's the same problem flagged in review of the Objective-C demo (Demo hashed IDs, identify-from-URL and profile id/neighbors in the Objective-C app #94), at the SDK level.The Android SDK is getting the same rule.
Goes in 1.4.0.
What Changed
OptableIdentifierEncoder.eidreturns an empty string when nothing is left after the type prefix, so the identifier is dropped. This covers every type at once.emailandphoneNumberreturn an empty string instead of hashing an empty value.hidsskip empty identifiers, asidsand identify already did, instead of sending an emptyhid=. [BREAKING] Add OptableIdentifier.raw for pre-encoded identifiers #98 makes the same one-line change; the two merge cleanly.How to Test
bundle exec fastlane testspasses (ran the suite on an iPhone 17 Pro simulator)""; empty Email and phone number are never hashed; targetingid/hiddrop a blank identifierNotes
test_json_identifierasserted.custom(2, "")→"c2:", the old behavior. It now uses.custom(2, "two")so it still checks ordering.Merges cleanly with Ignore blank GPP values; only send IABGPP_GppSID with IABGPP_HDR_GppString #95, Drop an app-supplied IDFA that matches the device's in any case #97 and [BREAKING] Add OptableIdentifier.raw for pre-encoded identifiers #98.
Breaking change
Requires release
🤖 Generated with Claude Code