AppsFlyer Setup Guide
Follow our setup guide to connect AppsFlyer to Fivetran. You can connect to Fivetran using:
IMPORTANT: Only use an HTTPS URL with TLS version 1.2 or above.
Prerequisites
To connect AppsFlyer to Fivetran, you need:
- An AppsFlyer account
- A Data Locker V2.0 Home Folder (if you are connecting using Data Locker)
Setup instructions
Begin Fivetran configuration
In the connector setup form, enter the Destination schema name of your choice.
Select one of the following options to connect to AppsFlyer:
- Data Locker. Integrate Data Locker if you want to sync events from Data Locker.
- Pull API. Integrate Pull API if you want to sync events from the Pull API.
- Push API. Integrate Push API if you want to sync events from the Push API.
NOTE: You can't connect to multiple APIs using the same connector.
Integrate Push API
In the setup form, find the webhook endpoint URL and make a note of it. You will need it to configure your AppsFlyer account to receive Push API events.
The webhook endpoint URL will have the
https://webhooks.fivetran.com/internal/<endpoint_ID>
format.Log in to your AppsFlyer account.
Follow AppsFlyer's instructions for setting up AppsFlyer attribution endpoints and SKAN attribution endpoints to integrate your AppsFlyer Push API V2.0 with Fivetran and to receive AppsFlyer and SKAN attribution messages. Register the webhook URL on your AppsFlyer dashboard.
Select the following mandatory Push API fields for AppsFlyer attribution messages:
app_id
appsflyer_id
event_name
event_time
event_value
api_version
NOTE: We skip the records that do not have these fields to prevent the syncs from failing and causing data integrity issues due to wrong de-duplication.
Integrate Pull API
Log in to your AppsFlyer account.
Find your API token and App ID in the Appsflyer dashboard. See AppsFlyer's Managing API tokens page to generate API token V2.
Integrate Data Locker
Log in to your AppsFlyer account.
Find your AWS Access Key and AWS Secret Key in the Data Locker Configuration screen. See AppsFlyer's Data Locker setup page for more information.
Follow AppsFlyer's Data Locker instructions to integrate your Data Locker V2.0 with Fivetran.
NOTE: You can use a bucket provided by AppsFlyer or your own AWS S3 bucket. See our instructions to configure your own AWS bucket.
IMPORTANT: While configuring Data Locker for your AppsFlyer account, select the
GZIP
file compression type. We do not support other file compression types.
(Optional) Data Locker - Configure custom AWS bucket
If you want to use your own AWS S3 bucket, you need to create an IAM policy and role for Fivetran:
In the connector setup form, find the automatically-generated External ID and make a note of it. You will need it to create an IAM role in AWS.
NOTE: The automatically-generated External ID is tied to your account. If you close and re-open the setup form, the ID will remain the same.
Create an IAM Policy for Fivetran:
i. Open your Amazon IAM console.
ii. Go to Access management > Policies, then select Create policy.
iii. In the Create policy window, go to the JSON tab.
iv. Copy the following policy and paste it in the JSON tab:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:Get*", "s3:List*" ], "Resource": "arn:aws:s3:::{your-bucket-name}/*" }, { "Effect": "Allow", "Action": [ "s3:Get*", "s3:List*" ], "Resource": "arn:aws:s3:::{your-bucket-name}" } ] }
v. Click Review Policy.
vi. Name the policy "Fivetran-AppsFlyer-Access".
vii. Click Create Policy.
Create an IAM role for Fivetran:
i. Go to Access management > Roles, then select Create role.
ii. In the Create role window, select Another AWS account.
iii. In the Account ID field, enter Fivetran's account ID, 834469178297.
iv. In Options, select the Require external ID checkbox.
v. Enter the External ID you found in your connector setup form.
vi. Click Next: Permissions.
vii. Select the "Fivetran-AppsFlyer-Access" policy that you created.
viii. Click Next: Tags. Entering tags is optional, but you must click through the step.
ix. Click Next: Review.
x. Name your new role "Fivetran", then click Create Role.
xi. Select the Fivetran role you just created.
xii. In the Summary section, make a note of the Role ARN. You will need it to configure Fivetran.
NOTE: You can specify permissions for the Role ARN that you designate for Fivetran. Giving selective permissions to this Role only allows Fivetran to sync what it has permissions to see.
Finish Fivetran configuration
In the connector setup form, follow the instructions below for your connection method:
If you are using Push API V2.0, set the Sync AppsFlyer Data Locker toggle to OFF.
If you are using Data Locker V2.0, set the Sync AppsFlyer Data Locker toggle to ON.
If you are using Pull API V2.0, set the Sync data using AppsFlyer's Pull API toggle to ON. Enter the following Pull API details:
- API token
- App ID
TIP: Click Add App ID to specify multiple App IDs.
If you are using an AppsFlyer-managed S3 bucket, set the Use Custom Bucket toggle to OFF. Enter the following details about the AppsFlyer AWS S3 bucket for Data Locker events:
- Access Key ID
- Secret Key
- Home Folder
- Connection Name
If you are using your own AWS S3 bucket, set the Use Custom Bucket toggle to ON. Enter the following details about your AWS S3 bucket:
- Bucket Name
- Role ARN you created in Step 5
- Home Folder
- Connection Name
NOTE: You can find the Home Folder path and Connection Name after the bucket name. For example, s3://af-ext-reports/home-folder/connection-name/.
(Optional) Enter the Rollback Window for the
GEO_DAILY
table. The default value is 2 days.NOTE: For more information about rollback syncs and rollback windows, see our documentation.
Click Save & Test. Fivetran will take it from here and sync your AppsFlyer data.
Related articles
description Connector Overview
account_tree Schema Information
settings API Connector Configuration