---
code: unity_sdk_thirdparty
name: "三方数据"
wikiToken: TWc3w3O0GiKaJXkMSeocntqpnlh
parentWikiToken: BMYXwREPHidgIokPXd3cibSdnqe
updateTime: 1745309704000
sourceUrl: https://docs-v2.thinkingdata.cn/?version=v5.0&lan=zh-CN&code=unity_sdk_thirdparty
---
# 三方数据

从v2.4.0开始支持三方数据接入功能，以下是同步多个平台数据的示例代码:

```
TDAnalytics.EnableThirdPartySharing(TDThirdPartyType.APPSFLYER | TDThirdPartyType.ADJUST | TDThirdPartyType.TRADPLUS | TDThirdPartyType.TRACKING | TDThirdPartyType.TOPON | TDThirdPartyType.BRANCH | TDThirdPartyType.IRONSOURCE);
```

### 1.Appsflyer

在AppsFlyer SDK调用start方法之前调用API。 

```
TDAnalytics.EnableThirdPartySharing(TDThirdPartyType.APPSFLYER);
```

注册创角色之后(可选)。 

```
TDAnalytics.Login("account_id");
TDAnalytics.EnableThirdPartySharing(TDThirdPartyType.APPSFLYER);
```

如果调用了 AE 的Login方法（会修改account_id）或者SetDistinctId方法（会修改distinct_id），需要再次调用EnableThirdPartySharing同步数据。

### 2.Adjust

在Adjust SDK初始化之前调用。 

```
TDAnalytics.EnableThirdPartySharing(TDThirdPartyType.ADJUST);
```

注册创角色之后(可选)。 

```
TDAnalytics.Login("account_id");
TDAnalytics.EnableThirdPartySharing(TDThirdPartyType.ADJUST);
```

### 3.Branch

在Branch initialize the session之前调用。 

```
TDAnalytics.EnableThirdPartySharing(TDThirdPartyType.BRANCH);
```

注册创角色之后(可选)。 

```
TDAnalytics.Login("account_id");
TDAnalytics.EnableThirdPartySharing(TDThirdPartyType.BRANCH);
```

### 4.TopOn

在ATSDK.*init之前调用。*

```
TDAnalytics.EnableThirdPartySharing(TDThirdPartyType.TOPON);
```

### 5.Tradplus

在TradPlusSdk.*initSdk之前调用。*

```
TDAnalytics.EnableThirdPartySharing(TDThirdPartyType.TRADPLUS);
```

### 6.IronSource

在IronSourceSdk初始化之后调用。

```
TDAnalytics.EnableThirdPartySharing(TDThirdPartyType.IRONSOURCE);
```
