# User Signals API

As of DT Exchange iOS SDK version 8.4.3, publishers can submit first-party data (user signals) such as The Trade Desk UID2 tokens and LiveRamp envelopes. Submitting user signals provides DT with deeper insights into user behavior and publisher-specific metrics so that we can better target ads to your users and increase fill rates. Additionally, if you are mediating DT Exchange, implementation of User Signals remains the same, no matter which mediation platform you use.&#x20;

To submit user signals:

1. Ensure that you have integrated the latest DT Exchange Android SDK.\
   For the latest version, see [Integrating the iOS SDK](https://docs.digitalturbine.com/dt-exchange/publishers/sdk-configuration/integrating-the-ios-sdk).
2. For each [user signal](#h_01kd871ggetf9pv4c9pap41ygn) you want to submit, send the data as key-value pairs in the [`setExtraData` method](#h_01kd871ggesvzdp618sc6d0r33) within the `InneractiveAdManager`.

{% hint style="info" %}

* This method must be called after the SDK init, but before initiating an ad request or creating a bidding token.
* To pass multiple user signals, call the method once for every data point you wish to send.
* Calling the `setExtraData` method with a key that has already been sent overwrites the previous value associated with that key.
  {% endhint %}

## Method Signature <a href="#h_01kd871ggesvzdp618sc6d0r33" id="h_01kd871ggesvzdp618sc6d0r33"></a>

{% code title="Objective-C" %}

```objective-c
- (void)setExtraDataForKey:(nonnull NSString *)key
                     value:(nullable NSString *)value
NS_SWIFT_NAME(setExtraData(key:value:));
```

{% endcode %}

## User Signals <a href="#h_01kd871ggetf9pv4c9pap41ygn" id="h_01kd871ggetf9pv4c9pap41ygn"></a>

Submit any of the following user signals as key-value pairs in the `setExtraData` method. The maximum value you can send is 512 characters. To delete a value previously set for a key, specify `nil`.

| KEY  | VALUE                                                          |
| ---- | -------------------------------------------------------------- |
| UID2 | UID2.0 token from The Trade Desk.                              |
| LRE  | <p>LiveRamp envelope.</p><p>Do not submit the LiveRamp ID.</p> |

## Example <a href="#h_01kd871ggee5nwxr3d8w69g4tk" id="h_01kd871ggee5nwxr3d8w69g4tk"></a>

{% tabs %}
{% tab title="Swift" %}

```swift
// Passing the first parameter
IASDKCore.sharedInstance().setExtraData(key: "UID2", value: "UID2.0_access_token")

// Passing the second parameter
IASDKCore.sharedInstance().setExtraData(key: "LRE", value: "LiveRamp_envelope")

// Removing a custom parameter
IASDKCore.sharedInstance().setExtraData(key: "UID2", value: nil)
```

{% endtab %}

{% tab title="Objective-C" %}

```objective-c
// Passing the first parameter
[[IASDKCore sharedInstance] setExtraDataWithKey:@"key1" value:@"value1"];

// Passing the second parameter
[[IASDKCore sharedInstance] setExtraDataWithKey:@"key2" value:@"value2"];

// Removing a custom parameter
[[IASDKCore sharedInstance] setExtraDataWithKey:@"key1" value:nil];
```

{% endtab %}
{% endtabs %}
