Knowledge Base

Creating an Email Hash File: Best Practices

Using a secure email hash, LiveIntent can match your customer email segments to 290MM+ email openers serving targeted display messaging across all devices in real-time.

To protect your data, the privacy of your customers, as well as stay in compliance with the U.S. Federal Trade Commission (FTC), we require all email audience files to be hashed. Hashing converts a normal email address and converts it into a 32-character hexadecimal string, and most importantly removes the consumers personally identifiable information (PII).

To watch our LiveIntentional on Email hashing, click here.

 

________________________________________________________________ 

1. Format
You'll need to first format the email addresses. Remove any extra characters and whitespace, and make sure the email addresses are all in lowercase.

 

Correct Format: kate@liveintent.com

Incorrect Formats: Kate@LiveIntent.com or <kate@gmail.com>


2. Hash your email list
 
You can use any number of tools, such as AWK and PHP (see below), to hash your list. You can also ask your ESP to provide you your customer segments as hashes or use the HashIt app http://www.hashitapp.com/. For privacy and data security reasons, LiveIntent employees cannot accept raw email lists from our customers. Likewise, we cannot hash raw email addresses for clients. 
 
3. Save the hashed file
Save the file(s) as .txt or .csv with a newline separator between each email or hash.
 
4. Deliver
That’s it! When you send your files to LiveIntent, please provide three, unhashed email addresses that should be within your CRM file. This will help us double-check that your data was formatted correctly.
 
Sample Hashing Commands
Awk and PHP are two tools for parsing your properly segmented and formatted email file into MD5 hashes: 
 
Awk Solution
Works on: most UNIX-based machines (Mac/Linux)
Example input file name: emails.csv
Example output file name: md5.csv 
 
Linux computer: 
cat emails.csv | awk ‘{command=”printf %b “$1” | md5sum”; 
command | getline $1; close(command); print $0}’ | cut -f 1 
-d “ “ > md5.csv 
 
Mac computer: 
cat emails.csv | awk ‘{command=”printf %b “$1” | md5”; 
command | getline $1; close(command); print $0}’ | cut -f 1 
-d “ “ > md5.csv
 
 
PHP Solution 
Works on: device with PHP installed (all Macs come with PHP) PHP script for parsing a file and outputing MD5 hashes for each line in the file:
 
<?php
if ($argc < 2 || !is_readable($argv[1])) {
die(‘Invalid file name specified’);
}
 
$fp = fopen($argv[1], ‘r’); 
 
while ($line = fgets($fp)) {
echo md5(trim($line)) . “\n”;
}
 
fclose($fp);
 
Assuming you have saved it as md5.php, you would simply run it with the following command: php md5.php emails.csv > md5.csv
 

 

Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk