Track user acquisition

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.

ParameterDescriptionData typeRequired
acquisitionChannelThe 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.stringYes
acquisitionCampaignIdThe ID of the acquisition campaign.stringYes
acquisitionCreativeIdThe acquisition campaign creative ID.stringYes
acquisitionCostThe cost of the install e.g. 2.36.floatNo
acquisitionCostCurrencyThe ISO 4217 three-letter currency code for the install cost currency, e.g. GBP or USD.stringNo
acquisitionCampaignNameThe acquisition campaign name e.g. Interstitial:Halloween21.stringYes
acquisitionNetworkThe acquisition campaign network e.g. Ironsource, Facebook Ads.stringNo
acquisitionProviderThe name of the attribution provider in use e.g. Adjust, AppsFlyer, Singular.stringYes
acquisitionCampaignTypeThe acquisition campaign type. e.g. CPI.stringNo

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, see https://github.com/adjust/unity_sdk#attribution-callback.

ParameterValue from Adjust SDK (AdjustAttribution attribution)Required
acquisitionChannelDepends on the use case. We recommend using the acquisition network name by default, attribution.networkYes
acquisitionCampaignIdattribution.campaignYes
acquisitionCreativeIdattribution.creativeYes
acquisitionCostattribution.costAmountYes
acquisitionCostCurrencyattribution.costCurrencyNo
acquisitionCampaignNameattribution.campaignYes
acquisitionNetworkattribution.networkNo
acquisitionProviderAdjustYes
acquisitionCampaignTypeattribution.costTypeNo

Note: this is a guide and we recommend checking with the provider for accuracy.

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:

ParameterAppsflyer Conversion Data Payload FieldsRequired
acquisitionChannelDepends on the use case. We recommend using the acquisition network name by default, attribution.networkYes
acquisitionCampaignIdcampaign_idYes
acquisitionCreativeIdadgroup_idYes
acquisitionCostaf_cpiYes
acquisitionCostCurrencyCheck with providerNo
acquisitionCampaignNamecampaignYes
acquisitionNetworkmedia_sourceNo
acquisitionProviderAppsflyerYes
acquisitionCampaignTypeCheck with providerNo

Note: this is a guide and we recommend checking with the provider for accuracy.

Dashboard

Open Analytics in the Unity Cloud 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.