cohort_unified exports written by AppsFlyer Data Locker into an AWS S3 bucket, parses the gzip-compressed CSVs, and serves the resulting retention and revenue metrics from a cache. It is separate from the standard AppsFlyer data source, which continues to supply non-cohort install and event totals.
AppsFlyer Cohort is in beta. Setup requires coordination with AppsFlyer to enable Data Locker exports and with an AWS or DevOps team to provision an IAM user, so plan for a few business days end to end.
Before you connect
The following are required:- An AppsFlyer account on an Advanced or Enterprise plan, which is needed to access Data Locker.
- Cohort Analytics via Data Locker configured in the AppsFlyer platform (see the Data Locker setup steps below).
- An AWS S3 bucket receiving the AppsFlyer exports, organized in ISO date-named subfolders under a known root path.
- An IAM user with read-only access to the bucket, providing four values: AWS Access Key, AWS Secret, AWS Region, and S3 Bucket name. For the IAM setup, see How to connect Amazon S3.
- The Directory Path that contains the date-named subfolders.
There are two separate AppsFlyer data sources. The AppsFlyer data source uses the Master API, a REST API for on-demand campaign performance and user activity. The AppsFlyer Cohort data source uses Data Locker, AppsFlyer’s raw-data delivery feature that writes structured files to cloud storage (AWS S3) on a schedule.
Enable Data Locker on AppsFlyer
1
Open Data Locker for the app
Sign in to AppsFlyer at
dashboard.appsflyer.com and select the app to enable. In the left-side menu, go to Export then Data Locker.2
Choose the storage destination
Choose Amazon S3 as the cloud storage destination.
3
Configure the storage details
Create the AWS bucket first, then enter its name. The
af- prefix is mandatory and must be typed manually. Click Test connection and confirm no invalid-bucket-path error appears. Choose whether to make the connection compatible with Adobe Experience Platform, then click Save.4
Set the report output settings
Set File format to CSV, File compression to GZIP, and the recommended max row count to 100K. Leave the expected path at its default. The date-folder format must stay
dt=yyyy-mm-dd — a different format prevents the connection from working.5
Select the reports and save
Select reports for all account apps. The recommended report is cohort-unified-agency, which combines the two other reports so both are available for one data source. Click Save. File delivery typically begins within 24 hours.
Connect AppsFlyer Cohort
1
Authorize access to the S3 bucket
On the Data Sources page, search for AppsFlyer Cohort and select it. Fill in the required fields: AWS Access Key, AWS Secret, AWS Region, S3 Bucket (name only, no
s3:// prefix), and Directory Path (the root containing the date-named subfolders, for example appsflyer/cohort_unified/myapp/). Click Submit to authenticate.2
Select the app
On the data source settings, choose the App or apps from the dropdown.
3
Set the cohort alignment
Choose the Cohort Alignment: First conversion date or Event date. This determines how data is aggregated for this data source.
4
Select breakdowns and submit
Choose the breakdowns to expose. Only the columns selected during data source creation are available for this data source. Optionally set an identifiable Name, then click Submit to complete the connection. The first sync downloads all available history from S3 and can take up to one business day, longer for larger buckets.
What gets imported
The data source imports cohort retention and revenue in USD at daily granularity, with cohort periods spanning day 0 through day 360 (0, 1, 3, 7, 14, 30, 45, 60, 90, 180, and 360). Per event, it exposes point-in-time and cumulative counts, revenue, and unique users. The cache refreshes twice daily. For the complete metric list, cohort period semantics, report template details, and breakdown availability, see the AppsFlyer Cohort data reference.Troubleshooting
Error: given directory is empty or does not contain date folders
Error: given directory is empty or does not contain date folders
The configured directory has no subfolders whose last 10 characters parse as ISO dates. Confirm with AppsFlyer that Data Locker exports are flowing, and verify the directory path matches the bucket layout.
The first sync is slow
The first sync is slow
This is expected. The first sync downloads every cohort file from the bucket, so a bucket with a year or more of history can take 30 minutes or longer. Subsequent syncs are incremental.
Sync keeps retrying
Sync keeps retrying
Persistent failures usually mean the IAM user has lost access or the bucket structure has changed. Verify the IAM policy still grants read access on the bucket and directory, then trigger a manual refresh.
Revenue appears in USD instead of local currency
Revenue appears in USD instead of local currency
AppsFlyer’s
cohort_unified export normalizes revenue to USD before writing to S3, and the data source does not reconvert. For local-currency revenue, use the standard AppsFlyer data source.An event is missing from the metric picker
An event is missing from the metric picker
Events are discovered from the actual S3 data. If an event has not fired for any user, it does not appear. Wait for the event to land in S3, then edit the data source to refresh the available list.
Related
AppsFlyer Cohort data reference
Metrics, cohort period semantics, and limits for AppsFlyer Cohort.
AppsFlyer Cohort FAQs
Common questions and expected behaviors for the AppsFlyer Cohort data source.
How to connect AppsFlyer
Connect the standard AppsFlyer data source for install and event totals.
How to connect Amazon S3
Provision IAM read access to the S3 bucket holding the exports.
