{"id":20643850,"url":"https://github.com/adjust/windows_sdk","last_synced_at":"2025-04-16T02:06:27.638Z","repository":{"id":5678157,"uuid":"6888121","full_name":"adjust/windows_sdk","owner":"adjust","description":"This is the Windows SDK of","archived":false,"fork":false,"pushed_at":"2022-12-07T19:54:01.000Z","size":2733,"stargazers_count":10,"open_issues_count":5,"forks_count":13,"subscribers_count":66,"default_branch":"master","last_synced_at":"2025-04-16T02:06:09.010Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.adjust.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adjust.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-27T17:55:26.000Z","updated_at":"2023-06-02T03:37:47.000Z","dependencies_parsed_at":"2023-01-11T17:00:35.904Z","dependency_job_id":null,"html_url":"https://github.com/adjust/windows_sdk","commit_stats":null,"previous_names":["adeven/adjust_windows_sdk"],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fwindows_sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fwindows_sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fwindows_sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fwindows_sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adjust","download_url":"https://codeload.github.com/adjust/windows_sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249183102,"owners_count":21226141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T16:14:01.809Z","updated_at":"2025-04-16T02:06:27.621Z","avatar_url":"https://github.com/adjust.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Summary\n\nThis is the Windows SDK of adjust™. You can read more about adjust™ at [adjust.com](http://adjust.com).\n\n## Table of contents\n\n* [Example app](#example-app)\n* [Basic integration](#basic-integration)\n    * [Install the Adjust package using NuGet Package Manager](#install-adjust-package)\n    * [Integrate the Adjust SDK into your app](#integrate-adjust-package)\n    * [Update Adjust settings](#update-adjust-settings)\n        * [App Token \u0026 Environment](#app-token-and-environment)\n        * [Adjust Logging](#adjust-logging)\n    * [Build your app](#build-your-app)\n* [Additional features](#additional-features)\n    * [Event tracking](#custom-events-tracking)\n        * [Revenue tracking](#revenue-tracking)\n        * [Revenue deduplication](#revenue-deduplication)\n        * [Callback parameters](#callback-parameters)\n        * [Partner parameters](#partner-params)\n        * [Callback identifier](#callback-id)\n    * [Session parameters](#session-params)\n        * [Session callback parameters](#session-callback-parameters)\n        * [Session partner parameters](#session-partner-parameters)\n        * [Delay start](#delay-start)\n    * [Attribution callback](#attribution-callback)\n    * [Session and event callbacks](#session-event-callbacks)\n    * [Disable tracking](#disable-tracking)\n    * [Offline mode](#offline-mode)\n    * [Event buffering](#event-buffering)\n    * [GDPR right to be forgotten](#gdpr-forget-me)\n    * [SDK signature](#sdk-signature)\n    * [Background tracking](#background-tracking)\n    * [Device IDs](#device-ids)\n        * [Windows advertising identifier](#di-win-adid)\n        * [Adjust device identifier](#di-adid)\n    * [User attribution](#user-attribution)\n    * [Push token](#push-token)\n    * [Pre-installed trackers](#pre-installed-trackers)\n    * [Deep linking](#deeplinking)\n        * [Standard deep linking scenario](#deeplinking-standard)\n        * [Deferred deep linking scenario](#deeplinking-deferred)\n        * [Reattribution via deep links](#deeplinking-reattribution)\n* [License](#license)\n\n## \u003ca id=\"example-app\"\u003e\u003c/a\u003eExample app\n\nThere are different example apps inside the [`Adjust` directory][example]: \n1. `AdjustUAP10Example` for Universal Windows Apps,\n2. `AdjustWP81Example` for Windows Phone 8.1,\n3. `AdjustWSExample` for Windows Store. \n\nYou can use these example projects to see how the Adjust SDK can be integrated into your app.\n\n## \u003ca id=\"basic-integration\"\u003e\u003c/a\u003eBasic integration\n\nThese are the basic steps required to integrate the Adjust SDK into your Windows Phone or Windows Store project. We are going to assume that you use Visual Studio 2015 or later, with the latest NuGet package manager installed. A previous version that supports Windows Phone 8.1 or Windows 8 should also work. The screenshots show the integration process for a Windows Universal app, but the procedure is very similar for both Windows Store or Phone apps. Any differences with Windows Phone 8.1 or Windows Store apps will be noted throughout the walkthrough.\n\n### \u003ca id=\"install-adjust-package\"\u003e\u003c/a\u003eInstall the Adjust package using NuGet Package Manager\n\nRight click on the project in the Solution Explorer, then click on `Manage NuGet Packages...`. In the newly opened NuGet Package Manager window, click on the `Browse` tab, then enter `adjust` in the search box, and press `\u003cEnter\u003e`. The Adjust package should be the first search result. Click on it, and in the right pane, click on `Install`.\n\n![][adjust_nuget_pm]\n\nAnother method to install Adjust package is using `Package Manager Console`. In the Visual Studio menu, select `TOOLS → NuGet Package Manager → Package Manager Console` (or, in older versions of Visual Studio `TOOLS → Library Package Manager → Package Manager Console`) to open the Package Manager Console view.\n\nAfter the `PM\u003e` prompt, enter the following line and press `\u003cEnter\u003e` to install the [Adjust package][NuGet]:\n\n```\nInstall-Package Adjust\n```\n\nIt's also possible to install the Adjust package through the NuGet Package Manager for your Windows Phone or Windows Store project.\n\n### \u003ca id=\"integrate-adjust-package\"\u003e\u003c/a\u003eIntegrate the Adjust SDK into your app\n\nIn Solution Explorer, open the `App.xaml.cs` file. Add the `using AdjustSdk;` statement at the top of the file.\n\nHere is a snippet of the code that has to be added in the `OnLaunched` method of your app.\n\n```cs\nusing AdjustSdk;\n\nsealed partial class App : Application\n{\n    protected override void OnLaunched(LaunchActivatedEventArgs e)\n    {\n        string appToken = \"{YourAppToken}\";\n        string environment = AdjustConfig.EnvironmentSandbox;\n        var config = new AdjustConfig(appToken, environment);\n        Adjust.ApplicationLaunching(config);\n        // ...\n    }\n}\n```\n\n### \u003ca id=\"update-adjust-settings\"\u003e\u003c/a\u003eUpdate Adjust settings\n\n#### \u003ca id=\"app-token-and-environment\"\u003e\u003c/a\u003eApp Token \u0026 Environment\n\nReplace the `{YourAppToken}` placeholder with your app token, which you can find in your [dashboard].\n\nDepending on whether or not you are building your app for testing or for production, you will need to set the `environment` parameter with one of these values:\n\n```cs\nstring environment = AdjustConfig.EnvironmentSandbox;\nstring environment = AdjustConfig.EnvironmentProduction;\n```\n\n**Important:** This value should be set to `AdjustConfig.EnvironmentSandbox` if and only if you or someone else is testing your app. Make sure to set the environment to `AdjustConfig.EnvironmentProduction` before you publish your app. Set it back to `AdjustConfig.EnvironmentSandbox` if you start developing and testing it again.\n\nWe use this environment to distinguish between real traffic and test traffic from test devices. It is imperative that you keep this value meaningful at all times, especially if you are tracking revenue.\n\n#### \u003ca id=\"adjust-logging\"\u003e\u003c/a\u003eAdjust Logging\n\nTo see the compiled logs from our library in `released` mode, it is necessary to redirect the log output to your app while it's being tested in `debug` mode.\n\nTo do this, use the `AdjustConfig` constructor with 4 parameters, where the 3rd parameter is the delegate method which handles the logging, and the 4th parameter is the `LogLevel`:\n\n```cs\n// ....\nprotected override void OnLaunched(LaunchActivatedEventArgs e)\n{\n    string appToken = \"hmqwpvspxnuo\";\n    string environment = AdjustConfig.EnvironmentSandbox;\n    var config = new AdjustConfig(appToken, environment,\n        msg =\u003e System.Diagnostics.Debug.WriteLine(msg), LogLevel.Verbose);\n    // ...\n}\n// ....\n```\n\nYou can increase or decrease the amount of logs you see in tests by setting the 4th argument of the `AdjustConfig` constructor, `logLevel`, with one of the following values:\n\n```cs\nlogLevel: LogLevel.Verbose  // enable all logging\nlogLevel: LogLevel.Debug    // enable more logging\nlogLevel: LogLevel.Info     // the default\nlogLevel: LogLevel.Warn     // disable info logging\nlogLevel: LogLevel.Error    // disable warnings as well\nlogLevel: LogLevel.Assert   // disable errors as well\nlogLevel: LogLevel.Suppress // disable all logs\n```\n\n### \u003ca id=\"build-your-app\"\u003e\u003c/a\u003eBuild and debug your app\n\nFrom the menu, select `DEBUG → Start Debugging`. After the app launches, you should see the Adjust debug logs in the Output view. Every Adjust-specific log starts with the ```[Adjust]``` tag, like in the picture below:\n\n![][debug_output_window]\n\n## \u003ca id=\"additional-features\"\u003e\u003c/a\u003eAdditional features\n\nOnce you have integrated the Adjust SDK into your project, you can take advantage of the following features.\n\n### \u003ca id=\"custom-events-tracking\"\u003e\u003c/a\u003eEvent tracking\n\nYou can use Adjust to track any event in your app. Suppose you want to track every tap of a button. You would have to create a new event token in your [dashboard]. Let's say that event token is `abc123`. In your button's `Button_Click` method, you can add the following lines to track the click:\n\n```cs\nvar adjustEvent = new AdjustEvent(\"abc123\");\nAdjust.TrackEvent(adjustEvent);\n```\n\n### \u003ca id=\"revenue-tracking\"\u003e\u003c/a\u003eRevenue tracking\n\nIf your users generate revenue by tapping on advertisements or making in-app purchases, then you can track that revenue through events. Let's say a tap is worth €0.01. You can then track the revenue event like this:\n\n```cs\nvar adjustEvent = new AdjustEvent(\"abc123\");\nadjustEvent.SetRevenue(0.01, \"EUR\");\nAdjust.TrackEvent(adjustEvent);\n```\n\nThis can always be combined with callback parameters.\n\nWhen you set a currency token, Adjust will automatically convert the incoming revenue into the reporting revenue of your choice. Read more about [currency conversion here][currency-conversion].\n\nYou can read more about revenue and event tracking in the [event tracking guide][event-tracking].\n\nThe event instance can be used to further configure before you begin tracking.\n\n### \u003ca id=\"revenue-deduplication\"\u003e\u003c/a\u003eRevenue deduplication\n\nYou can also add an optional purchase ID to avoid tracking duplicate revenues. The last ten purchase IDs are remembered, and revenue events with duplicate purchase IDs are skipped. This is especially useful for in-app purchase tracking. You can see an example below.\n\nIf you want to track in-app purchases, please make sure to call `TrackEvent` only if the purchase is finished and item is purchased. That way you can avoid tracking revenue that is not actually being generated.\n\n```\nAdjustEvent event = new AdjustEvent(\"abc123\");\n\nevent.SetRevenue(0.01, \"EUR\");\nevent.PurchaseId = \"{PurchaseId}\";\n\nAdjust.trackEvent(event);\n```\n\n### \u003ca id=\"callback-parameters\"\u003e\u003c/a\u003eCallback parameters\n\nYou can register a callback URL for the events in your [dashboard]. We will send a GET request to this URL whenever an event is tracked. You can also add callback parameters to the event by calling the `AddCallbackParameter` on the event instance before tracking it. We will then append these parameters to your specified callback URL.\n\nFor example, suppose you have registered the URL `http://www.adjust.com/callback`. Then, you would track an event like this:\n\n```cs\nvar adjustEvent = new AdjustEvent(\"abc123\");\n\nadjustEvent.AddCallbackParameter(\"key\", \"value\");\nadjustEvent.AddCallbackParameter(\"foo\", \"bar\");\n\nAdjust.TrackEvent(adjustEvent);\n```\n\nIn that case we would track the event and send a request to:\n\n```\nhttp://www.adjust.com/callback?key=value\u0026foo=bar\n```\n\nIt should be mentioned that we support a variety of placeholders, such as `{win_adid}`, that can be used as parameter values. In the resulting callback, this placeholder would be replaced with the Windows advertising ID of the current device. Also note that we don't store any of your custom parameters but only append them to your callbacks. If you haven't registered a callback for an event, these parameters won't even be read.\n\nYou can read more about using URL callbacks, including a full list of available values, in our [callbacks guide][callbacks-guide].\n\n### \u003ca id=\"partner-params\"\u003e\u003c/a\u003ePartner parameters\n\nYou can also add parameters to be transmitted to network partners that have been activated in your Adjust dashboard.\n\nThis works similarly to the callback parameters mentioned above, but can be added by calling the `addPartnerParameter` method on your `AdjustEvent` instance.\n\n```cs\nvar adjustEvent = new AdjustEvent(\"abc123\");\n\nadjustEvent.AddPartnerParameter(\"key\", \"value\");\nadjustEvent.AddPartnerParameter(\"foo\", \"bar\");\n\nAdjust.TrackEvent(adjustEvent);\n```\n\nYou can read more about special partners and these integrations in our [guide to special partners][special-partners].\n\n### \u003ca id=\"callback-id\"\u003e\u003c/a\u003eCallback identifier\n\nYou can also add custom string identifier to each event you want to track. This identifier will later be reported in event success and/or event failure callbacks to enable you to keep track on which event was successfully tracked or not. You can set this identifier using the `CallbackId` property on your `AdjustEvent` instance:\n\n\n```cs\nvar adjustEvent = new AdjustEvent(\"abc123\");\n\nadjustEvent.CallbackId = \"Your-Custom-Id\";\n\nAdjust.TrackEvent(adjustEvent);\n```\n\n### \u003ca id=\"session-params\"\u003e\u003c/a\u003eSet up session parameters\n\nSome parameters are saved to be sent in every event and session of the Adjust SDK. Once you have added any of these parameters, you don't need to add them every time, since they will be saved locally. If you add the same parameter twice, there will be no effect.\n\nThese session parameters can be called before the Adjust SDK is launched to make sure they are sent even on install. If you need to send them with an install but can only obtain the needed values after launch, it's possible to delay the first launch of the Adjust SDK to allow for this behavior.\n\n### \u003ca id=\"session-callback-parameters\"\u003e\u003c/a\u003eSession callback parameters\n\nThe same callback parameters that are registered for [events](#callback-parameters) can be also saved to be sent in every event or session of the Adjust SDK.\n\nThe session callback parameters have a similar interface to the event callback parameters. Except, instead of adding the key and its value to an event, they are added through a call to `Adjust.AddSessionCallbackParameter(string key, string value)`:\n\n```cs\nAdjust.AddSessionCallbackParameter(\"foo\", \"bar\");\n```\n\nThe session callback parameters will be merged with the callback parameters added to an event. The callback parameters added to an event have precedence over the session callback parameters. Meaning that, when adding a callback parameter to an event with the same key to one added from the session, the value that prevails is the callback parameter added to the event.\n\nIt's possible to remove a specific session callback parameter by passing the desired key to the `Adjust.RemoveSessionCallbackParameter(string key)` method.\n\n```cs\nAdjust.RemoveSessionCallbackParameter(\"foo\");\n```\n\nIf you wish to remove all keys and their corresponding values from the session callback parameters, you can reset them with the `Adjust.ResetSessionCallbackParameters()` method.\n\n```cs\nAdjust.ResetSessionCallbackParameters();\n```\n\n### \u003ca id=\"session-partner-parameters\"\u003e\u003c/a\u003eSession partner parameters\n\nIn the same way that there are [session callback parameters](#session-callback-parameters) sent in every event or session of the Adjust SDK, there are also session partner parameters.\n\nThese will be transmitted to network partners for the integrations that have been activated in your Adjust [dashboard].\n\nSession partner parameters have a similar interface to event partner parameters. Except, instead of adding the key and its value to an event, they are added through a call to `Adjust.AddSessionPartnerParameter(string key, string value)`:\n\n```cs\nAdjust.AddSessionPartnerParameter(\"foo\", \"bar\");\n```\n\nThe session partner parameters will be merged with the partner parameters added to an event. The partner parameters added to an event have precedence over the session partner parameters. Meaning that, when adding a partner parameter to an event with the same key to one added from the session, the value that prevails is the partner parameter added to the event.\n\nIt's possible to remove a specific session partner parameter by passing the desired key to the `Adjust.RemoveSessionPartnerParameter(string key)` method.\n\n```cs\nAdjust.RemoveSessionPartnerParameter(\"foo\");\n```\n\nIf you wish to remove all keys and their corresponding values from the session partner parameters, you can reset them with the `Adjust.ResetSessionPartnerParameters()` method.\n\n```cs\nAdjust.RresetSessionPartnerParameters();\n```\n\n### \u003ca id=\"delay-start\"\u003e\u003c/a\u003eDelay start\n\nDelaying the start of the Adjust SDK allows your app some time to obtain session parameters, such as unique identifiers, to be sent on install.\n\nSet the initial delay time in seconds with the `DelayStart` property in the `AdjustConfig` instance:\n\n```cs\nadjustConfig.DelayStart = TimeSpan.FromSeconds(5.5);\n```\n\nIn this case, the Adjust SDK will not send the initial install session or any events created for 5.5 seconds. After this time has expired--or if you call `Adjust.SendFirstPackages()` in the meanwhile--every session parameter will be added to the delayed install session and events, and the Adjust SDK will resume as usual.\n\n**The maximum delay start time of the Adjust SDK is 10 seconds**.\n\n### \u003ca id=\"attribution-callback\"\u003e\u003c/a\u003eAttribution callback\n\nYou can register a delegate function to be notified of tracker attribution changes. Due to the different sources considered for attribution, this information cannot be provided synchronously. The simplest way is to create a single anonymous delegate function.\n\nPlease make sure to consider our [applicable attribution data policies][attribution-data].\n\nWith the `AdjustConfig` instance, before starting the SDK, set the `AttributionChanged` delegate with the `Action\u003cAdjustAttribution\u003e` signature.\n\n```cs\nvar config = new AdjustConfig(appToken, environment);\n\nconfig.AttributionChanged = (attribution) =\u003e \n    System.Diagnostics.Debug.WriteLine(\"attribution: \" + attribution);\n    \nAdjust.ApplicationLaunching(config);\n```\n\nAlternatively, you can implement the `AttributionChanged` delegate interface in your `Application` class and set it as a delegate:\n\n```cs\nvar config = new AdjustConfig(appToken, environment);\nconfig.AttributionChanged = AdjustAttributionChanged;\nAdjust.ApplicationLaunching(config);\n\nprivate void AdjustAttributionChanged(AdjustAttribution attribution) \n{\n    //...\n}\n```\n\nThe delegate function will be called when the SDK receives the final install attribution information and also each time an attribution changes. Within the listener function you have access to the `attribution` parameter. Here is a quick summary of its properties:\n\n- `string TrackerToken` the tracker token of the current attribution.\n- `string TrackerName` the tracker name of the current attribution.\n- `string Network` the network grouping level of the current attribution.\n- `string Campaign` the campaign grouping level of the current attribution.\n- `string Adgroup` the ad group grouping level of the current attribution.\n- `string Creative` the creative grouping level of the current attribution.\n- `string ClickLabel` the click label of the current attribution.\n- `string Adid` the Adjust device identifier.\n\nIf any value is unavailable, it will default to `null`.\n\n### \u003ca id=\"session-event-callbacks\"\u003e\u003c/a\u003eSession and event callbacks\n\nYou can register a listener to be notified when events or sessions are tracked. There are four listeners: one for tracking successful events, one for tracking failed events, one for tracking successful sessions and one for tracking failed sessions. You can add any number of listeners after creating the `AdjustConfig` object:\n\n```cs\nvar config = new AdjustConfig(appToken, environment,\n    msg =\u003e System.Diagnostics.Debug.WriteLine(msg), LogLevel.Verbose);\n\n// Set event success tracking delegate\nconfig.EventTrackingSucceeded = adjustEventSuccess =\u003e\n{\n    // ...\n};\n\n// Set event failure tracking delegate\nconfig.EventTrackingFailed = adjustEventFailure =\u003e\n{\n    // ...\n};\n\n// Set session success tracking delegate\nconfig.SesssionTrackingSucceeded = adjustSessionSuccess =\u003e\n{\n    // ...\n};\n\n// Set session failure tracking delegate\nconfig.SesssionTrackingFailed = adjustSessionFailure =\u003e\n{\n    // ...\n};\n\nAdjust.ApplicationLaunching(config);\n```\n\nThe delegate function will be called after the SDK tries to send a package to the server. Within the delegate function you have access to a response data object specifically for the event. Here is a quick summary of the successful session response data object fields:\n\n- `string Message` the message from the server or the error logged by the SDK.\n- `string Timestamp` timestamp from the server.\n- `string Adid` a unique device identifier provided by Adjust.\n- `JSONObject JsonResponse` the JSON object with the reponse from the server.\n\nBoth event response data objects contain:\n\n- `string EventToken` the event token, if the package tracked was an event.\n- `string CallbackId` the custom defined callback ID set on event object.\n\nIf any value is unavailable, it will default to `null`.\n\nAnd both event and session failed objects also contain:\n\n- `bool WillRetry` indicates that will be an attempt to resend the package at a later time.\n\n### \u003ca id=\"disable-tracking\"\u003e\u003c/a\u003eDisable tracking\n\nYou can disable the Adjust SDK from tracking any activities of the current device by calling `setEnabled` with the parameter set to `false`. **This setting is remembered between sessions**.\n\n```cs\nAdjust.SetEnabled(false);\n```\n\nYou can check if the Adjust SDK is currently enabled by calling the `isEnabled` function. It is always possible to activate the Adjust SDK by invoking `SetEnabled` with the `enabled` parameter set to `true`.\n\n### \u003ca id=\"offline-mode\"\u003e\u003c/a\u003eOffline mode\n\nYou can put the Adjust SDK in offline mode to suspend transmission to our servers, while retaining tracked data to be sent later. While in offline mode, all information is saved in a file, so be careful not to trigger too many events while in offline mode.\n\nYou can activate offline mode by calling `SetOfflineMode` with the parameter `true`.\n\n```cs\nAdjust.SetOfflineMode(true);\n```\n\nConversely, you can deactivate offline mode by calling `SetOfflineMode` with `false`. When the Adjust SDK is put back in online mode, all saved information is sent to our servers with the correct time information.\n\nUnlike disabling tracking, this setting is **not remembered** between sessions. This means that the SDK is in online mode whenever it is started, even if the app was terminated in offline mode.\n\n### \u003ca id=\"event-buffering\"\u003e\u003c/a\u003eEvent buffering\n\nIf your app makes heavy use of event tracking, you might want to delay some HTTP requests in order to send them in one batch every minute. You can enable event buffering with your `AdjustConfig` instance:\n\n```cs\nvar config = new AdjustConfig(appToken, environment,\n    msg =\u003e System.Diagnostics.Debug.WriteLine(msg), LogLevel.Verbose);\n\nconfig.EventBufferingEnabled = true;\n\nAdjust.ApplicationLaunching(config);\n```\n\n### \u003ca id=\"gdpr-forget-me\"\u003e\u003c/a\u003eGDPR right to be forgotten\n\nIn accordance with article 17 of the EU's General Data Protection Regulation (GDPR), you can notify Adjust when a user has exercised their right to be forgotten. Calling the following method will instruct the Adjust SDK to communicate the user's choice to be forgotten to the Adjust backend:\n\n```cs\nAdjust.GdprForgetMe();\n```\n\nUpon receiving this information, Adjust will erase the user's data and the Adjust SDK will stop tracking the user. No requests from this device will be sent to Adjust in the future.\n\n### \u003ca id=\"sdk-signature\"\u003e\u003c/a\u003e SDK signature\n\nAn account manager must activate the Adjust SDK signature. Contact Adjust support (support@adjust.com) if you are interested in using this feature.\n\nIf the SDK signature has already been enabled on your account and you have access to App Secrets in your Adjust Dashboard, please use the method below to integrate the SDK signature into your app.\n\nAn App Secret is set by calling `setAppSecret` on your `AdjustConfig` instance:\n\n```cs\nvar config = new AdjustConfig(appToken, environment,\n   msg =\u003e System.Diagnostics.Debug.WriteLine(msg), LogLevel.Verbose);\n\nconfig.SetAppSecret(secretId, info1, info2, info3, info4);\n\nAdjust.ApplicationLaunching(config);\n```\n\n### \u003ca id=\"background-tracking\"\u003e\u003c/a\u003eBackground tracking\n\nThe default behavior of the Adjust SDK is to pause sending HTTP requests while the app is in the background. You can change this in your `AdjustConfig` instance:\n\n```cs\nvar config = new AdjustConfig(appToken, environment,\n    msg =\u003e System.Diagnostics.Debug.WriteLine(msg), LogLevel.Verbose);\n\nconfig.SendInBackground = true;\n\nAdjust.ApplicationLaunching(config);\n```\n\n### \u003ca id=\"device-ids\"\u003e\u003c/a\u003eDevice IDs\n\nThe Adjust SDK offers you possibility to obtain some device identifiers.\n\n### \u003ca id=\"di-win-adid\"\u003e\u003c/a\u003eWindows advertising identifier\n\nThis retrieves a unique ID used to provide more relevant advertising on the Windows platform. When a user turns the advertising ID feature off on their device, this will be an empty string.\n\nGet the Windows advertising ID by calling the `GetWindowsAdId` method:\n\n```cs\nvar windowsAdid = Adjust.GetWindowsAdId();\n```\n\n### \u003ca id=\"di-adid\"\u003e\u003c/a\u003eAdjust device identifier\n\nFor each device with your app installed on it, the Adjust backend generates a unique **Adjust device identifier** (**adid**). In order to obtain this identifier, you can make a call to following method on the `Adjust` instance:\n\n```cs\nstring adid = Adjust.GetAdid();\n```\n\n**Note**: You can only make this call in the Adjust SDK v4.12.0 and above.\n\n**Note**: Information about the **adid** is available after an app installation has been tracked by the Adjust backend. From that moment on, the Adjust SDK has information about the device **adid** and you can access it with this method. So, **it is not possible** to access the **adid** value before the SDK has been initialized and installation of your app has been tracked successfully.\n\n### \u003ca id=\"user-attribution\"\u003e\u003c/a\u003eUser attribution\n\nThis callback is triggered as described in the [attribution callback section](#attribution-callback). It provides information about new attributions whenever there is a change. In case you want to access information about your user's current attribution whenever you need it, you can make a call to the following method of the `Adjust` instance:\n\n```cs\nAdjustAttribution attribution = Adjust.GetAttribution();\n```\n\n**Note**: You can only make this call in the Adjust SDK v4.12.0 and above.\n\n**Note**: Information about a current attribution is available after app installation has been tracked by the Adjust backend and an attribution callback has been triggered. From that moment on, the Adjust SDK has information about your user's attribution status and you can access it with this method. So, **it is not possible** to access a user's attribution value before the SDK has been initialized and an attribution callback has been triggered.\n\n### \u003ca id=\"push-token\"\u003e\u003c/a\u003ePush token\n\nTo send us the push notification token, add the following call to Adjust once you have obtained your token or whenever its value is changed:\n\n```cs\nAdjust.SetPushToken(pushNotificationsToken);\n```\n\n### \u003ca id=\"pre-installed-trackers\"\u003e\u003c/a\u003ePre-installed trackers\n\nIf you want to use the Adjust SDK to recognize users whose devices came with your app preinstalled, follow these steps.\n\n1. Create a new tracker in your [dashboard].\n2. Set the ```DefaultTracker``` property of your `AdjustConfig`:\n\n    ```cs\n        var config = new AdjustConfig(appToken, environment,\n            msg =\u003e System.Diagnostics.Debug.WriteLine(msg), LogLevel.Verbose);\n        config.DefaultTracker = \"{TrackerToken}\";\n        Adjust.ApplicationLaunching(config);\n    ```\n\n  Replace `{TrackerToken}` with the tracker token you created in step 2.\n  Please note that the dashboard displays a tracker URL (including `http://app.adjust.com/`). In your source code, you should \n  specify only the six-character token and not the entire URL.\n\n3. Build and run your app. You should see a line like the following in Debug Output:\n\n    ```\n    Default tracker: 'abc123'\n    ```\n\n### \u003ca id=\"deeplinking\"\u003e\u003c/a\u003eDeep linking\n\nYou can set up the Adjust SDK to handle any deep links (also known as URI activation in Universal apps) used to open your app. We will only read Adjust-specific parameters. \n\nIf you are using an Adjust tracker URL with an option to deep link into your app from the URL, there is the possibility to get information about the deep link URL and its content.\n\nHitting the URL can happen when the user has your app already installed (standard deep linking scenario) or if they don't have the app on their device (deferred deep linking scenario). In the standard deep linking scenario, the Windows platform natively offers the possibility for you to get the information about the deep link's content. The deferred deep linking scenario is something that the Windows platform doesn't support out of the box and, in this case, the Adjust SDK will offer you the means to get the information about the deep link content.\n\n### \u003ca id=\"deeplinking-standard\"\u003e\u003c/a\u003eStandard deep linking scenario\n\nIf a user has your app installed and you want it to launch after hitting an Adjust tracker URL with the `deep_link` parameter in it, you need to enable deep linking in your app. This is done by choosing a desired **unique scheme name** and assigning it to the specific handler method in your app, which runs once the app opens after the user has clicked on the link. This is set in the `Package.appxmanifest`, and here's how you indicate that your app handles your unique URI scheme name:\n\n\n1. In the `Solution Explorer`, double click `package.appxmanifest` to open the manifest designer\n2. Select the `Declarations` tab, and in the `Available Declarations` drop down, select `Protocol` and then click `Add`.\n3. Choose a name for the URI scheme (the name must be in all lowercase letters),\n4. Press `Ctrl+S` to save the changes to `package.appxmanifest`.\n\n![][unique_scheme_name_setup]\n\nHere, we added a protocol with the assigned unique scheme name of **myapp**;\n\nNext thing you have to set up is the `OnActivated` event handler, which handles the activated deep link event. \n\nIn your `App.xaml.cs` file, add the following:\n\n```cs\n// ...\nprotected override void OnActivated(IActivatedEventArgs args)\n{\n    if (args.Kind == ActivationKind.Protocol)\n    {\n        var eventArgs = args as ProtocolActivatedEventArgs;\n        if (eventArgs != null)\n        {\n            // to get deep link URI:\n            Uri deeplink = eventArgs.Uri;\n            \n            // ...            \n        }\n    }\n    base.OnActivated(args);\n}\n// ...\n```\n\nYou can find more information in the official Microsoft documentation: [URI activation handling][handle-uri-activation]\n\nWith this now set, you need to use the assigned scheme name in the Adjust tracker URL's `deep_link` parameter if you want your app to launch once the tracker URL is clicked. A tracker URL without any information added to the deep link can be built to look something like this:\n\n```\nhttps://app.adjust.com/abc123?deep_link=adjustExample%3A%2F%2F\n```\n\nPlease bear in mind that the `deep_link` parameter value in the URL **must be URL encoded**.\n\nWith the app set as described above, after clicking this tracker URL. your app will launch along with `OnActivated` event handler, inside which you will automatically be provided with the information about the `deep_link` parameter content. Once this content is delivered to you, it **will not be encoded**, although it was encoded in the URL.\n\n### \u003ca id=\"deeplinking-deferred\"\u003e\u003c/a\u003eDeferred deep linking scenario\n\nThe deferred deep linking scenario occurs when a user clicks on the Adjust tracker URL with the `deep_link` parameter in it but does not have the app installed on the device at the time of click. After that, the user will get redirected to the  Microsoft Store to download and install your app. After opening it for the first time, the content of the `deep_link` parameter will be delivered to the app.\n\nIn order to get information about the `deep_link` parameter content in a deferred deep linking scenario, you should set a delegate method (`DeeplinkResponse`) on the `AdjustConfig` object. This will get triggered once the Adjust SDK gets the information about the deep link content from the backend.\n\n```cs\n// ...\nvar config = new AdjustConfig(appToken, environment,\n    msg =\u003e System.Diagnostics.Debug.WriteLine(msg), LogLevel.Verbose);\n\nconfig.DeeplinkResponse = deepLinkUri =\u003e\n{\n    if (ShouldAdjustSdkLaunchTheDeeplink(deepLinkUri))\n    {\n        return true;\n    }\n    else\n    {\n        return false;    \n    }\n};\n\nAdjust.ApplicationLaunching(config);\n// ...\n```\n\nOnce the Adjust SDK receives the information about the deep link content from the backend, it will deliver it to you through this delegate and expect the `bool` return value from you. This return value represents your decision on whether the Adjust SDK should launch the `OnActivated` event handler to which you have assigned the scheme name from the deep link (like in the [Standard deep linking scenario](#deeplinking-standard)) or not.\n\nIf you return `true`, we will launch the event handler and the exact same scenario which is described in the [Standard deep linking scenario chapter](#deeplinking-standard) will happen. If you do not want the SDK to launch the `OnActivated` event handler, you can return `false` from this delegate (`DeeplinkResponse`), and, based on the deep link content, decide on your own what to do next in your app.\n\n### \u003ca id=\"deeplinking-reattribution\"\u003e\u003c/a\u003eReattribution via deep links\n\nHandling of deep links (URI activation on UAP) used to open your app is essential if you are planning to run **retargeting** or **re-engagement** campaigns with deep links. For more information on how to do that, please check our [official docs][reattribution-with-deeplinks].\n\nIf you are using this feature, in order for your users to be properly reattributed, you need to make one additional call to the Adjust SDK in your app.\n\nOnce you have received the deep link content information in your app, add a call to the `Adjust.AppWillOpenUrl` method. By making this call, the Adjust SDK will try to find if there is any new attribution information inside of the deep link, and, if there is any, it will be sent to the Adjust backend. If your user should be reattributed due to a click on an Adjust tracker URL with deep link content in it, you will see the [attribution callback](#attribution-callback) in your app being triggered with new attribution information for this user.\n\nThe call to `Adjust.AppWillOpenUrl` should be done in the `OnActivated` method of your app, like this:\n\n```cs\nusing AdjustSdk;\n\npublic partial class App : Application\n{\n    protected override void OnActivated(IActivatedEventArgs args)\n    {\n        if (args.Kind == ActivationKind.Protocol)\n        {\n            var eventArgs = args as ProtocolActivatedEventArgs;\n\n            if (eventArgs != null)\n            {\n                Adjust.AppWillOpenUrl(eventArgs.Uri);\n            }\n        }\n        //...\n    }\n}\n```\n\n\n[nuget]:             http://nuget.org/packages/Adjust\n[example]:           https://github.com/adjust/windows_sdk/tree/master/Adjust\n[releases]:          https://github.com/adjust/adjust_android_sdk/releases\n[dashboard]:         http://www.adjust.com\n[adjust.com]:        http://www.adjust.com\n[event-tracking]:    https://docs.adjust.com/en/event-tracking\n[callbacks-guide]:   https://docs.adjust.com/en/callbacks\n[special-partners]:  https://docs.adjust.com/en/special-partners\n\n[currency-conversion]:           https://docs.adjust.com/en/event-tracking/#tracking-purchases-in-different-currencies\n[handle-uri-activation]:         https://docs.microsoft.com/en-us/windows/uwp/launch-resume/handle-uri-activation\n[reattribution-with-deeplinks]:  https://docs.adjust.com/en/deeplinking/#manually-appending-attribution-data-to-a-deep-link\n\n[nuget_click]:          https://raw.github.com/adjust/adjust_sdk/master/Resources/windows/01_nuget_console_click.png\n[adjust_nuget_pm]:      https://raw.github.com/adjust/adjust_sdk/master/Resources/windows/v4_12/adjust_nuget_pm.png\n[attribution-data]:     https://github.com/adjust/sdks/blob/master/doc/attribution-data.md\n[debug_output_window]:  https://raw.github.com/adjust/adjust_sdk/master/Resources/windows/v4_12/debug_output_window.png\n[unique_scheme_name_setup]: https://raw.github.com/adjust/adjust_sdk/master/Resources/windows/v4_12/unique_scheme_name_setup.png\n\n## \u003ca id=\"license\"\u003e\u003c/a\u003eLicense\n\nThe Adjust SDK is licensed under the MIT License.\n\nCopyright (c) 2012-2017 Adjust GmbH, http://www.adjust.com\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fwindows_sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadjust%2Fwindows_sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fwindows_sdk/lists"}