Tailored Audiences User Data

This document outlines the format for Tailored Audience user data.

Data normalization

Device IDs:

  • IDFA - lower-cased with dashes; ex: 4b61639e-47cc-4056-a16a-c8217e029462
  • AdID - original format on device is required, not capitalized with dashes; ex: 2f5f5391-3e45-4d02-b645-4575a08f86e
  • Android id - original format on device is required, not capitalized without dashes or spaces; ex: af3802a465767e36

Email Addresses:

  • lowercase, remove leading and trailing spaces; ex: support@twitter.com

Phone Numbers:

  • Include country (no preceding zeroes e.g. for US use 1 instead of 001) and area code
  • No characters like +, - ( or )
  • Examples: 14083008000, 454083008000

Twitter Usernames:

  • no @, lowercased and leading and trailing spaces trimmed; ex: jack

Twitter User IDs:

  • Standard integer; ex: 143567

Data hashing

The data for each line must be hashed using SHA256, without a salt.  Additionally, the final output hash must be in lower case. E.g., 49e0be2aeccfb51a8dee4c945c8a70a9ac500cf6f5cb08112575f74db9b1470d and not 49E0BE2AECCFB51A8DEE4C945C8A70A9AC500CF6F5CB08112575F74DB9B1470D

  # hasing user @AdsAPI using python
import hashlib
hashlib.sha256("adsapi".encode()).hexdigest()

#output
49e0be2aeccfb51a8dee4c945c8a70a9ac500cf6f5cb08112575f74db9b1470d

Additional code samples for hashing can be found at github.com/twitterdev/ads-platform-tools.