Formatting Identifiers
Follow the guidelines listed below when formatting identifiers (whether known or pseudonymous identifiers).
For a list of identifiers that can be hashed, see "Hashing Identifiers."
Note
Known identifiers and PII identifiers are sometimes referred to as "offline identifiers." Pseudonymous identifiers and device identifiers are sometimes referred to as "online identifiers." See "Identifier Data" for more information.
Warning
Do not combine known identifiers and pseudonymous identifiers in a single file.
When Formatting File Data, you may include as many plaintext postal addresses per individual as you know, but if you have multiple addresses for the same person, place each on a separate row along with the same "first name" and "last name" info (but segment data values do not need to be duplicated/included on those additional rows).
Note
Because postal addresses are comprised of multiple fields, including only one per row ensures there are no accidental mismatches of elements from the different address fields. If you need to include multiple addresses per row, contact your LiveRamp representative for details.
Each of the elements listed below is required for name and postal address identifiers, and each element must be in a separate column:
Caution
Make sure to separate names into first and last name fields. Do not include middle name(s) or initials.
Element | Header(s) | Notes |
---|---|---|
First name | FIRSTNAME | |
Last name | LASTNAME | |
Street address | ADDRESS1 ADDRESS2 (optional) | A single full address field should not contain a newline character. This tends to occur when you generate the data in a spreadsheet application like Excel and place two lines inside one cell. |
City | CITY | |
State | STATE | |
ZIP code | ZIP | You can include either 5-digit or 9-digit (ZIP+4) values. If sending 9-digit values, do not include hyphens. Note: Matching using only ZIP+4 is available for certain use cases. Contact your LiveRamp representative for details. |
Caution
LiveRamp cannot accept hashed name and postal address data. Unfortunately, there is too much variation in casing and whitespace to do this reliably.
LiveRamp accepts plaintext and SHA-1 hashed phone numbers (see "Hashing Phone Numbers" below for more information).
Caution
EU data files cannot contain hashed phone numbers. Email addresses are the only identifiers that can be hashed in EU data files.
You may include as many phone numbers per individual as you know. Place all phone numbers for the same person in the same row, with each phone number in its own distinctly-labeled column. This minimizes file size and ensures there are not conflicting segment values tied to the same identifier.
Note
If including multiple phone numbers, be sure to use unique field names (for example, "HOME_PHONE" and "MOBILE_PHONE").
Use one of the allowed formats listed below:
+1XXXXXXXXXX
+1 (XXX) XXX-XXXX
(XXX) XXX-XXXX
XXX-XXX-XXXX
XXX XXX XXXX
XXXXXXXXXX (this format must be used if hashing)
LiveRamp accepts SHA-1 hashed phone numbers. Remove all country extensions, parentheses, and hyphens and then perform UTF-8 encoding on the string before hashing.
For example, if the input phone number is "+1 (555) 123-4567", convert that to "5551234567" before hashing.
Warning
EU data files cannot contain hashed phone numbers.
LiveRamp accepts plaintext and SHA-256, MD5, or SHA-1 hashed email addresses (see "Hashing Email Addresses" below for more information on performing hashes).
You may include as many email addresses per individual as you know. Place all email addresses for the same person in the same row, with each email address in its own distinctly-labeled column. This minimizes file size and ensures there are not conflicting segment values tied to the same identifier.
Note
Make field names unique: If including multiple email addresses, be sure to use unique field names (such as "EMAIL1", "EMAIL2", etc.).
LiveRamp accepts SHA-256, MD5, or SHA-1 hashed email addresses.
Convert all characters to lowercase, remove all whitespace, and perform UTF-8 encoding on the string before hashing. For example, the plaintext email address "MyName@liveramp.com " must be changed to "myname@liveramp.com" before hashing.
Caution
Make sure to check that your hashing algorithm produces the results for email address hashing produced in the “Hashing Examples” section of this document. Hashing algorithms that put a “0x” at the beginning of the hash string will result in the file upload failing.
Note
Your match rates may be slightly lower with hashed email addresses than with plaintext emails. To maximize the match rates for hashed email addresses, send all three hash types, each in a separate column.
MD5 Hashing in Python
The following code snippet shows an example of how to perform an MD5 hash of an email address in Python.
# Import hashing library import hashlib # The input email has capital letters and a space at the end. input_email = "IMeyers@liveramp.com " # The input email address is downcased and ALL whitespace (not only spaces) is removed. hashed_email = hashlib.md5(''.join(input_email.lower().split())).hexdigest()
SHA-1 Hashing in Ruby
The following code snippet shows an example of how to perform a SHA-1 hash of an email address in Ruby.
# Load the Digest module require 'digest' email_to_hash = 'liveramp@example.com' # Get the hex-encoded hash value (a.k.a. digest value) of the email address # after stripping leading and trailing white space and replacing all uppercase # letters with their lowercase counterparts. Digest::SHA1.hexdigest(email_to_hash.strip.downcase) #=> "91ac4ee2ca1782581f12d865a6779eb179f8b22a"
SHA-1 Hashing in Python
The following code snippet shows an example of how to perform an SHA-1 hash on a phone number in Python.
import hashlib # A phone number in the correct format input_phone = "4159870604" # SHA-1 hash the phone number hashed_phone = hashlib.sha1(input_phone).hexdigest()
Other Hashing Examples
There are JavaScript libraries available that can perform SHA-1 hashes—for example, this one from Google.
When formatting file data before uploading files, do not modify (e.g., by changing casing) cookie values.
LiveRamp accepts the following plaintext or SHA-1 hashed mobile device IDs (see "Hashing Mobile Device IDs" below for more information):
Identifier for Advertisers (also known as IDFA) (Apple/iOS devices).
Android Advertising ID (also known as AAID) (Android devices).
Plaintext mobile device IDs should be downcased and hyphenated. For example: 1f4d256c-1f08-41f6-a108-bbe511de9497.
Plaintext AAIDs ( Android device IDs) and IDFAs ( iOS device IDs) can be included together in the same file. LiveRamp can match off of both IDs at the same time as long as they are in plaintext. All IDs should be in a single mobile device ID column, regardless of whether the ID is an AAID or an IDFA.
Caution
Have both types? Hashed AAID IDs and hashed IDFA IDs cannot be accepted in the same file. To send both types of hashed mobile device IDs, put them in separate files.
LiveRamp accepts SHA-1 hashed mobile device IDs.
Before hashing:
AAIDs must be downcased and hyphenated
IDFAs must be upcased and hyphenated
Perform UTF-8 encoding on the string
Caution
Hashed AAID IDs and hashed IDFA IDs cannot be accepted in the same file. To send both types of hashed mobile device IDs, put them in separate files.
When formatting file data before uploading files, do not modify (e.g., by changing casing) custom ID (CID) values.
When formatting file data before uploading files, do not modify RampID values. For example, do not change the case of alphabetical characters.