Skip to content

Commit 2fc5356

Browse files
committed
Elina's review
1 parent 2e9c42c commit 2fc5356

1 file changed

Lines changed: 53 additions & 122 deletions

File tree

versioned_docs/version-3.0/attribution-integration.md

Lines changed: 53 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -12,136 +12,53 @@ import TabItem from '@theme/TabItem';
1212
import Contentid from '@site/src/components/InlineTooltip';
1313
import InlineTooltip from '@site/src/components/InlineTooltip';
1414

15-
You can use marketing data from third-party services to find connections between your advertising efforts and user subscriptions. These connections will help you understand what motivates your users to take action. If you store attribution data in Adapty, you can filter your [subscription charts](analytics-charts) by attribution.
15+
Integrate Adapty with an attribution data provider to:
1616

17-
Adapty offers out-of-the-box attribution integration with [9 popular marketing platforms](#automatic-attribution). Users of other platforms can follow a [manual workflow](#manual-attribution) that achieves the same goal.
17+
* Match subscription events to specific marketing campaigns
18+
* Discover which marketing strategies yield the most revenue
19+
* Filter Adapty [subscription charts](analytics-charts) by attribution
20+
* Use the capabilities of a third-party service to analyze Adapty subscription data
1821

19-
### Automatic Attribution
22+
Adapty supports a [simplified integration process](#simplified-attribution-process) for 9 popular platforms. You can integrate any other platform with a [manual attribution](#manual-attribution) process.
2023

21-
1. **Set up automatic data sharing.** Adapty offers out-of-the-box integration with 9 popular marketing platforms. These platforms can automatically receive real-time [subscription data](events) from Adapty. The marketing platform processes each purchase, and responds with an appropriate attribution (if it finds one).
2224

23-
You can enable attribution integration with **multiple platforms at once**. Adapty will select the most appropriate attribution provider for each transaction.
25+
## Simplified attribution process
2426

25-
Each platform has its own integration workflow. Refer to your platform's dedicated documentation page for in-depth instructions:
27+
Adapty offers out-of-the-box attribution integration with [9 popular services](#platform-specific-guides). These platforms can automatically receive [subscription data](events) from Adapty, process each purchase, and respond with an appropriate attribution.
2628

27-
- [Adjust](adjust)
28-
- [Airbridge](airbridge)
29-
- [Apple Search Ads](apple-search-ads)
30-
- [AppsFlyer](appsflyer)
31-
- [Asapty](asapty)
32-
- [Branch](branch)
33-
- [Facebook Ads](facebook-ads)
34-
- [Singular](singular)
35-
- [Tenjin](tenjin)
29+
### General overview
3630

37-
When you complete the setup, [disable other event sharing services](#avoid-event-duplication) to avoid duplicate events.
31+
Each platform has a different workflow, but the steps are similarly simple:
3832

39-
:::note
40-
If Adapty doesn't support automatic attribution integration with your favorite marketing platform, contact [Adapty Support](mailto:support@adapty.io) to express your interest.
41-
:::
33+
1. **Set up automatic data sharing.** Authorize Adapty to communicate with your platform of choice.
34+
2. **Integrate the Aadpty SDK.** Some platforms require extra code to set attribution data.
35+
3. **Disable other event sharing services and attribution sources** to avoid [event duplication](#avoid-event-duplication) and [data conflicts](#select-a-single-attribution-source).
4236

43-
2. **Invoke the `.updateAttribution()` method** to retrieve attribution data from the marketing platform, and set the attribution value for the transaction.
37+
### Platform-specific guides
4438

45-
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. **Once you set the attribution value, you cannot override it.**
39+
- [Adjust](adjust)
40+
- [Airbridge](airbridge)
41+
- [Apple Search Ads](apple-search-ads)
42+
- [AppsFlyer](appsflyer)
43+
- [Asapty](asapty)
44+
- [Branch](branch)
45+
- [Facebook Ads](facebook-ads)
46+
- [Singular](singular)
47+
- [Tenjin](tenjin)
4648

47-
On iOS, non-organic [Apple Search Ads attribution](apple-search-ads) will always take priority if available. 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.
49+
If Adapty doesn't offer a simplified attribution workflow for your favorite service, contact [Adapty Support](mailto:support@adapty.io) to express your interest.
4850

49-
Attribution integration methods **vary between the platforms**. Refer to your platform's dedicated documentation page for an in-depth overview of the SDK configuration code. The following is a **generic example**:
51+
## Manual attribution
5052

51-
<Tabs groupId="current-os" queryString>
52-
<TabItem value="swift" label="Swift" default>
53-
```swift showLineNumbers
54-
Adapty.updateAttribution("<attribution>", source: "<source>", networkUserId: "<networkUserId>") { error in
55-
if error == nil {
56-
// succesfull attribution update
57-
}
58-
}
59-
```
60-
</TabItem>
61-
<TabItem value="kotlin" label="Kotlin" default>
62-
```kotlin showLineNumbers
63-
Adapty.updateAttribution(
64-
mapOf("source" to "appsflyer", "campaign" to "summer_sale_2024"),
65-
"appsflyer",
66-
"networkUserId"
67-
) { error ->
68-
if (error == null) {
69-
// succesfull attribution update
70-
}
71-
}
72-
```
73-
</TabItem>
74-
<TabItem value="java" label="Java" default>
75-
```java showLineNumbers
76-
Adapty.updateAttribution("<attribution>", "<source>", "<networkUserId>", error -> {
77-
if (error == null) {
78-
// succesfull attribution update
79-
}
80-
});
81-
```
82-
</TabItem>
83-
<TabItem value="rn" label="React Native (TS)" default>
84-
```typescript showLineNumbers
85-
// Optionally import enum to JavaScript
86-
import { AttributionSource } from 'react-native-adapty';
87-
88-
const attribution = { /* ... */ };
89-
try {
90-
await adapty.updateAttribution(
91-
attribution,
92-
AttributionSource.Branch, // or just 'branch'
93-
'networkUserId'
94-
);
95-
// succesfull attribution update
96-
} catch (error) {
97-
// handle `AdaptyError`
98-
}
99-
```
100-
</TabItem>
101-
<TabItem value="flutter" label="Flutter" default>
102-
```javascript showLineNumbers
103-
try {
104-
await Adapty().updateAttribution("<attribution>", source: "<source>", networkUserId: "<networkUserId>");
105-
} on AdaptyError catch (adaptyError) {
106-
// handle the error
107-
} catch (e) {
108-
}
109-
```
110-
</TabItem>
111-
<TabItem value="unity" label="Unity" default>
112-
```csharp showLineNumbers
113-
Adapty.UpdateAttribution("<attributions>", source, "<networkUserId>", (error) => {
114-
if (error != null) {
115-
// handle the error
116-
}
117-
118-
// succesfull attribution update
119-
});
120-
```
121-
</TabItem>
122-
</Tabs>
53+
If your attribution source does not suppport the [simplified attribution workflow](#simplified-attribution-process), you need to write your own code that communicates with the attribution source.
12354

124-
**Parameters:**
125-
126-
- **Attribution** (required): dictionary with attribution data. Adapty automatically fills it with the data it receives from the marketing platform.
127-
- **Source** (required): attribution source. The following values are acceptable:
128-
- `.appsflyer`
129-
- `.adjust`
130-
- `.branch`
131-
- `.custom`
132-
- **Network user Id** (required for AppsFlyer, optional otherwise): a string with the profile ID from the attribution service.
133-
134-
### Manual Attribution
135-
136-
1. **Send subscription data to the marketing platform**
55+
1. **Send subscription data to the attribution service**
13756

138-
If Adapty doesn't offer built-in integration with your marketing platform, you need to manually program the logic necessary to send subscription data to your platform's API.
57+
Program the logic necessary to send subscription data to your platform's API.
13958

140-
When you complete the setup, [disable other event sharing services](#avoid-event-duplication) to avoid duplicate events.
59+
2. **Retrieve attribution data from the attribution service**
14160

142-
2. **Retrieve attribution data from the marketing platform**
143-
144-
If Adapty doesn't offer built-in integration with your marketing platform, you need to manually retrieve attribution data from the platform.
61+
Retrieve attribution data from the platform.
14562

14663
3. **Create a dictionary with attribution data**
14764

@@ -156,7 +73,7 @@ Adapty offers out-of-the-box attribution integration with [9 popular marketing p
15673

15774
All the keys are optional. The value of each key may be up to 50 characters long. Adapty ignores custom attribution keys.
15875

159-
**Example**:
76+
**Example**:
16077

16178
```swift showLineNumbers title="Swift"
16279
let attribution = [
@@ -171,7 +88,7 @@ Adapty offers out-of-the-box attribution integration with [9 popular marketing p
17188

17289
4. **Set the attribution data**:
17390

174-
Pass the attribution dictionary to the `updateAttribution` method:
91+
Pass the attribution dictionary to the `updateAttribution` method. Once you set the attribution value, you cannot override it:
17592

17693
```swift showLineNumbers title="Swift"
17794
Adapty.updateAttribution(attribution, source: "custom") { error in
@@ -181,16 +98,30 @@ Adapty offers out-of-the-box attribution integration with [9 popular marketing p
18198
}
18299
```
183100

184-
Once you set the attribution value, you cannot override it.
101+
**Parameters:**
185102

186-
### Avoid Event Duplication
103+
- `attribution` (required): dictionary with attribution data.
104+
- `source` (required): attribution source. Set to `.custom` if your attribution provider does not support the [simplified attribution process](#simplified-attribution-process).
105+
- `networkUserID` (optional): a string with the profile ID from the attribution service.
187106

188-
If you use Adapty to share real-time subscription data with your marketing platforms, **you need to disable** other services that serve the same purpose. If you connected your Facebook account to AppsFlyer, Adjust, or Branch, it will automatically forward your events to these services, unless you opt out.
107+
5. **Disable other event sharing services and attribution sources** to avoid [event duplication](#avoid-event-duplication) and [data conflicts](#select-a-single-attribution-source).
189108

190-
Duplicate events can skew your analytics, and make it hard to interpret data. Once you configured Adapty event sharing, turn third-party event forwarding capabilities **off**.
109+
## Best practices
191110

192-
### See Also
111+
### Select a single attribution source
112+
113+
Do not enable attribution integration with multiple platforms at once. Adapty can only accept one attribution source at a time, and once it saves the attribution value, it cannot override it.
114+
115+
If you enable multiple attribution sources, Adapty will select the source with the most data — not necessarily the best data.
116+
117+
For example, non-organic [Apple Search Ads attribution](apple-search-ads) will always take priority on iOS. 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.
118+
119+
### Avoid event duplication
120+
121+
If you use Adapty to share real-time subscription data with your attribution services, **you need to disable** other services that serve the same purpose. If you connected your Facebook account to AppsFlyer, Adjust, or Branch, it will automatically forward your events to these services, unless you opt out.
122+
123+
Duplicate events can skew your analytics, and make it hard to interpret data. Once you configured Adapty event sharing, turn third-party event forwarding capabilities **off**.
193124

194-
If your marketing platform supports automatic Attribution Integration, it also supports [User Acquisition Analytics](user-acquisition.md)!
125+
### What's Next
195126

196-
This capability pools all the data about your app's economy into one place, allowing you to see the relationship between ad spend and subscription revenue.
127+
Enable [User Acquisition Analytics](user-acquisition.md) to learn more about your application economy. Dive deeper into the complicated relationship between ad spend and subscription revenue.

0 commit comments

Comments
 (0)