Amazon S3

Adapty UA’s integration with Amazon S3 allows you to store user acquisition campaign data securely in one central location. You will be able to save your campaign performance data, attribution data, and user acquisition events to your Amazon S3 bucket as .csv files.
To set up this integration, you will need to follow a few simple steps in the AWS Console and Adapty UA dashboard.

Adapty UA sends your data every 24h at 4

UTC.

Each file will contain data for the events created for the entire previous calendar day in UTC. For example, the data exported automatically at 4

UTC on March 8th will contain all the events created on March 7th from 00:00
to 23:59
in UTC.

How to set up Amazon S3 integration

To start receiving data, you’ll need the following credentials:

  1. Access key ID
  2. Secret access key
  3. S3 bucket name
  4. Folder name inside the S3 bucket

Nested directories

You can specify nested directories in the Amazon S3 bucket name field, e.g. adapty-ua-events/com.sample-app

Step 1. Create Amazon S3 credentials

This guide will help you create the necessary credentials in your AWS Console.

1.1. Create Access Policy

  1. Navigate to the IAM Policy Dashboard in your AWS Console
  2. Select the option to Create Policy
7af075c-CleanShot_2023-03-21_at_10.52.002x.webp
  1. In the Policy editor, paste the following JSON and change adapty-s3-integration-test to your bucket name:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AllowListObjectsInBucket",
            "Effect": "Allow",
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::adapty-s3-integration-test"
        },
        {
            "Sid": "AllowAllObjectActions",
            "Effect": "Allow",
            "Action": "s3:*Object",
            "Resource": [
                "arn:aws:s3:::adapty-s3-integration-test/*",
                "arn:aws:s3:::adapty-s3-integration-test"
            ]
        },
        {
            "Sid": "AllowBucketLocation",
            "Effect": "Allow",
            "Action": "s3:GetBucketLocation",
            "Resource": "arn:aws:s3:::adapty-s3-integration-test"
        }
    ]
}
d4e474a-CleanShot_2023-03-21_at_10.56.212x.webp
  1. After completing the policy configuration, you may choose to add tags (optional) and then click Next to proceed to the final step
  2. In this step, you will name your policy and simply click on the Create policy button to finalize the creation process
7dcb02f-CleanShot_2023-03-21_at_11.03.372x.webp

1.2. Create IAM user

To enable Adapty UA to upload raw data reports to your bucket, you will need to provide them with the Access Key ID and Secret Access Key for a user who has write access to the specific bucket.

  1. Navigate to the IAM Console and select the Users section
  2. Click on the Add users button
bb612c8-CleanShot_2023-03-21_at_11.12.392x.webp
  1. Give the user a name, choose Access key – Programmatic access, and proceed to permissions
467ee4d-j6aoX.webp
  1. For the next step, please select the Add user to group option and then click the Create group button
bfd0e80-CleanShot_2023-03-21_at_11.24.592x.webp
  1. Next, you need to assign a name to your User Group and select the policy that was previously created by you
  2. Once you have selected the policy, click on the Create group button to complete the process
df29c12-CleanShot_2023-03-21_at_11.28.052x.webp
  1. After successfully creating the group, please select it and proceed to the next step
1f3722e-CleanShot_2023-03-21_at_11.36.192x.webp
  1. Since this is the final step for this section, you may proceed by simply clicking on the Create User button
ea43722-CleanShot_2023-03-21_at_11.40.462x.webp
  1. Lastly, you can either download the credentials in .csv format or alternatively, copy and paste the credentials directly from the dashboard
bcf35e1-S3created.webp

Step 2. Configure integration in Adapty UA

  1. Go to Integrations -> Amazon S3
  2. Turn on the Export install events to Amazon S3 toggle.
  3. Fill out the following fields to build a connection between Amazon S3 and Adapty UA profiles:
FieldDescription
Access Key IDA unique identifier that is used to authenticate a user or application’s access to an AWS service. Find this ID in the downloaded csv file .
Secret Access KeyA private key that is used in conjunction with the Access Key ID to authenticate a user or application’s access to an AWS service. Find this Key in the downloaded csv file .
S3 Bucket NameA globally unique name that identifies a specific S3 bucket within the AWS cloud. S3 buckets are a simple storage service that allows users to store and retrieve data objects, such as files and images, in the cloud.
Folder Inside the BuckerThe name of the folder that you want to have inside the selected S3 bucket. Please note that S3 simulates folders using object key prefixes, which are essentially folder names.
Region (Optional)Get your Region from the AWS Management Console under your IAM user account.
ua-amazon-s3.webp

Manual data export

In addition to the automatic event data export to Amazon S3, Adapty UA also provides a manual file export functionality. With this feature, you can select a specific date for the user acquisition data and export it to your S3 bucket manually. This allows you to have greater control over the data you export and when you export it.

Table structure

In AWS S3 integration, Adapty UA provides a table to store historical data for installation events. The table contains information about the user profile, revenue and proceeds, and the origin store, among other data points.

Note that this structure may grow over time — with new data being introduced by us or by the 3rd parties we work with. Make sure that your code that processes it is robust enough and relies on the specific fields, but not on the structure as a whole.

Here is the table structure for the events:

ColumnDescription
adapty_profile_idUnique Adapty profile identifier
install_idUnique installation identifier
created_atRecord creation timestamp (ISO 8601)
installed_atApp installation timestamp (ISO 8601)
storeApp store (ios, android)
countryUser’s country code (ISO 3166-1 alpha-2)
ip_addressClient IP address
idfaiOS Identifier for Advertisers
idfviOS Identifier for Vendors
gaidGoogle Advertising ID (Android)
android_idAndroid device ID
app_set_idAndroid App Set ID
channelAttribution channel
campaign_idCampaign identifier
campaign_nameCampaign name
adset_idAd set identifier
adset_nameAd set name
ad_idAd identifier
ad_nameAd name
keyword_idKeyword identifier
keyword_nameKeyword name
asa_org_idApple Search Ads organization ID
asa_keyword_match_typeASA keyword match type (Exact, Broad)
asa_attributionASA attribution data (JSON string)
asa_conversion_typeASA conversion type
asa_country_or_regionASA country or region
asa_creative_set_nameASA creative set name
fbclidFacebook Click ID
ttclidTikTok Click ID
utm_sourceUTM source parameter
utm_mediumUTM medium parameter
utm_campaignUTM campaign parameter
utm_termUTM term parameter
utm_contentUTM content parameter