1. Home
  2. Docs
  3. Implementation Guide: TikTok Events API for Offline Events
  4. Part 2: Set up an Offline Data Source

Part 2: Set up an Offline Data Source

AWS S3 Setup:

Amazon Web Services (AWS) offers Amazon S3, a scalable cloud-based object storage service. It allows users to store and retrieve data from anywhere on the internet using a simple web interface, or application programming interface.

To get started, click on the AWS S3 Source tile from the dashboard.

The First step is to select the data type. This helps Datahash in understanding what type of integration the user wants to do. Currently, we support offline events, custom audience, and leads data type integration across multiple advertising destinations.

For offline events, click on Events.

Offline Events Integration:
  1. Select the ‘Events’ options in the data type selection step as shown below and give a name to your connection.
  • In order to setup the connection successfully, kindly download the file which help you understand the overall structure in which you need to get the data setup. Once done, take the downloaded file set-up in an AWS S3 bucket and add credentials in the next step.
  • This is the most important step where the user needs to provide the FTP credentials which will help Datahash to access the file for further processing. These credentials are:
  • S3 Bucket Name: The AWS S3 bucket name is a unique identifier for your storage container in Amazon S3 (Simple Storage Service).
  • S3 Bucket Access Key: The AWS S3 bucket access key is a security credential used to authenticate and authorize access to your Amazon S3 buckets. It is a combination of an access key ID and a secret access key.
  • S3 Bucket Secret: The AWS S3 bucket access key is a security credential used to authenticate and authorize access to your Amazon S3 buckets.
  • Relative path to data folder: A path like prefix name where you have stored the data in the S3 Bucket like ‘my folder/this table’

Once all the credentials are provided, Datahash will validate the credentials, after which the connection will be successfully setup – if all the credentials are valid.

File Format

Overview – To Implement Offline events, the client needs to upload the Customer Fields as mentioned in the file downloaded during the setup (Step 2) in a CSV using the below-specified format. This file works for all three platforms i.e., Facebook, Google and Snap

Note on Encryption – All the Customer Data Fields that say ‘Hashed’ needs to be encrypted using the ‘SHA256’ format.

Mandatory Fields:

Datahash FieldsRequired/OptionalFormat
Event Data
event_timeRequiredUNIX timestamp
currencyRequired for purchase eventsThree-letter ISO currency code
valueRequired for purchase eventsDouble
transaction_idRequired for purchase eventsString
User Data
Email_hashedRequiredTrim leading and trailing white space and convert all characters to lowercase
Phone_hashedRequiredNumber up to fifteen digits in length starting without 0 and removing any non-numeric characters such as whitespace, parentheses, ‘+’, or ‘-‘ from phone numbers

How can we help?