TUNE Destination
Destination Info
- Accepts Identify, and Track calls
- In Cloud-mode, refer to it as TUNE, or MobileAppTracking in the Integrations object
- In Device-mode, refer to it as TUNE in the Integrations object
Components
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, contact the TUNE Support team.
Getting Started
- From your Segment UI’s Destinations page click on “Add Destination”.
- Search for “TUNE” in the Catalog, select it, and choose which of your sources to connect the destination to.
- Add your TUNE Advertiser ID in the Segment Settings UI from the TUNE Dashboard.
- In your TUNE account, ensure that you have created a new app by navigating to Applications > Apps > Add A New App.
- Depending on library you’ve installed, follow the additional steps below to finish setting up!
iOS
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).
Xamarin
Xamarin.iOS
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:
ASIdentifierManager.SharedManager.AdvertisingIdentifier
ASIdentifierManager.SharedManager.IsAdvertisingTrackingEnabled
Xamarin.Android
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);
Identify
If you’re not familiar with the Segment Specs, take a look to understand what the Identify method does. An example call would look like:
analytics.identify({
userId: '019mr8mf4r',
traits: {
name: 'Michael Bolton',
email: 'mbolton@example.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.
Track
If you’re not familiar with the Segment Specs, take a look to understand what the Track method does. An example call would look like:
analytics.track({
"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": "2.1.1.4"
},
"library": {
"name": "analytics-ios",
"version": "1.6.11"
},
"locale": "en-US",
"traits": {},
"network": {
"bluetooth": true,
"carrier": "AT&T"
},
"ip": "70.128.91.158"
}
})
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.
Server
When sending your data server-side, contextual fields context.app.namespace
and context.device.advertisingId
must be manually sent in all calls.
Xamarin
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 Event | TUNE Event |
---|---|
Product Viewed | Content View |
Product Added | Add to Cart |
Product Added to Wishlist | Add to Wishlist |
Checkout Step Viewed | Checkout Initiated |
Order Completed | Purchase |
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.
Postbacks
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.
Engage
You can send computed traits and audiences generated using Engage to this destination as a user property. To learn more about Engage, schedule a demo.
For user-property destinations, an identify call is sent to the destination for each user being added and removed. The property name is the snake_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property order_completed_last_30days: true
. When the user no longer satisfies this condition (for example, it’s been more than 30 days since their last order), Engage sets that value to false
.
When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.
Real-time to batch destination sync frequency
Real-time audience syncs to TUNE may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.
Settings
Segment lets you change these destination settings from the Segment app without having to touch any code.
Setting | Description |
---|---|
Advertiser ID (required) |
string . You can find your Advertiser ID in your TUNE account under Accounts > Advertiser Account |
Advanced Event Property Mappings | mixed , defaults to . If you have any event properties that you would like to map to TUNE custom event attributes on a per-event basis, you can specify them here. |
Consumer Key | string . Required for Server to Server Integration. This is the public key that will be included with each request so the Private Key used to create the signature can be identified. Please contact your TUNE account manager to get your consumer key. |
Conversion Key | string . Required for Client Side Integration. You can find your Conversion Key in your TUNE account. |
Custom Event Attributes | map , defaults to {}. If you have any event properties that you would like to map to TUNE custom event attributes for all events, please specify them here. You may override any of these on a per-event basis in Advanced Settings. |
TUNE Predefined Event Mapping | map , defaults to {}. Use this setting to map your Segment events to TUNE’s pre-defined event mappings. Input your Segment event on the left-hand side, and select the TUNE event you want to send it as from the dropdown. TUNE’s documentation: https://developers.tune.com/measurement-docs/measuring-pre-defined-events/ |
Private Key | string . Required for Server to Server Integration. This is the Private key that will be used to generate the signature on both the client and server but will not be included in the request. Please contact your TUNE account manager to get your private key. |
Custom Item Attributes | map , defaults to {}. If you have any product properties that you would like to map to item-scoped custom attributes inside site_event_items for your ecommerce events, please specify them here. |
This page was last modified: 20 Mar 2024
Need support?
Questions? Problems? Need more info? Contact Segment Support for assistance!