Data Pre-Processing and Hashing

To improve your match rate to audience data, we recommend some basic steps to ensure you call the API with valid identifiers.

For emails:

  1. Remove whitespace. Spaces, tabs and other empty characters should be removed from the plaintext email.
  2. Downcase. Convert any cApiTaL letters into the lower case equivalent.
  3. Evaluate against a regular expression.
  4. Drop "fake" emails. Samples below.

For phone numbers, ensure you remove any country codes or formatting before SHA1 hashing, e.g.:

+1 (415) 555-6656 should become 4155556656 before hashing.

Hashing Code Samples

While ats.js hashes any identifiable identifiers on the client before calling the API, you may wish to provide hashed values directly in your ATS configuration for extra assurance.

We recommend using a library like jshashes on the web or node.

import hashlib

def get_hashes(message):
        hash_result = {}
        hash_result['md5'] = hashlib.md5(message).hexdigest()
        hash_result['sha1'] = hashlib.sha1(message).hexdigest()
        hash_result['sha256'] = hashlib.sha256(message).hexdigest()
        return hash_result

input_email = '[email protected] '.lower().strip().encode('utf-8')
print(get_hashes(input_email))