r/PPC • • 3d ago

Tools Free Google Sheets script to normalize, validate & SHA-256 hash Enhanced Conversions before upload

Sharing a small Google Apps Script I built for prepping offline conversions and lead lists in Google Sheets before uploading the CSV to Google Ads Data Manager.

If you are uploading manually without a CRM integration or Zapier, match rates usually take a hit because raw CRM exports have Gmail dots or +aliases, local phone numbers missing E.164 country codes, or formatting errors that reject the batch. Most free scripts I found online just overwrite your raw cells in-place, which gets messy fast.

This runs locally inside your active Sheet (no external API calls or third-party servers, scoped strictly to the current document):

  • Leaves your original tab untouched and creates two new tabs: GAds_Hashed for clean rows ready to download as CSV, and GAds_Flagged for anything with errors or duplicates (with the source row number and reason).
  • Normalizes before hashing: strips Gmail dots and +tags, converts local phone numbers to E.164 using the row's country column, and cleans up casing and extra spaces on names and locations.
  • Hashes only the PII match keys (Customer Email, Mobile, First Name, Last Name, City, State) and leaves GCLID, Country, Postal Code, conversion timestamps, and values intact.
  • Validates country codes, ISO currencies, and timestamps before hashing so bad rows get caught upfront instead of breaking the import.

Full code and column header instructions are in this Gist if anyone wants to copy-paste it into Extensions > Apps Script : https://gist.github.com/roy2026-creator/7e3651b024361e2f221c3a159242aeae

3 Upvotes

0 comments sorted by