-
Notifications
You must be signed in to change notification settings - Fork 122
Add support for on-device conversions using hashed email address and phone number. #1603
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5b7b324
Add function header for hashed email address and phone number functions.
jonsimantov 9cfc8e2
Format code.
jonsimantov c33016b
Add integration test for hashed email/phone.
jonsimantov cbb48a2
Add missing header.
jonsimantov 5ef1ee6
Format code.
jonsimantov 7cc74b6
Fix Doxygen.
jonsimantov 1ff94d6
Add iOS implementation.
jonsimantov 9a5abf9
Add iOS implementation.
jonsimantov 7c5436c
Format code.
jonsimantov 297fde8
Add readme.
jonsimantov f475441
Fix usage.
jonsimantov 8bd0fdd
Capitalize SHA
jonsimantov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -220,6 +220,26 @@ TEST_F(FirebaseAnalyticsTest, TestSetProperties) { | |
"[email protected]"); | ||
firebase::analytics::InitiateOnDeviceConversionMeasurementWithPhoneNumber( | ||
"+15551234567"); | ||
|
||
std::vector<unsigned char> hashed_email = { | ||
// SHA256-encoded "[email protected]" | ||
0x31, 0xc5, 0x54, 0x3c, 0x17, 0x34, 0xd2, 0x5c, 0x72, 0x06, 0xf5, | ||
0xfd, 0x59, 0x15, 0x25, 0xd0, 0x29, 0x5b, 0xec, 0x6f, 0xe8, 0x4f, | ||
0xf8, 0x2f, 0x94, 0x6a, 0x34, 0xfe, 0x97, 0x0a, 0x1e, 0x66, | ||
}; | ||
|
||
firebase::analytics:: | ||
InitiateOnDeviceConversionMeasurementWithHashedEmailAddress(hashed_email); | ||
|
||
std::vector<unsigned char> hashed_phone = { | ||
// SHA256-encoded "+12345556789" | ||
0x12, 0x8c, 0x64, 0xfe, 0x24, 0x0f, 0x08, 0x75, 0xf5, 0x98, 0xc3, | ||
0x48, 0x0e, 0xb0, 0x38, 0xd2, 0xe6, 0xb0, 0x05, 0xd1, 0xa0, 0x57, | ||
0xb6, 0x21, 0x4a, 0xc2, 0x09, 0xf6, 0xe5, 0xc0, 0x68, 0x41, | ||
}; | ||
|
||
firebase::analytics:: | ||
InitiateOnDeviceConversionMeasurementWithHashedPhoneNumber(hashed_phone); | ||
} | ||
|
||
TEST_F(FirebaseAnalyticsTest, TestLogEvents) { | ||
|
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.