Skip to content

HEM normalization does not match documentation #898

Description

@patmmccann

private String normalizeAndHash(MessageDigest digest, String s, boolean trimIntermediateSpaces)
has a bug

Describe the bug:
https://developers.google.com/google-ads/api/docs/remarketing/audience-segments/customer-match/get-started says to remove .'s and +'s and text after the + from gmail and googlemail emails. This function fails to do that. The same generic helper is used for phone numbers. It removes whitespace, but it does not actually perform general E.164 conversion.

I didnt double check them all but I believe the same bug exists in the repos for other languages

Steps to Reproduce:
Normalize Jane.doe+shopping@gmail.com, becomes jane.doe+shopping@gmail.com
+1 (800) 555-0102 becomes +1(800)555-0102

Expected behavior:
janedoe@gmail.com
+18005550102

Client library version and API version:
Client library version: current
Google Ads API version: current
JDK version: current

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions