Skip to content

Commit 937fabc

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # versioned_docs/version-3.0/appsflyer.md
2 parents 3d0aad5 + a8f630f commit 937fabc

11 files changed

Lines changed: 184 additions & 276 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ yarn-error.log*
2323
/.idea
2424
/static/*
2525
!/static/api/
26+
27+
# VSCode
28+
29+
/.vscode

versioned_docs/version-3.0/adjust.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ The integration between Adapty and Adjust works in two main ways.
3333
2. **Adapty sends subscription events to Adjust**
3434
Adapty can send all subscription events which are configured in your integration to Adjust. As a result, you'll be able to track these events within the Adjust dashboard. This integration is beneficial for evaluating the effectiveness of your advertising campaigns.
3535

36-
## Initial Setup
36+
## Web configuration
37+
38+
### Connect Adapty to Adjust
3739

3840
1. Open the Adapty Dashboard, and navigate to [Integrations > Adjust](https://app.adapty.io/integrations/adjust).
3941

@@ -83,7 +85,7 @@ The integration between Adapty and Adjust works in two main ways.
8385
/>
8486
</Zoom>
8587

86-
## Events and tags
88+
### Set up events and tags
8789

8890
Adjust works a bit differently from other platforms. You need to manually create events in Adjust dashboard, get event tokens, and copy-paste them to appropriate events in Adapty.
8991

@@ -125,7 +127,7 @@ Consider the following:
125127

126128
:::
127129

128-
## Attribution Integration
130+
## SDK configuration
129131

130132
After you complete the steps described above, add the following two methods to your app. They will establish communication between your app and Adjust:
131133

versioned_docs/version-3.0/airbridge.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ The integration between Adapty and Airbridge operates in two main ways.
2020
2. **Sending subscription events to Airbridge**
2121
Adapty can send all subscription events which are configured in your integration to Airbridge. As a result, you'll be able to track these events within the Airbridge dashboard. This integration is beneficial for evaluating the effectiveness of your advertising campaigns.
2222

23-
## Initial Setup
23+
## Web configuration
24+
25+
### Connect Adapty to Airbridge
2426

2527
To integrate Airbridge go to [Integrations > Airbridge](https://app.adapty.io/integrations/airbridge), turn on a toggle from off to on, and fill out fields.
2628

@@ -74,11 +76,7 @@ Adapty API token field is pre-generated on the Adapty backend. You will need to
7476
/>
7577
</Zoom>
7678

77-
78-
79-
80-
81-
## Events and tags
79+
### Set up events and tags
8280

8381
Below the credentials, there are three groups of events you can send to Airbridge from Adapty
8482

@@ -167,7 +165,7 @@ try {
167165
Read more about airbridgeDeviceId in [Airbridge documentation.](https://developers.airbridge.io/v1.1-en/docs/airbridge-device-id)
168166

169167

170-
## Attribution Integration
168+
## SDK configuration
171169

172170
Airbridge does not send real-time attribution data to Adapty. As such, there's no need to request attribution data from Airbridge in your application code.
173171

versioned_docs/version-3.0/apple-search-ads.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ The Apple Ads integration in **App settings** is used only for basic analytics a
1414
[Apple Ads Manager](adapty-ads-manager.md) uses a separate connection. Connect your Apple Ads account in the [Apple Ads Manager settings](adapty-ads-manager-get-started.md).
1515
:::
1616

17-
1817
Adapty can help you get attribution data from Apple Ads and analyze your metrics with campaign and keyword segmentation. Adapty collects the attribution data for Apple Ads automatically through its SDK and AdServices Framework.
1918

2019
Once you've set up the Apple Ads integration, Adapty will start receiving attribution data from Apple Ads. You can easily access and view this data on the profiles page.
2120

22-
2321
<Zoom>
2422
<img src={require('./img/ba4a3e9-CleanShot_2023-08-21_at_15.14.592x.webp').default}
2523
style={{
@@ -39,7 +37,7 @@ Apple Ads via [AdServices](https://developer.apple.com/documentation/ad_services
3937

4038
Add `AdaptyAppleSearchAdsAttributionCollectionEnabled` to the app’s `Info.plist` file and set it to `YES` (boolean value).
4139

42-
### Step 2: Obtain Public Key
40+
### Step 2: Obtain public key
4341

4442
In the Adapty Dashboard, navigate to [Settings -> Apple Ads.](https://app.adapty.io/settings/apple-search-ads)
4543
Locate the pre-generated public key (Adapty provides a key pair for you) and copy it.
@@ -59,7 +57,7 @@ Locate the pre-generated public key (Adapty provides a key pair for you) and cop
5957
If you're using an alternative service or your own solution for Apple Ads attribution, you can upload your own private key.
6058
:::
6159

62-
### Step 3: Configure User Management on Apple Ads
60+
### Step 3: Configure user management on Apple Ads
6361

6462
In your [Apple Ads account](https://searchads.apple.com/) go to **Settings > User Management** page. In order for Adapty to fetch attribution data you need to invite another Apple ID account and grant it API Account Manager access. You can use any account you have access to or create a new one just for this purpose. The important thing is that you must be able to log into Apple Ads using this Apple ID.
6563

@@ -74,11 +72,11 @@ In your [Apple Ads account](https://searchads.apple.com/) go to **Settings > Use
7472
/>
7573
</Zoom>
7674

77-
### Step 4: Generate API Credentials
75+
### Step 4: Generate API credentials
7876

7977
As a next step, log in to the newly added account in Apple Ads. Navigate to Settings -> API in the Apple Ads interface. Paste the previously copied public key into the designated field. Generate new API credentials.
8078

81-
### Step 5: Configure Adapty with Apple Ads Credentials
79+
### Step 5: Configure Adapty with Apple Ads credentials
8280

8381
Copy the Client ID, Team ID, and Key ID fields from the Apple Ads settings. In the Adapty Dashboard, paste these credentials into the corresponding fields.
8482

@@ -93,17 +91,15 @@ Copy the Client ID, Team ID, and Key ID fields from the Apple Ads settings. In t
9391
/>
9492
</Zoom>
9593

96-
## Attribution Integration
94+
## SDK configuration
9795

98-
### Enable Attribution Integration
96+
Once you complete [the AdServices framework setup](#connect-the-adservices-framework), Adapty automatically starts collecting Apple Search Ad attribution data. You don't need to add any SDK code.
9997

100-
Adapty automatically collects Apple Search Ad attribution data. As such, you don't need to request it in application code. If you followed the steps to [Connect the AdServices Framework](#connect-the-adservices-framework), Adapty has already begun collecting attribution data.
98+
For iOS applications, this attribution data will **always** take priority over data from other sources. If this behaviour is unwanted, *disable* ASA attribution with the instructions below.
10199

102-
### Disable Attribution Integration
100+
## Disable integration
103101

104-
Adapty can only store attribution data from one source at a time. If you enable multiple attribution sources, the system gives preference to the service that shares the most information. For iOS devices, this service is Apple Search Ads.
105-
106-
**Once you set the attribution value, you cannot override it.** To turn Apple Search Ads attribution off, open the [**App Settings** -> **Apple Search Ads** tab](https://app.adapty.io/settings/apple-search-ads), and toggle the **Receive Apple Search Ads attribution** switch.
102+
To turn Apple Search Ads attribution off, open the [**App Settings** -> **Apple Search Ads** tab](https://app.adapty.io/settings/apple-search-ads), and toggle the **Receive Apple Search Ads attribution** switch.
107103

108104
<Zoom>
109105
<img src={require('./img/asa-disable.webp').default}
@@ -153,4 +149,3 @@ openssl ec -in private-key.pem -pubout -out public-key.pem
153149
```
154150

155151
You can use this public key in your Apple Ads settings of account with API Account Manager role. So you can use generated Client ID, Team ID, and Key ID values for Adapty and other services.
156-

versioned_docs/version-3.0/appsflyer.md

Lines changed: 81 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,10 @@ The integration between Adapty and AppsFlyer operates in two main ways.
3030
/>
3131
</Zoom>
3232

33-
34-
35-
3633
2. **Sending subscription events to AppsFlyer**
3734
Adapty can send all subscription events that are configured in your integration to AppsFlyer. As a result, you'll be able to track these events within the AppsFlyer dashboard. This integration is beneficial for evaluating the effectiveness of your advertising campaigns.
3835

39-
## How to set up AppsFlyer integration
36+
## Web configuration
4037

4138
To setup the integration with AppsFlyer:
4239

@@ -161,7 +158,7 @@ If you use AppsFlyer API 2, you need to switch to API 3, since the previous vers
161158

162159
Adapty maps some events to AppsFlyer [standard events](https://support.appsflyer.com/hc/en-us/articles/115005544169-Rich-in-app-events-for-Android-and-iOS#event-types) by default. With such a configuration, AppsFlyer can then forward events to each ad network that you use without additional setup.
163160

164-
Another important thing is that AppsFlyer doesn't support events older than 26 hours. So, if you have an event that is more than 26 hours old, Adapty will send it to AppsFlyer, but the event date and time will be replaced by the current timestamp.
161+
Another important thing is that AppsFlyer doesn't support events older than 24 hours. So, if you have an event that is more than a day old, Adapty will send it to Appsflyer, but the event date and time will be replaced by the current timestamp.
165162

166163
## Events and tags
167164

@@ -186,7 +183,11 @@ Adapty will send subscription events to AppsFlyer using a server-to-server integ
186183

187184
## SDK configuration
188185

189-
It's very important to send AppsFlyer attribution data from the device to Adapty using the `Adapty.updateAttribution()` SDK method and the `Adapty.setIntegrationIdentifier()` method to set the integration identifier. The example below shows how to do that.
186+
After you complete the steps described above, call the `updateAttribution` method to save the attribution data, and use the `Adapty.setIntegrationIdentifier()` to set the integration identifier.
187+
188+
:::warning
189+
The `networkUserId` parameter is mandatory.
190+
:::
190191

191192
<Tabs groupId="current-os" queryString>
192193
<TabItem value="swift" label="iOS (Swift)" default>
@@ -203,6 +204,7 @@ class YourAppsFlyerLibDelegateImplementation {
203204
}
204205
```
205206
</TabItem>
207+
206208
<TabItem value="kotlin" label="Android (Kotlin)" default>
207209

208210
```kotlin showLineNumbers
@@ -223,6 +225,29 @@ val conversionListener: AppsFlyerConversionListener = object : AppsFlyerConversi
223225
}
224226
```
225227
</TabItem>
228+
<TabItem value="rn" label="React Native (TS)" default>
229+
230+
```typescript showLineNumbers
231+
import { adapty, AttributionSource } from 'react-native-adapty';
232+
import appsFlyer from 'react-native-appsflyer';
233+
234+
appsFlyer.onInstallConversionData(installData => {
235+
appsFlyer.getAppsFlyerUID((error, networkUserId) => {
236+
if (error) {
237+
// handle the error
238+
}
239+
try {
240+
adapty.updateAttribution(installData, AttributionSource.AppsFlyer, networkUserId);
241+
} catch (error) {
242+
// handle the error
243+
}
244+
});
245+
});
246+
247+
// ...
248+
appsFlyer.initSdk(/*...*/);
249+
```
250+
</TabItem>
226251
<TabItem value="flutter" label="Flutter (Dart)" default>
227252

228253
```javascript showLineNumbers
@@ -283,56 +308,11 @@ void onConversionDataSuccess(string conversionData) {
283308
}
284309
```
285310
</TabItem>
286-
<TabItem value="rn" label="React Native (TS)" default>
287-
288-
```typescript showLineNumbers
289-
import { adapty, AttributionSource } from 'react-native-adapty';
290-
import appsFlyer from 'react-native-appsflyer';
291-
292-
appsFlyer.onInstallConversionData(installData => {
293-
appsFlyer.getAppsFlyerUID((error, networkUserId) => {
294-
if (error) {
295-
// handle the error
296-
}
297-
try {
298-
adapty.updateAttribution(installData, AttributionSource.AppsFlyer, networkUserId);
299-
} catch (error) {
300-
// handle the error
301-
}
302-
});
303-
});
304-
305-
// ...
306-
appsFlyer.initSdk(/*...*/);
307-
```
308-
</TabItem>
309311
</Tabs>
310312

311-
## Troubleshooting
312-
313-
### Revenue discrepancy
313+
## Event structure
314314

315-
If there is a revenue discrepancy between Adapty and AppsFlyer, that might occur because not all your users use the app version that has the Adapty SDK. To ensure the data consistency, you can force your users to update the app to a version with the Adapty SDK.
316-
317-
### Missing integration data
318-
319-
If event sending fails, that is usually because of the missing integration data. Ensure the following to resolve this issue:
320-
- Your app has the AppsFlyer SDK installed.
321-
- You are calling the `getAppsFlyerUID` method.
322-
323-
### Authentication failure
324-
325-
If you are getting the `Failed to authenticate` error in the console, this might be due to the AppsFlyer version and credential version mismatch.
326-
327-
See the [migration guide](switch-from-appsflyer-s2s-api-2-to-3.md) or replace the credentials with the valid ones from [here](https://hq1.appsflyer.com/security-center/api-tokens).
328-
329-
## AppsFlyer event structure
330-
331-
Adapty sends selected events to AppsFlyer via POST request with JSON body to:
332-
- API v2: `https://api2.appsflyer.com/inappevent/{app_id}`
333-
- API v3: `https://api3.appsflyer.com/inappevent/{app_id}` (recommended)
334-
335-
Each event is structured like this:
315+
Adapty sends selected events to AppsFlyer as configured in the **Events names** section on the [**AppsFlyer Integration page**](https://app.adapty.io/integrations/appsflyer). Each event is structured like this:
336316

337317
```json
338318
{
@@ -352,41 +332,51 @@ Each event is structured like this:
352332
}
353333
```
354334

355-
Headers:
356-
357-
| Header | Value |
358-
|:-----------------|:-------------------|
359-
| `accept` | application/json |
360-
| `content-type` | application/json |
361-
| `authentication` | Your Dev Key (S2S) |
362-
363-
Request body parameters:
364-
365-
| Parameter | Type | Description |
366-
|:-------------------|:-------|:----------------------------------------------------------------------------------------------------------------------------------------|
367-
| `appsflyer_id` | String | The AppsFlyer ID (collected via SDK). |
368-
| `eventName` | String | The AppsFlyer event name (mapped from Adapty event). |
369-
| `eventTime` | String | Date and time of the event in UTC (format: `YYYY-MM-DD HH:MM:SS`). If older than 26 hours, replaced with current timestamp. |
370-
| `eventValue` | String | JSON string containing event details (see below). Only non-null fields included. |
371-
| `os` | String | OS version. |
372-
| `bundleIdentifier` | String | The application's bundle ID / package name. |
373-
| `customer_user_id` | String | The user's Customer User ID (if available). |
374-
| `eventCurrency` | String | Currency code (e.g., "USD"). Only sent if revenue is present. |
375-
| `ip` | String | User's IP address (if available). |
376-
| `advertising_id` | String | **Android only**. Google Advertising ID. Set to `00000000-0000-0000-0000-000000000000` if not available. |
377-
| `idfa` | String | **iOS only**. ID for Advertisers. Set to `00000000-0000-0000-0000-000000000000` if not available. |
378-
| `idfv` | String | **iOS only**. ID for Vendors. Set to `00000000-0000-0000-0000-000000000000` if not available. |
379-
| `att` | String | **iOS only**. App Tracking Transparency status (e.g., "3" for authorized, "0" if not available). |
380-
381-
The `eventValue` parameter is a JSON string containing the following fields:
382-
383-
| Parameter | Type | Description |
384-
|:------------------|:-------|:------------------------------------------------------------------|
385-
| `af_content_id` | String | The Product ID from the store (if available). |
386-
| `af_order_id` | String | The original transaction ID (if available). |
387-
| `store_country` | String | Country code of the store user (if available). |
388-
| `profile_country` | String | Country code based on user's IP (if available). |
389-
| `af_content_type` | String | Always `in_app`. **Only sent if revenue is present.** |
390-
| `af_revenue` | String | Revenue amount formatted to 4 decimal places. **Only sent if revenue is present.** |
391-
| `af_currency` | String | Currency code. **Only sent if revenue is present.** |
392-
| `af_quantity` | String | Always `1`. **Only sent if revenue is present.** |
335+
Where:
336+
337+
| Parameter | Type | Description |
338+
|:-------------------|:-------|:---------------------------------------------------------------------------|
339+
| `appsflyer_id` | String | The AppsFlyer ID (collected via SDK). |
340+
| `eventName` | String | The AppsFlyer event name (mapped from Adapty event). |
341+
| `eventTime` | String | Date and time of the event (UTC, formatted `YYYY-MM-DD HH:MM:SS`). |
342+
| `eventValue` | String | JSON string containing event details (see below). |
343+
| `os` | String | OS version. |
344+
| `bundleIdentifier` | String | The application's bundle ID / package name. |
345+
| `customer_user_id` | String | The user's Customer User ID. |
346+
| `eventCurrency` | String | Currency code (e.g., "USD"). |
347+
| `ip` | String | User's IP address. |
348+
| `advertising_id` | String | **Android only**. Google Advertising ID. |
349+
| `idfa` | String | **iOS only**. ID for Advertisers. |
350+
| `idfv` | String | **iOS only**. ID for Vendors. |
351+
| `att` | String | **iOS only**. App Tracking Transparency status (e.g., "3" for authorized). |
352+
353+
The `eventValue` parameter is a JSON-encoded string containing the following fields:
354+
355+
| Parameter | Type | Description |
356+
|:------------------|:-------|:----------------------------------------------|
357+
| `af_content_id` | String | The Product ID from the store. |
358+
| `af_order_id` | String | The original transaction ID. |
359+
| `store_country` | String | Country code of the store user. |
360+
| `profile_country` | String | Country code based on user's IP. |
361+
| `af_content_type` | String | Always `in_app` if revenue is present. |
362+
| `af_revenue` | String | Revenue amount formatted to 4 decimal places. |
363+
| `af_currency` | String | Currency code. |
364+
| `af_quantity` | String | Always `1` if revenue is present. |
365+
366+
## Troubleshooting
367+
368+
### Revenue discrepancy
369+
370+
If there is a revenue discrepancy between Adapty and AppsFlyer, that might occur because not all your users use the app version that has the Adapty SDK. To ensure the data consistency, you can force your users to update the app to a version with the Adapty SDK.
371+
372+
### Missing integration data
373+
374+
If event sending fails, that is usually because of the missing integration data. Ensure the following to resolve this issue:
375+
- Your app has the AppsFlyer SDK installed.
376+
- You are calling the `getAppsFlyerUID` method.
377+
378+
### Authentication failure
379+
380+
If you are getting the `Failed to authenticate` error in the console, this might be due to the AppsFlyer version and credential version mismatch.
381+
382+
See the [migration guide](switch-from-appsflyer-s2s-api-2-to-3.md) or replace the credentials with the valid ones from [here](https://hq1.appsflyer.com/security-center/api-tokens).

0 commit comments

Comments
 (0)