Skip to main content
July 20, 2016

What is app attribution?

Mobile app attribution, different from traditional online attribution which uses things like cookies or pixel tags, is the method of measuring a user’s activities on an app. These activities could be an app install, making in-app purchases or completing a level within an app. This information is important to understanding the success and performance of marketing campaigns.

Since apps don’t support traditional tracking methods like cookies etc., other means are needed to measure a user clicking an ad through to installing an app, and additional activities within that app.

Currently, there is no industry standard for measuring methodology, but there are some methods of measuring that have become universal.

The two most common methods of measuring are:

  • Device Fingerprinting – This method uses basic information from a device to redirect a user from an ad click to an app install. Fingerprinting works by using a measurement URL that gathers data from the device to create the fingerprint.
  • Unique Identifier Matching – An attribution tool using unique identifiers will match that identifier from installs to clicks with 1:1: accuracy when passed app to app. This process is automated and done in real-time.

So why does app attribution matter? Not only does it provide a greater understanding of how a marketing campaign is performing, but it shows where spending money on campaigns is most effective. Additionally, advertising models such as Cost Per Install (CPI) are only possible if attribution is in place. Using a good attribution tool will help facilitate this process. To learn more about CPI advertising, please see Microsoft partner Vungle by clicking here.

New attribution partner: AppsFlyer

To highlight the integration processes, here is an example from AppsFlyer, the latest partner to support Windows.

AppsFlyer, an advertising attribution and marketing analytics platform, is now available for Windows 10 apps. AppsFlyer measures more than $4 billion in mobile ad spend annually for over 10,000 app marketers, agencies and brands. Their proprietary solutions measure and optimize app marketing performance across over 2,000 integrated ad networks and platforms.

As an official Facebook Mobile Measurement Partner, Google Official Partner and Twitter Official Partner, AppsFlyer provides mobile advertisers with unbiased attribution, smart deep linking, mobile campaign analytics, in-app user engagement tracking, lifetime value analysis, ROI and retargeting attribution for more than 800 million installs each month. As a leader in app attribution, AppsFlyer’s MAMA Library features an array of useful and informative mobile industry studies and marketing guides. Their most recent study, The State of In-App Spending, provides an in-depth look at in-app purchase benchmarks and behavior by vertical and region. This is a great resource, and we are proud to have AppsFlyer onboard.

Windows Phone SDK Download

To download the Windows Phone Universal App SDK, click here.

1. Initial Steps

The Windows Universal SDK is installed via the NuGet Package Manager. To install the Appsflyer Windows SDK via NuGet:

  • Right click the project file
  • Click “Manage NuGet Packages”
  • Click “Browse” and search for “AppsFlyerLib”
  • Click the AppsFlyerLib and click Install

If you choose not to use the NuGet package, you can embed AppsFlyer’s SDK into your app manually:

  • Copy the AppsFlyerLib.winmd into your project.
  • In Visual Studio, click Add Reference on the Windows Phone project.
Attribution m1
  • Locate AppsFlyerLib.winmd and add it.
attribution m2


AppsFlyer uses a Newtonsoft.json package. This is a standard library for parsing Json in Windows. You can add this package using NuGet in Visual Studio. This solves the File Not Found exception in the DLL.

  • In Visual Studio, right-click References and select NuGet Package Newtonsoft.json and add it.
  • Allow Internet access in the app manifest, or use Visual Studio in the Capabilities tab.

2. SDK Initialization & Installation Event (Minimum Requirement for Tracking)

  • Add the following code into your App Launch method.
  • Set your appId & DevKey:
    • Populate tracker.appId and tracker.devKey with your values
    • You can get your AppsFlyer DevKey on our dashboard under SDK Integration

[code lang=”csharp”]

protected override void OnLaunched(LaunchActivatedEventArgs e)
this .InitializeComponent();
this .Suspending += this .OnSuspending;
AppsFlyerLib. AppsFlyerTracker tracker =
AppsFlyerLib. AppsFlyerTracker .GetAppsFlyerTracker();
tracker.appId = "YOUR_APP_ID_HERE" ;
tracker.devKey = "YOUR_DEV_KEY_HERE" ;


3. In-App Events Tracking API (Optional)

This API enables AppsFlyer to track post-install events. These events are defined by the advertiser and include an event name in addition to optional event values.

Add the following code to track post install events:

[code lang=”csharp”]

public void TrackEvent(string eventName, IDictionary<string, Object> eventValues)


  • eventName is any string which defines the event name. You can find a list of recommended event names here.
  • eventValues is a dictionary of event parameters that comprise an event. You can find a list of recommended parameters here.
  • Counting revenue as part of inapp events: Use InAppEventParameterName.REVENUE (“af_revenue”) constant parameter name to count revenue as part of an inapp event. You can populate it with any numeric value, positive or negative.


[code lang=”csharp”]

AppsFlyerLib.AppsFlyerTracker tracker = AppsFlyerLib.AppsFlyerTracker.GetAppsFlyerTracker();
IDictionary<string, object> eventValues = new Dictionary<string, object>();
eventValues.Add(AppsFlyerLib.AFInAppEventParameterName.CONTENT_ID, "id123");
eventValues.Add(AppsFlyerLib.AFInAppEventParameterName.REVENUE, "10");
eventValues.Add(AppsFlyerLib.AFInAppEventParameterName.CURRENCY, "USD");
tracker.TrackEvent(AppsFlyerLib.AFInAppEventType.ADD_TO_CART, eventValues);


For a complete list of AppsFlyer Rich InApp Events, see here.

4. Advanced Integration

The APIs below are optional and are part of the advanced integration with AppsFlyer SDK.

4.1 Set Currency Code (Optional)

You can set a global currency code using the API below in addition to specific currency codes that can be used as part of each inapp event sent to AppsFlyer. USD is the default value. Please find acceptable ISO currency codes here.

Use the following API to set the currency code:

[code lang=”csharp”]

tracker.currencyCode = "GBP";


4.2 GetAppsFlyerUID (Optional)

An AppsFlyer Unique ID is created for every new install of an app.

Use the following API in order to get this ID:

[code lang=”csharp”]

public string getAppsFlyerUID()


4.3 Customer User ID (Optional)

Setting your own customer ID enables you to cross-reference your own unique ID with AppsFlyer’s user ID and all other device IDs. This ID is available in the AppsFlyer CSV reports along with postbacks APIs for cross referencing with your internal IDs.

To set your Customer User ID:

[code lang=”csharp”]

tracker.customerUserId = "YOUR_CUSTOMER_USER_ID";


4.4 GetConversionData (Optional)

You can receive the conversion data for every install through the SDK using this API. Add the following code to track post install events:

[code lang=”csharp”]

Task.Run(async () =>
AppsFlyerLib.AppsFlyerTracker tracker = AppsFlyerLib.AppsFlyerTracker.GetAppsFlyerTracker();
string conversionData = await tracker.GetConversionDataAsync();


For more information regarding this advanced functionality, read here.

Other attribution partners supporting Windows

If you’re interested in learning more about other attribution partners supporting Windows, please check out this list:

Adjust – A mobile attribution and analytics company that provides app marketers with a comprehensive business intelligence platform. For documentation and SDK installation, please click here.

Tune – An enterprise platform providing measurement to mobile marketers and their partners— advertising attribution analytics, app store optimization, and in-app marketing included. For documentation and SDK installation, please click here.

Kochava – An attribution and analytics company for connected devices from mobile and tablet to TVs and bots. For documentation and SDK installation, please click here.

Download Visual Studio to get started!