Documentation

Support

Analytics

Analytics

Track user acquisition

Record acquisition data from mobile measurement partners to understand where your players come from.
Read time 4 minutesLast updated 19 hours ago

As users installing your game can come from multiple ad networks and campaigns, it is common to use a Mobile Measurement Partner (MMP) to identify which network and campaign a player installing the game comes from. This is called attribution: attributing an app install to a specific network and campaign. The most used MMPs are AppsFlyer, Adjust, Singular, Kochava, and Tenjin. You can track the data provided by MMPs on the client side such as (but not limited to): the ad network, the specific ad which brought the user to your game, and the cost to acquire this user. All of this data can be recorded in our
acquisitionSource
standard event.

acquisitionSource
event

This event should be populated with the information available from the attribution provider's SDK. Ensure you also follow any guidance on tracking installs that is found on any MMP's own documentation. The table below explains the attribution event parameters.

Parameter

Description

Data type

Required

acquisitionChannel
The name of the specific marketing provider used to drive traffic to the game. We recommend using the acquisition network name as this will be the name displayed when filtering or grouping by an acquisition channel. For a deeper analysis, use the network and campaign names. This will populate the "Acquisition Channel" dimension, which is found in many filters and group by options across the Analytics tools.
string
Yes
acquisitionCampaignId
The ID of the acquisition campaign.
string
Yes
acquisitionCreativeId
The acquisition campaign creative ID.
string
Yes
acquisitionCost
The cost of the install e.g. 2.36.
float
No
acquisitionCostCurrency
The ISO 4217 three-letter currency code for the install cost currency, e.g. GBP or USD.
string
No
acquisitionCampaignName
The acquisition campaign name e.g. Interstitial:Halloween21.
string
Yes
acquisitionNetwork
The acquisition campaign network e.g. Ironsource, Facebook Ads.
string
No
acquisitionProvider
The name of the attribution provider in use e.g. Adjust, AppsFlyer, Singular.
string
Yes
acquisitionCampaignType
The acquisition campaign type. e.g. CPI.
string
No
You'll get different information about the attribution of a particular user, depending on the provider you use. You might not have enough information to populate every field in the event, so these can be left blank or be populated with your own data.

Implement with the SDK

The SDK provides the
AcquisitionSourceEvent
class to help you record these events.
This is an example of how to trigger an attribution event in your game:
var acquisitionSource = new AcquisitionSourceEvent(){ AcquisitionChannel = "Unity", AcquisitionCampaignId = "gwOfhjSjyiNfGdGlUjLK", AcquisitionCreativeId = "creative_name", AcquisitionCampaignName = "Game Name OS Country", AcquisitionProvider = "AppsFlyer", AcquisitionCampaignType = "CPI", AcquisitionCost = 12, AcquisitionCostCurrency = "EUR", AcquisitionNetwork = "Unity",};AnalyticsService.Instance.Record(acquisitionSource);

Implement with the REST API

The
acquisitionSource
event payload is as follows:
{ "eventTimestamp": {{eventDate}}, "eventVersion": 1, "userID": {{userId}}, "eventName": "acquisitionSource", "eventUUID": {{eventUUID}}, "eventParams": { "clientVersion":"0.1", "platform":"Android", "userCountry":"DK", "acquisitionChannel":"Unity", "acquisitionCampaignId":"gwOfhjSjyiNfGdGlUjLK", "acquisitionCampaignType":"CPI", "acquisitionCampaignName":"Game Name OS Country", "acquisitionCreativeId":"creative_name", "acquisitionCost":"12", "acquisitionCostCurrency":"EUR", "acquisitionNetwork":"Unity", "acquisitionProvider":"AppsFlyer" }}

Populating the fields from different SDKs

Adjust SDK integration guide

You can register a callback to get notified each time the Adjust SDK updates the conversion value for the user and sends the data to Analytics using the values from attribution variables following the mapping example below. For more details about Adjust SDK integration, refer to https://github.com/adjust/unity_sdk#attribution-callback.

Parameter

Value from Adjust SDK (AdjustAttribution attribution)

Required

acquisitionChannel
Depends on the use case. We recommend using the acquisition network name by default,
attribution.network
Yes
acquisitionCampaignId
attribution.campaign
Yes
acquisitionCreativeId
attribution.creative
Yes
acquisitionCost
attribution.costAmount
Yes
acquisitionCostCurrency
attribution.costCurrency
No
acquisitionCampaignName
attribution.campaign
Yes
acquisitionNetwork
attribution.network
No
acquisitionProvider
Adjust
Yes
acquisitionCampaignType
attribution.costType
No

Appsflyer SDK integration guide

Appsflyer SDK provides functionality to access real-time user attribution data for each install. See details about integration here about how to register a callback. You can register a callback to get notified each time the Appsflyer SDK updates the conversion value for the user and sends the data to Analytics using the values from attribution payload following the mapping example below. For more details about Appsflyer Payload, see here. The following fields are recommended guidelines and not exhaustive:

Parameter

Appsflyer Conversion Data Payload Fields

Required

acquisitionChannel
Depends on the use case. We recommend using the acquisition network name by default,
attribution.network
Yes
acquisitionCampaignId
campaign_id
Yes
acquisitionCreativeId
adgroup_id
Yes
acquisitionCost
af_cpi
Yes
acquisitionCostCurrency
Check with providerNo
acquisitionCampaignName
campaign
Yes
acquisitionNetwork
media_source
No
acquisitionProvider
Appsflyer
Yes
acquisitionCampaignType
Check with providerNo

Dashboard

Open Analytics in the Unity Dashboard, and select User Acquisition to understand how each acquisition channel is performing in your game: which channel is bringing the most players, the most valuable players, and overall, the most revenue. You can filter the dimensions: Country, Platform, Version, Audience, and Acquisition. You can also see new users per day per acquisition channel, DAU per acquisition channel, daily revenue per acquisition channel, and retention per acquisition channel.

Game performance

See how your game is performing from daily active users in the last day, 7 days, and 30 days, using the acquisition filter. All dashboards (revenue, retention, game performance, and user acquisition) can be filtered by acquisition source. You can also use the Data Explorer to filter metrics by acquisition.