TUNE Destination

TUNE helps attribute mobile app events to the advertisements that a customer interacted with. We take care of sending those mobile events to TUNE so that they can be reconciled with ad views. The attributed data can then be routed back into other tools that you have enabled in Segment.

This destination is maintained by TUNE. Their code is publicly available for iOS and Android. For any issues with the destination, please reach out to their team.

This document was last updated on May 8, 2018. If you notice any gaps, outdated information or simply want to leave some feedback to help us improve our documentation, please let us know!

Getting Started

The first step is to make sure TUNE supports the source type and connection mode you’ve chosen to implement. You can learn more about what dictates the connection modes we support here.

📱 Device-based
☁️ Cloud-based
  1. From your Segment UI’s Destinations page click on “Add Destination”.
  2. Search for “TUNE” within the Destinations Catalog and confirm the Source you’d like to connect to.
  3. Add your TUNE Advertiser ID in the Segment Settings UI from your TUNE Dashboard.
  4. In your TUNE account, ensure that you have created a new app by navigating to Applications > Apps > Add A New App.
  5. Depending on library you’ve installed, please follow the additional steps below to finish setting up!


When using our iOS library, make sure you are using the AdSupport Framework. You can verify this by checking if context.device.advertisingId (formerly context.device.idfa) is getting set in your source’s debugger (check raw format).



For iOS apps built with Xamarin, you need to set the context.device.advertisingId field to the Apple advertising identifier, and the context.device.adTrackingEnabled boolean to indicate whether ad tracking is supported.

You can retrieve these values by adding the following directive to your .cs file:

using MonoTouch.AdSupport;

And access the values as:



For Android apps built with Xamarin, you first need to add the Google Play Services component through the Xamarin Component Store by navigating to Project > Get More Components.

You then need to set the context.device.advertisingId field to the Google Advertising ID.

using Android.Gms.Ads.Identifier;
using Android.Gms.Common;
AdvertisingIdClient.Info adInfo = AdvertisingIdClient.GetAdvertisingIdInfo(this.ApplicationContext);


If you haven’t had a chance to review our spec, please take a look to understand what the Identify method does. An example call would look like:

  userId: '019mr8mf4r',
  traits: {
    name: 'Michael Bolton',
    email: 'mbolton@initech.com',
    plan: 'Enterprise',
    friends: 42

If your app has user accounts, you may want to identify these users when they login. This will appear in TUNE as a Login event.


If you haven’t had a chance to review our spec, please take a look to understand what the Track method does. An example call would look like:

  "userId": "abcd9435db2d4b53c94fb4b688a63fab",
  "event": "Opened App"
  "properties": {},
  "context": {
    "device": {
      "manufacturer": "Apple",
      "model": "iPhone7,2",
      "idfv": "A3D261E4-DE0A-470B-9E4A-720F3D3D22E6",
      "type": "ios"
    "os": {
      "name": "iPhone OS",
      "version": "8.1.1"
    "app": {
      "name": "Test App",
      "namespace": "com.segment.testapp",
      "version": "2.1.1",
      "build": ""
    "library": {
      "name": "analytics-ios",
      "version": "1.6.11"
    "locale": "en-US",
    "traits": {},
    "network": {
      "bluetooth": true,
      "carrier": "AT&T"
    "ip": ""

You can track the effectiveness of a mobile ad campaign by tracking key conversion events. This destination recognizes six special events (listed below), as well as any custom events you wish to track.


When sending your data server-side, contextual fields context.app.namespace and context.device.advertisingId must be manually sent in all calls.


When sending your data using our Xamarin library, contextual fields context.app.namespace and the boolean context.device.adTrackingEnabled must be manually sent in all calls.

Opened App

Install attribution is the most common use case for mobile attribution tools. To send this event to TUNE, send a track call from your mobile application when the app is opened with the event name Opened App. TUNE will take care of determining whether this is a first-time install, open, or update.

Special Events

TUNE supports special events beyond install attribution which are mapped to the Segment Ecommerce Spec:

Segment EventTUNE Event
Product ViewedContent View
Product AddedAdd to Cart
Product Added to WishlistAdd to Wishlist
Checkout Step ViewedCheckout Initiated
Order CompletedPurchase

If you send an event with a name not included in the list above, Segment will send it to TUNE as a generic conversion event. You can then assign those events to pre-defined event categories in TUNE.


In addition to sending data to TUNE to be attributed, Segment allows you to route that data back into other tools that you have enabled. For example, you might want to use a particular analytics tool’s dashboards to compare the different channels of your mobile ad campaign. To do this, enable postbacks in TUNE and provide them with your source write key, as explained in TUNE’s documentation.

Questions? Need help? Contact us!
Can we improve this doc?
Email us: docs-feedback@segment.com!