Skip to content

feat(google): send plain countryCode for address matching#6

Merged
NagaYu merged 1 commit into
mainfrom
feat/google-country-code
Jun 28, 2026
Merged

feat(google): send plain countryCode for address matching#6
NagaYu merged 1 commit into
mainfrom
feat/google-country-code

Conversation

@NagaYu

@NagaYu NagaYu commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Resolves #1.

What

  • Add countryPlain (plain ISO alpha-2) to HashedCustomer alongside the hashed country.
  • Populate it in normalizer.ts#hashCustomer.
  • Use it for Google's addressInfo.countryCode in sync.ts#toGoogleIdentifiers.

Why

Google's countryCode must be plain text, but we hash country for Meta parity. Keeping both lets country participate in Google address matching without regressing Meta.

Tests

  • New unit test asserts Meta gets the hashed country and Google gets plain US.
  • 24/24 vitest tests pass; tsc --strict and build green locally.

HashedCustomer now carries both a hashed `country` (for Meta's COUNTRY
column) and a plain-text `countryPlain` (for Google's
addressInfo.countryCode, which must not be hashed). This enables country
to participate in Google Customer Match address matching.

Country alone is not PII, so retaining the plain ISO alpha-2 value is safe.

Closes #1

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@NagaYu NagaYu merged commit 1369b1e into main Jun 28, 2026
3 checks passed
@NagaYu NagaYu deleted the feat/google-country-code branch June 28, 2026 11:01
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.

Google Customer Match: send plain countryCode for address matching

1 participant