メインコンテンツまでスキップ

SFTP Events Integration Guide

The Rokt Ads SFTP integration enables advertisers and technology partners to securely send conversion and event data to Rokt in batches formatted as one or more .csv files. Sending your conversion data to Rokt closes the loop between ad exposure and downstream outcomes, enabling better campaign optimization and overall performance for advertisers in the Rokt network.

PrerequisitesPrerequisites への直接リンク

Before you begin, ensure you have:

  • Access to an SFTP client (e.g., FileZilla, WinSCP, or command-line sftp)
  • A Keybase account for secure credential exchange
  • Your Rokt Account Manager's contact information

1. Create CSV files1. Create CSV files への直接リンク

Prepare CSV files following these guidelines.

File format requirementsFile format requirements への直接リンク

  • Files must adhere to RFC 4180 CSV format standards.
  • Supported file formats:
    • Plain CSV (.csv)
    • ZIP archive containing one or more CSV files (.zip)
    • Gzip-compressed CSV (.csv.gz)
    • PGP-encrypted files with .gpg extension (e.g., .csv.gpg or .csv.gz.gpg). Contact your Rokt Account Manager for Rokt's public key.
  • File size: 5 MB – 2 GB (optimal). Split larger datasets into multiple files for parallel processing.
  • Maximum 50 columns per file.
  • Maximum row size: 80 KB.
  • All column names must be unique.
  • Do not use subfolders when uploading.

File namingFile naming への直接リンク

Use the following naming convention based on your data type:

File Name PatternExample
<name>-custom_event.csvpurchases-custom_event.csv
注意

Avoid dashes (-) and dots (.) in the <name> portion of your file name. The dash before custom_event is required.

Data requirementsData requirements への直接リンク

Each row must include at least one valid user.

注記

Rows missing valid identity values will fail processing. Ensure at least one identity column contains a value for every row.

Root-level fieldsRoot-level fields への直接リンク

Column NameExample ValueNotes
environmentproductionEnvironment identifier (e.g., development, production).
ip8.8.8.8User's IP address.

Event attributesEvent attributes への直接リンク

For conversion/event data, include the following columns:

Column NameExample ValueRequiredNotes
events.data.timestamp_unixtime_ms1699123456789YesEvent timestamp in Unix milliseconds.
events.data.event_nameconversionYesAlways set to conversion.
events.data.custom_event_typetransactionYesAlways set to transaction.
events.data.custom_attributes.conversiontypepurchaseYesThe type of action the user performed (e.g., signup, purchase, install).
events.data.custom_attributes.confirmationrefORD-54321YesUnique reference for deduplication.
events.data.custom_attributes.amount99.99NoTransaction amount (numeric). Include where applicable.

User identitiesUser identities への直接リンク

Column NameExample ValueNotes
user_identities.emailj.smith@example.comUser's email address (plaintext).
user_identities.otherfab1e2e699b3b927cbf875046a64f222Hashed email or other identifier. Use SHA-256. Lowercase and trim trailing spaces before hashing.

User attributesUser attributes への直接リンク

Include as many of the following attributes as available to improve matching:

Column NameExample ValueNotes
user_attributes.FirstNameJohnCustomer's first name.
user_attributes.FirstNameSha256fab1e2e699b3b927cbf875046a64f222SHA-256 hash of first name. Lowercase and trim spaces before hashing.
user_attributes.LastNameDoeCustomer's last name.
user_attributes.LastNameSha256fab1e2e699b3b927cbf875046a64f222SHA-256 hash of last name. Lowercase and trim spaces before hashing.
user_attributes.Mobile3125551515Phone number. Accepts 1112345678 or +1 (222) 345-6789 formats.
user_attributes.MobileSha256fab1e2e699b3b927cbf875046a64f222SHA-256 hash. Format as 5551234567 (digits only, no country code).
user_attributes.Age33Customer's age.
user_attributes.Dob19900717Date of birth in YYYYMMDD format.
user_attributes.GenderMCustomer's gender: M, Male, F, or Female.
user_attributes.CityBrooklynCustomer's city.
user_attributes.StateNYCustomer's state (two-letter code for US).
user_attributes.Zip11201Customer's zip/postal code.
user_attributes.TitleMrCustomer's title: Mr, Mrs, Ms, etc.
user_attributes.LanguageenISO 639-1 language code.
user_attributes.Value52.25Customer's monetary value.
user_attributes.PredictedLtv136.23Predicted lifetime value of the customer.

Device identitiesDevice identities への直接リンク

Column NameExample ValueNotes
device_info.http_header_user_agentMozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X)Browser or device user agent string.
device_info.android_advertising_id38400000-8cf0-11bd-b23e-10b96e40000dGoogle Advertising ID (GAID) for Android.
device_info.android_uuid550e8400-e29b-41d4-a716-446655440000Android device UUID.
device_info.ios_advertising_id38400000-8cf0-11bd-b23e-10b96e40000diOS Advertising ID (IDFA).
device_info.ios_idfv550e8400-e29b-41d4-a716-446655440000iOS Identifier for Vendor (IDFV).

Example CSV filesExample CSV files への直接リンク

Download a sample file to use as a template:

RoktSample-custom_event.csv

2. Get SFTP credentials2. Get SFTP credentials への直接リンク

Rokt uses Keybase for secure credential exchange.

SFTP server details:

  • Host: sftp://sftp.us2.mparticle.com
  • Port: 4422
SFTP clients (e.g. FileZilla, WinSCP)

When using a graphical SFTP client, use Host sftp.us2.mparticle.com, Protocol SFTP, and Port 4422 (or paste sftp://sftp.us2.mparticle.com if your client accepts a full URL). Enter the username and password from your Account Manager when prompted.

To obtain your credentials:

  1. Create a Keybase account at keybase.io using your work email.
  2. Share your Keybase username with your Rokt Account Manager.
  3. Your Account Manager will send your SFTP credentials via encrypted Keybase chat.
ヒント

Keep your credentials secure. Do not share them via email or other unencrypted channels.

3. Upload CSV files3. Upload CSV files への直接リンク

  1. Connect to the SFTP server:
sftp -P 4422 your_username@sftp.us2.mparticle.com
  1. Navigate to or create the drop folder structure:
cd drop
mkdir US2-123456789123456789 # Use the folder name provided by your Account Manager
cd US2-123456789123456789
  1. Upload your CSV files:
put purchases-custom_event.csv
注意

Verify there are no trailing spaces in folder names. The folder name is case-sensitive.

What happens nextWhat happens next への直接リンク

Files are added to the processing queue immediately after upload. Contact your Rokt Account Manager if you need to verify successful processing or encounter any issues.

この記事は役に立ちましたか?