{"id":20643915,"url":"https://github.com/adjust/corona_sdk","last_synced_at":"2025-04-16T02:07:14.580Z","repository":{"id":44762112,"uuid":"102457779","full_name":"adjust/corona_sdk","owner":"adjust","description":"This is the Corona SDK of","archived":false,"fork":false,"pushed_at":"2025-02-14T12:45:15.000Z","size":118129,"stargazers_count":6,"open_issues_count":0,"forks_count":7,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-04-16T02:06:46.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.adjust.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-05T08:50:17.000Z","updated_at":"2025-02-14T12:44:54.000Z","dependencies_parsed_at":"2025-01-03T14:34:00.353Z","dependency_job_id":"bb51e663-af61-4383-83e1-ca08747474c7","html_url":"https://github.com/adjust/corona_sdk","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fcorona_sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fcorona_sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fcorona_sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fcorona_sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adjust","download_url":"https://codeload.github.com/adjust/corona_sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249183103,"owners_count":21226142,"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:17.502Z","updated_at":"2025-04-16T02:07:14.568Z","avatar_url":"https://github.com/adjust.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Summary\n\nThis is the Adjust™ plugin for Solar2D (ex Corona). You can read more about Adjust™ at [adjust.com](https://adjust.com).\n\n## Table of contents\n\n* [Example app](#example-app)\n* [Integration guide](#integration-guide)\n   * [Simulator integration](#integration-simulator)\n   * [Get the SDK](#sdk-get)\n   * [Add the SDK to your Android project](#sdk-add-android)\n   * [Add the SDK to your iOS project](#sdk-add-ios)\n   * [Integrate the SDK into your app](#sdk-integrate)\n   * [Adjust logging](#sdk-logging)\n   * [Android permissions](#android-permissions)\n   * [iOS frameworks](#ios-frameworks)\n   * [SDK signature](#sdk-signature)\n* [Additional features](#additional-features)\n   * [Send event information](#event-sending)\n      * [Event revenue](#event-revenue)\n      * [Event deduplication](#event-deduplication)\n      * [Event callback identifier](#event-callback-id)\n      * [Event callback parameters](#event-callback-params)\n      * [Event partner parameters](#event-partner-params)\n   * [User attribution](#user-attribution)\n      * [Attribution callback](#attribution-callback)\n      * [Get user attribution](#attribution-getter)\n   * [Preinstalled apps](#preinstalled-apps)\n      * [Default link token](#preinstall-default-link)\n   * [Global parameters](#global-params)\n      * [Global callback parameters](#global-callback-params)\n      * [Global partner parameters](#global-partner-params)\n   * [Privacy features](#privacy-features)\n      * [GDPR right to be forgotten](#gdpr-forget-me)\n      * [Third party sharing](#third-party-sharing)\n      * [Disable third-party sharing for specific users](#disable-third-party-sharing)\n      * [Enable or re-enable third-party sharing for specific users](#enable-third-party-sharing)\n      * [Send granular options](#send-granular-options)\n      * [Manage Facebook Limited Data Use](#facebook-limited-data-use)\n      * [Provide consent data to Google (Digital Markets Act compliance)](#digital-markets-act)\n      * [Update partner sharing settings](#partner-sharing-settings)\n      * [Consent measurement for specific users](#measurement-consent)\n      * [COPPA compliance](#coppa-compliance)\n      * [Play Store kids apps](#play-store-kids-apps)\n      * [URL strategies](#url-strategies)\n   * [Deep linking](#deeplinking)\n      * [Deferred deep linking scenario](#deeplinking-deferred)\n      * [Reattribution via deep links](#deeplinking-reattribution)\n      * [Resolve Adjust short links](#short-links-resolution)\n      * [Get last processed deep link](#last-deeplink-getter)\n   * [App Tracking Transparency](#app-tracking-transparency)\n      * [ATT authorization wrapper](#att-wrapper)\n      * [Get current authorization status](#att-status-getter)\n      * [ATT prompt waiting interval](#att-waiting-interval)\n   * [SKAdNetwork and conversion values](#skan-framework)\n      * [Disable SKAdNetwork communication](#skan-disable)\n      * [Listen for changes to conversion values](#skan-update-callback)\n      * [Set up direct install postbacks](#skan-postbacks)\n   * [Record ad revenue information](#adrevenue-recording)\n      * [Ad revenue amount](#adrevenue-amount)\n      * [Ad revenue network](#adrevenue-network)\n      * [Ad revenue unit](#adrevenue-unit)\n      * [Ad revenue placement](#adrevenue-placement)\n      * [Ad impressions count](#adrevenue-impressions)\n      * [Ad revenue callback parameters](#adrevenue-callback-params)\n      * [Ad revenue partner parameters](#adrevenue-partner-params)\n   * [Purchase verification](#purchase-verification)\n      * [Verify purchase and record event](#verify-and-record)\n      * [Verify purchase only](#verify-only)\n   * [Send subscription information](#subscription-sending)\n      * [Subscription purchase date](#subscription-purchase-date)\n      * [Subscription region](#subscription-region)\n      * [Subscription callback parameters](#subscription-callback-params)\n      * [Subscription partner parameters](#subscription-partner-params)\n   * [Device IDs](#device-ids)\n      * [iOS advertising identifier](#idfa)\n      * [iOS identifier for vendors](#idfv)\n      * [Google Play Services advertising identifier](#gps-adid)\n      * [Amazon advertising identifier](#fire-adid)\n      * [Adjust device identifier](#adid)\n   * [Session and event callbacks](#session-event-callbacks)\n   * [Disable the SDK](#disable-sdk)\n   * [Offline mode](#offline-mode)\n   * [Sending from background](#background-sending)\n   * [External device ID](#external-device-id)\n   * [Push token](#push-token)\n   * [Disable AdServices information reading](#disable-ad-services)\n* [License](#license)\n\n## \u003ca id=\"example-app\"\u003e\u003c/a\u003eExample app\n\nAn example app is included in the [`plugin` directory](./plugin). You can use the example app to see how the Adjust SDK can be integrated.\n\n## \u003ca id=\"integration-guide\"\u003e\u003c/a\u003eIntegration guide\n\nThe Adjust Corona SDK enables you to record attribution, events, and more in your Solar2D / Corona app. Follow the steps in this guide to set up your app to work with the Adjust SDK.\n\n\u003e Before you begin: The Adjust SDK supports iOS 12 or later and Android API level 21 (Lollipop) or later.\n\n### \u003ca id=\"integration-simulator\"\u003e\u003c/a\u003eSimulator integration\n\nEasiest way to add Adjust SDK to your Simulator project is to add `build.settings` entry:\n\n```lua\nsettings = \n{\n    iphone =\n    {\n        plist =\n        {\n            NSUserTrackingUsageDescription = \"Reason for asking access to IDFA identifier\",\n        },\n    },\n    plugins =\n    {\n        ['plugin.adjust'] = { publisherId = 'com.adjust' },\n    }\n}\n\n```\n\n### \u003ca id=\"sdk-get\"\u003e\u003c/a\u003eGet the SDK\n\nYou can also get the latest version of the Adjust SDK from our [releases page][releases]. Please, download both the `plugin.adjust.jar` and `libplugin_adjust.a` files, since you will need to add them to your app's projects. In addition to that, you will also need to download the latest version of the Adjust signature library for each of the platforms from [here](https://github.com/adjust/adjust_signature_sdk/releases) and add them to your app's projects.\n\n#### \u003ca id=\"sdk-add-android\"\u003e\u003c/a\u003eAdd the SDK to your Android project\n\nInside your Android Studio app project, create a `libs` folder inside of your app folder and add the `plugin.adjust.jar` to it. After that, please update your app's `build.gradle` file and add the following lines to your `dependencies` section to add the dependency to the native Adjust Android SDK:\n\n```\ncompile 'com.adjust.sdk:adjust-android:5.0.2'\ncompile 'com.android.installreferrer:installreferrer:2.2'\n```\n\n#### \u003ca id=\"sdk-add-ios\"\u003e\u003c/a\u003eAdd the SDK to your iOS project\n\nInside your Xcode app project, select your app's target, go to `General -\u003e Linked Frameworks and Libraries` section, press the `+` button and add the `libplugin_adjust.a` and `AdjustSigSdk.a` library into the list.\n\n### \u003ca id=\"sdk-integrate\"\u003e\u003c/a\u003eIntegrate the SDK into your app\n\nIn order to start the Adjust SDK, initialize your config object with your app token and the environment you want to run your application in.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\"\n})\n```\n\nReplace `{YourAppToken}` with your app token. You can find this in your [dashboard](https://dash.adjust.com).\n\nDepending on whether you build your app for testing or for production, you must set `environment` with one of these values:\n\n```lua\nSANDBOX\nPRODUCTION\n```\n\n**Important:** This value should be set to `SANDBOX` if and only if you or someone else is testing your app. Make sure to set the environment to `PRODUCTION` just before you publish the app. Set it back to `SANDBOX` when 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 very important that you keep this value meaningful at all times!\n\n### \u003ca id=\"sdk-logging\"\u003e\u003c/a\u003eAdjust logging\n\nYou can increase or decrease the amount of logs you see in tests by setting the `logLevel` parameter value when calling the `initSdk` method and assign one of the following string values to it:\n\n```lua\n\"VERBOSE\"   // enable all logging\n\"DEBUG\"     // enable more logging\n\"INFO\"      // default\n\"WARN\"      // disable info logging\n\"ERROR\"     // disable warnings as well\n\"ASSERT\"    // disable errors as well\n\"SUPPRESS\"  // suppress all logging\n```\n\nExample:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\"\n})\n```\n\n### \u003ca id=\"android-permissions\"\u003e\u003c/a\u003eAndroid permissions\n\nThe Adjust SDK includes the `com.google.android.gms.AD_ID` and `android.permission.INTERNET` permissions by default. You can remove the `com.google.android.gms.AD_ID` permission by adding a remove directive to your app's manifest file if you need to make your app COPPA-compliant or if you don't target the Google Play Store.\n\n```xml\n\u003cmanifest\u003e\n    \u003cuses-permission android:name=\"com.google.android.gms.AD_ID\" tools:node=\"remove\" /\u003e\n\u003c/manifest\u003e\n```\n\nSee Google's [AdvertisingIdClient.Info](https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info#public-string-getid) documentation for more information about this permission.\n\n### \u003ca id=\"ios-frameworks\"\u003e\u003c/a\u003eiOS frameworks\n\nYou can add following iOS frameworks to your generated Xcode project to take advantage of additional features:\n\n* `AdServices.framework` - needed for Apple Search Ads tracking\n* `AdSupport.framework` - needed for reading iOS Advertising Id (IDFA)\n* `StoreKit.framework` - needed for communication with `SKAdNetwork` framework\n* `AppTrackingTransparency.framework` - needed to ask for user's consent to be tracked and obtain status of that consent\n\n### \u003ca id=\"sdk-signature\"\u003e\u003c/a\u003eSDK signature\n\nBy following the Adjust SDK integration guide, you will be adding signature library for iOS by manually linking it and the signature library for Android will be automatically added to your app once you specify the dependency to native Adjust Android SDK inside of your `build.gradle` file. After this, all the setup for signing of the SDK traffic has been completed. However, enforcing signing checks is not a feature that is enabled by default. If you want to take the advantage of this feature to secure communications between the Adjust SDK and Adjust's servers, follow the instructions in the [SDK signature guide on the Adjust Help Center](https://help.adjust.com/en/article/sdk-signature).\n\n## \u003ca id=\"additional-features\"\u003e\u003c/a\u003eAdditional features\n\nYou can take advantage of the following features once the Adjust SDK is integrated into your project.\n\n### \u003ca id=\"event-sending\"\u003e\u003c/a\u003eSend event information\n\nYou can tell Adjust about every event you want to record. Let's say that event token is `abc123`. You can record that event like this:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackEvent({\n    eventToken = \"abc123\"\n})\n```\n\n### \u003ca id=\"event-revenue\"\u003e\u003c/a\u003eEvent revenue\n\nIf your users can generate revenue by tapping on advertisements or making in-app purchases, then you can record those revenues with events. Let's say a tap is worth €1.50. You could record the revenue event like this:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackEvent({\n    eventToken = \"abc123\",\n    revenue = 1.5,\n    currency = \"EUR\"\n})\n```\n\n### \u003ca id=\"event-deduplication\"\u003e\u003c/a\u003eEvent deduplication\n\nYou can also add an optional deduplication ID to avoid recording duplicate events. The last ten transaction IDs are remembered by default, and events with duplicate deduplication IDs are skipped. If you would like to make the Adjust SDK to remember more than last 10 transaction IDs, you can do that by passing the new limit to `eventDeduplicationIdsMaxSize` parameter of the initialization map:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    eventDeduplicationIdsMaxSize = 20\n})\n\n-- ...\n\nadjust.trackEvent({\n    eventToken = \"abc123\",\n    revenue = 1.5,\n    currency = \"EUR\",\n    deduplicationId = \"deduplucation-id\"\n})\n```\n\n### \u003ca id=\"event-callback-id\"\u003e\u003c/a\u003eEvent callback identifier\n\nYou can also add custom string identifier to each event you want to record. 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 recorded or not. You can set this identifier by setting the `callbackId` parameter of the `trackEvent` parameter map:\n\n```lua\nadjust.trackEvent({\n    eventToken = \"abc123\",\n    callbackId = \"callback-id\"\n})\n```\n\n### \u003ca id=\"event-callback-params\"\u003e\u003c/a\u003eEvent callback parameters\n\nYou can also register a callback URL for that event in your [dashboard](https://dash.adjust.com), and we will send a GET request to that URL whenever the event gets recorded. In that case, you can also put some key-value pairs in an object and pass it to the `trackEvent` method. We will then append these named parameters to your callback URL.\n\nFor example, suppose you have registered the URL `http://www.adjust.com/callback` for your event with event token `abc123` and execute the following lines:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackEvent({\n    eventToken = \"abc123\",\n    callbackParameters = {\n        {\n            key = \"key\",\n            value = \"value\",\n        },\n        {\n            key = \"foo\",\n            value = \"bar\",\n        }\n    }\n})\n```\n\nIn this case we would record 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 like `{idfa}` for iOS or `{gps_adid}` for Android that can be used as parameter values. In the resulting callback, the `{idfa}` placeholder would be replaced with the ID for Advertisers of the current device for iOS and the `{gps_adid}` would be replaced with the Google Advertising ID of the current device for Android. 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\n### \u003ca id=\"event-partner-params\"\u003e\u003c/a\u003eEvent partner parameters\n\nYou can also add parameters for integrations that have been activated in your Adjust dashboard that can be transmitted to network partners.\n\nThis works similarly to the callback parameters mentioned above but parameter name used for them is `partnerParameters`:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackEvent({\n    eventToken = \"abc123\",\n    partnerParameters = {\n        {\n            key = \"key\",\n            value = \"value\",\n        },\n        {\n            key = \"foo\",\n            value = \"bar\",\n        }\n    }\n})\n```\n\n### \u003ca id=\"user-attribution\"\u003e\u003c/a\u003eUser attribution\n\nEach recorded install is getting certain attribution assigned and also, during the app lifetime, the attribution can change.\n\n### \u003ca id=\"attribution-callback\"\u003e\u003c/a\u003eAttribution callback\n\nYou can register a callback to be notified of attribution changes. Due to the different sources considered for attribution, this information can not be provided synchronously. You can implement attribution callback like this:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\nlocal json = require \"json\"\n\n-- attribution callback needs to be set before calling initSdk method\nadjust.setAttributionCallback(function(event)\n    local json_attribution = json.decode(event.message)\n    print(\"Attribution changed!\")\n    print(\"Tracker token: \" .. (json_attribution.trackerToken or \"N/A\"))\n    print(\"Tracker name: \" .. (json_attribution.trackerName or \"N/A\"))\n    print(\"Campaign: \" .. (json_attribution.campaign or \"N/A\"))\n    print(\"Network: \" .. (json_attribution.network or \"N/A\"))\n    print(\"Creative: \" .. (json_attribution.creative or \"N/A\"))\n    print(\"Adgroup: \" .. (json_attribution.adgroup or \"N/A\"))\n    print(\"Cost type: \" .. (json_attribution.costType or \"N/A\"))\n    print(\"Cost amount: \" .. (json_attribution.costAmount or \"N/A\"))\n    print(\"Cost currency: \" .. (json_attribution.costCurrency or \"N/A\"))\n    print(\"FB install referrer: \" .. (json_attribution.fbInstallReferrer or \"N/A\"))\nend)\n\n-- ...\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\"\n})\n```\n\nThe callback function will get called when the SDK receives final attribution data. Within the callback function you have access to the `attribution` parameter. Here is a quick summary of its properties:\n\n- `trackerToken`        the tracker token of the current attribution\n- `trackerName`         the tracker name of the current attribution\n- `network`             the network grouping level of the current attribution\n- `campaign`            the campaign grouping level of the current attribution\n- `adgroup`             the ad group grouping level of the current attribution\n- `creative`            the creative grouping level of the current attribution\n- `clickLabel`          the click label of the current attribution\n- `costType`            the cost type, use `isCostDataInAttributionEnabled` to request this value\n- `costAmount`          the price, use `isCostDataInAttributionEnabled` to request this value\n- `costCurrency`        the currency used, use `isCostDataInAttributionEnabled` to request this value\n- `fbInstallReferrer`   the Facebook install referrer information\n\n### \u003ca id=\"attribution-getter\"\u003e\u003c/a\u003eGet user attribution\n\nIf you want to access information about a user's current attribution whenever you need it, you can make a call to the `getAttribution` method:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\nlocal json = require \"json\"\n\nadjust.getAttribution(function(event) \n    local json_attribution = json.decode(event.message)\n    print(\"Tracker token: \" .. (json_attribution.trackerToken or \"N/A\"))\n    print(\"Tracker name: \" .. (json_attribution.trackerName or \"N/A\"))\n    print(\"Campaign: \" .. (json_attribution.campaign or \"N/A\"))\n    print(\"Network: \" .. (json_attribution.network or \"N/A\"))\n    print(\"Creative: \" .. (json_attribution.creative or \"N/A\"))\n    print(\"Adgroup: \" .. (json_attribution.adgroup or \"N/A\"))\n    print(\"Cost type: \" .. (json_attribution.costType or \"N/A\"))\n    print(\"Cost amount: \" .. (json_attribution.costAmount or \"N/A\"))\n    print(\"Cost currency: \" .. (json_attribution.costCurrency or \"N/A\"))\n    print(\"FB install referrer: \" .. (json_attribution.fbInstallReferrer or \"N/A\"))\nend)\n```\n\n**Note**: Information about current attribution is available after app installation has been recorded by the Adjust backend and the attribution callback has been initially triggered. From that moment on, the Adjust SDK has information about a user's attribution 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 initialised and an attribution callback has been triggered.\n\n### \u003ca id=\"preinstalled-apps\"\u003e\u003c/a\u003ePreinstalled apps\n\nYou can use the Adjust SDK to record activity from apps that came preinstalled on a user’s device. This enables you to attribute these users to a custom defined campaign link instead to an organic one.\n\n### \u003ca id=\"preinstall-default-link\"\u003e\u003c/a\u003eDefault link token\n\nConfiguring a default link token enables you to attribute all preinstalls to a predefined Adjust link. Adjust records all information against this token until the attribution source changes. To set this up, first you need to [create a new campaign link in Campaign Lab](https://help.adjust.com/en/article/links). After doing this, you need to set `defaultTracker` parameter of the initialization map and pass a token you got generated for your campign link:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    defaultTracker = \"abc123\"\n})\n```\n\nIn case this approach is not applicable to your preinstall use case, please reach out to support@adjust.com to explore other ways of how the attribution for preinstalled apps can be handled.\n\n### \u003ca id=\"global-params\"\u003e\u003c/a\u003eGlobal parameters\n\nSome parameters are saved to be sent in every session, event, ad revenue and subscription request 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. These global parameters can be set before the Adjust SDK is launched to make sure they are sent even on install.\n\n### \u003ca id=\"global-callback-params\"\u003e\u003c/a\u003eGlobal callback parameters\n\nThe global callback parameters have a similar interface to the event callback parameters. Instead of adding the key and its value to an event, it's added through a call to `addGlobalCallbackParameter` method:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.addGlobalCallbackParameter(\"foo\", \"bar\")\n```\n\nThe global callback parameters will be merged with the callback parameters added to an event / ad revenue / subscription. The callback parameters added to any of these packages take precedence over the global callback parameters. Meaning that, when adding a callback parameter to any of these packages with the same key to one added globaly, the value that prevails is the callback parameter added any of these particular packages.\n\nIt's possible to remove a specific global callback parameter by passing the desired key to the `removeGlobalCallbackParameter` method:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.removeGlobalCallbackParameter(\"foo\")\n```\n\nIf you wish to remove all keys and values from the global callback parameters, you can remove them with the `removeGlobalCallbackParameters` method:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.removeGlobalCallbackParameters()\n```\n\n### \u003ca id=\"global-partner-params\"\u003e\u003c/a\u003eGlobal partner parameters\n\nIn the same way that there are [global callback parameters](#session-callback-params) that are sent for every event or session of the Adjust SDK, there are also global partner parameters.\n\nThese will be transmitted to network partners, for the integrations that have been activated in your Adjust [dashboard](https://dash.adjust.com).\n\nThe global partner parameters have a similar interface to the event / ad revenue / subscription partner parameters. Instead of adding the key and its value to an event, it's added through a call to the `addGlobalPartnerParameter` method:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.addGlobalPartnerParameter(\"foo\", \"bar\")\n```\n\nThe global partner parameters will be merged with the partner parameters added to an event / ad revenue / subscription. The partner parameters added to any of thes packages take precedence over the global partner parameters. Meaning that, when adding a partner parameter to any of these packages with the same key to one added globally, the value that prevails is the partner parameter added to any of these particular packages.\n\nIt's possible to remove a specific global partner parameter by passing the desired key to the `removeGlobalPartnerParameter` method:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.removeGlobalPartnerParameter(\"foo\")\n```\n\nIf you wish to remove all keys and values from the global partner parameters, you can remove them with the `removeGlobalPartnerParameters` method:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.removeGlobalPartnerParameters()\n```\n\n### \u003ca id=\"privacy-features\"\u003e\u003c/a\u003ePrivacy features\n\nThe Adjust SDK contains features that you can use to handle user privacy in your app.\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```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.gdprForgetMe()\n```\n\nUpon receiving this information, Adjust will erase the user's data and no requests from this device will be sent to Adjust in the future.\n\n### \u003ca id=\"third-party-sharing\"\u003e\u003c/a\u003eThird-party sharing for specific users\n\nYou can notify Adjust when a user disables, enables, and re-enables data sharing with third-party partners.\n\n### \u003ca id=\"disable-third-party-sharing\"\u003e\u003c/a\u003eDisable third-party sharing for specific users\n\nCall the following method to instruct the Adjust SDK to communicate the user's choice to disable data sharing to the Adjust backend:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackThirdPartySharing({\n    enabled = false,\n})\n```\n\nUpon receiving this information, Adjust will block the sharing of that specific user's data to partners and the Adjust SDK will continue to work as usual.\n\n### \u003ca id=\"enable-third-party-sharing\"\u003eEnable or re-enable third-party sharing for specific users\u003c/a\u003e\n\nCall the following method to instruct the Adjust SDK to communicate the user's choice to share data or change data sharing, to the Adjust backend:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackThirdPartySharing({\n    enabled = true,\n})\n```\n\nUpon receiving this information, Adjust changes sharing the specific user's data to partners. The Adjust SDK will continue to work as expected.\n\n### \u003ca id=\"send-granular-options\"\u003eSend granular options\u003c/a\u003e\n\nYou can attach granular information when a user updates their third-party sharing preferences. Use this information to communicate more detail about a user’s decision. To do this, set the `granularOptions` parameter like this:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackThirdPartySharing({\n    granularOptions = {\n        {\n            partnerName = \"PartnerName\",\n            key = \"key\",\n            value = \"value\",\n        },\n    },\n})\n```\n\nThe following partners are available:\n\n| Partner name              | String value                  |\n|---------------------------|-------------------------------|\n| AppleAds                  | `apple_ads`                   |\n| Facebook                  | `facebook`                    |\n| GoogleAds                 | `adwords`                     |\n| GoogleMarketingPlatform   | `google_marketing_platform`   |\n| Snapchat                  | `snapchat`                    |\n| Tencent                   | `tencent`                     |\n| TikTokSan                 | `tiktok_san`                  |\n| X (formerly Twitter)      | `twitter`                     |\n| YahooGemini               | `yahoo_gemini`                |\n| YahooJapanSearch          | `yahoo_japan_search`          |\n\n### \u003ca id=\"facebook-limited-data-use\"\u003eManage Facebook Limited Data Use\u003c/a\u003e\n\nFacebook provides a feature called Limited Data Use (LDU) to comply with the California Consumer Privacy Act (CCPA). This feature enables you to notify Facebook when a California-based user is opted out of the sale of data. You can also use it if you want to opt all users out by default.\n\nYou can update the Facebook LDU status by passing arguments to the `granularOptions` parameter.\n\n| Parameter                        | Description                                                                 |\n|----------------------------------|-----------------------------------------------------------------------------|\n| `partner_name`                   | Use `facebook` to toggle LDU.                                              |\n| `data_processing_options_country`| The country in which the user is located.                                  |\n|                                  | - `0`: Request that Facebook use geolocation.                              |\n|                                  | - `1`: United States of America.                                           |\n| `data_processing_options_state`  | Notifies Facebook in which state the user is located.                      |\n|                                  | - `0`: Request that Facebook use geolocation.                              |\n|                                  | - `1000`: California.                                                      |\n|                                  | - `1001`: Colorado.                                                        |\n|                                  | - `1002`: Connecticut.                                                     |\n\n\u003e Note: If you call this method with a 0 value for **either** `data_processing_options_country` or `data_processing_options_state`, the Adjust SDK passes **both** fields back as 0.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackThirdPartySharing({\n    granularOptions = {\n        {\n            partnerName = \"facebook\",\n            key = \"data_processing_options_country\",\n            value = \"1\",\n        },\n        {\n            partnerName = \"facebook\",\n            key = \"data_processing_options_state\",\n            value = \"1000\",\n        },\n    },\n})\n```\n\n### \u003ca id=\"digital-markets-act\"\u003eProvide consent data to Google (Digital Markets Act compliance)\u003c/a\u003e\n\n\u003e Important: Passing these options is required if you use Google Ads or Google Marketing Platform and have users located in the European Economic Area (EEA).\n\nTo comply with the EU’s Digital Markets Act (DMA), Google Ads and the Google Marketing Platform require explicit consent to receive Adjust’s attribution requests to their APIs. To communicate this consent, you need to add the following granular options to your third party sharing instance for the partner `google_dma`.\n\n| Key                 | Value               | Description                                                                                                      |\n|---------------------|---------------------|------------------------------------------------------------------------------------------------------------------|\n| `eea`               | `1` (positive) \\| `0` (negative) | Informs Adjust whether users installing the app are within the European Economic Area. Includes EU member states, Switzerland, Norway, Iceland, and Slovenia. |\n| `ad_personalization`| `1` (positive) \\| `0` (negative) | Informs Adjust whether users consented with being served personalized ads via Google Ads and/or Google Marketing Platform. This parameter also informs the `npa` parameter reserved for Google Marketing Platform. |\n| `ad_user_data`      | `1` (positive) \\| `0` (negative) | Informs Adjust whether users consented with their advertiser ID being leveraged for attribution purposes.         |\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackThirdPartySharing({\n    granularOptions = {\n        {\n            partnerName = \"google_dma\",\n            key = \"eea\",\n            value = \"1\",\n        },\n        {\n            partnerName = \"google_dma\",\n            key = \"ad_personalization\",\n            value = \"1\",\n        },\n        {\n            partnerName = \"google_dma\",\n            key = \"ad_user_data\",\n            value = \"1\",\n        },\n    },\n})\n```\n\n### \u003ca id=\"partner-sharing-settings\"\u003eUpdate partner sharing settings\u003c/a\u003e\n\nBy default, Adjust shares all metrics with any partners you’ve configured in your app settings. You can use the Adjust SDK to update your third party sharing settings on a per-partner basis. To do this, set the `partnerSharingSettings` parameter with the following arguments:\n\n| Argument     | Data type | Description                                                |\n|--------------|-----------|------------------------------------------------------------|\n| `partnerName`| string    | The name of the partner. [Download the full list of available partners](https://assets.ctfassets.net/5s247im0esyq/5WvsJ7J7fGFUlfsFeGdalj/643651619adc3256acac7885ec60624d/modules.csv). |\n| `key`        | string    | The metric to share with the partner.                      |\n| `value`      | bool   | The user’s decision.                                       |\n\nYou can use the `key` to specify which metrics you want to disable or re-enable. If you want to enable/disable sharing all metrics, you can use the `all` key. The full list of available metrics is available below:\n\n- `ad_revenue`\n- `all`\n- `attribution`\n- `update`\n- `att_update`\n- `cost_update`\n- `event`\n- `install`\n- `reattribution`\n- `reattribution_reinstall`\n- `reinstall`\n- `rejected_install`\n- `rejected_reattribution`\n- `sdk_click`\n- `sdk_info`\n- `session`\n- `subscription`\n- `uninstall`\n\nWhen you set a `false` value against a metric for a partner, Adjust stops sharing the metric with the partner.\n\n\u003e Tip: If you only want to share a few metrics with a partner, you can pass the `all` key with a `false` value to disable all sharing and then pass individual metrics with a `true` value to limit what you share.\n\nExamples:\n\nIf you want to stop sharing all metrics with a specific partner, pass the `all` key with a `false` value.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackThirdPartySharing({\n    partnerSharingSettings = {\n        {\n            partnerName = \"PartnerA\",\n            key = \"all\",\n            value = false\n        },\n    },\n})\n```\n\nTo re-enable sharing, pass the `all` key with a `true` value.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackThirdPartySharing({\n    partnerSharingSettings = {\n        {\n            partnerName = \"PartnerA\",\n            key = \"all\",\n            value = true\n        },\n    },\n})\n```\n\nYou can stop or start sharing specific metrics by calling the `addPartnerSharingSetting` method multiple times with different keys. For example, if you only want to share event information with a partner, you can pass:\n\n- `all` with a `false` value to disable sharing all information\n- `event` with a `true` value to enable event sharing\n\n\u003e Note: Specific keys always take priority over `all`. If you pass `all` with other keys, the individual key values override the `all` setting.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackThirdPartySharing({\n    partnerSharingSettings = {\n        {\n            partnerName = \"PartnerA\",\n            key = \"all\",\n            value = false\n        },\n        {\n            partnerName = \"PartnerA\",\n            key = \"event\",\n            value = true\n        },\n    },\n})\n```\n\n### \u003ca id=\"measurement-consent\"\u003e\u003c/a\u003eConsent measurement for specific users\n\nIf you’re using [Data Privacy settings](https://help.adjust.com/en/article/manage-data-collection-and-retention) in your Adjust dashboard, you need to set up the Adjust SDK to work with them. This includes settings such as consent expiry period and user data retention period.\n\nTo toggle this feature, call the `trackMeasurementConsent` method with the boolean parameter indicating whether consent measurement is enabled (`true`) or not (`false`).\n\nWhen enabled, the SDK communicates the data privacy settings to Adjust’s servers. Adjust’s servers then applies your data privacy rules to the user. The Adjust SDK continues to work as expected.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackMeasurementConsent(true)\n-- or\nadjust.trackMeasurementConsent(false)\n```\n\n### \u003ca id=\"coppa-compliance\"\u003e\u003c/a\u003eCOPPA compliance\n\nf you need your app to be compliant with the Children’s Online Privacy Protection Act (COPPA), set the `isCoppaComplianceEnabled` parameter on your initialization map. This performs the following actions:\n\n1. Disables third-party sharing **before** the user launches their first `session`.\n2. Prevents the SDK from reading device and advertising IDs (for example: `gps_adid`, `idfa`, and `android_id`).\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    isCoppaComplianceEnabled = true\n})\n```\n\n### \u003ca id=\"play-store-kids-apps\"\u003e\u003c/a\u003ePlay Store kids apps\n\nIf your app targets users under the age of 13, and the install region **isn’t** the USA, you need to mark it as a Kids App. This prevents the SDK from reading device and advertising IDs (for example: `idfa`, `gps_adid` and `android_id`).\n\nTo mark your app as a Play Store Kids App, set the `isPlayStoreKidsComplianceEnabled` parameter on your initialization map.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    isPlayStoreKidsComplianceEnabled = true\n})\n```\n\n### \u003ca id=\"url-strategies\"\u003e\u003c/a\u003eURL strategies\n\nThe URL strategy feature allows you to set either:\n\n- The country in which Adjust stores your data (data residency).\n- The endpoint to which the Adjust SDK sends traffic (URL strategy).\n\nThis is useful if you’re operating in a country with strict privacy requirements. When you set your URL strategy, Adjust stores data in the selected data residency region or sends traffic to the chosen domain.\n\nTo set your country of data residency, set the URL strategy parameters in your initialization map:\n\n- `urlStrategyDomains` (`list`): The country or countries of data residence, or the endpoints to which you want to send SDK traffic.\n- `useSubdomains` (`bool`): Whether the source should prefix a subdomain.\n- `isDataResidency` (`bool`): Whether the domain should be used for data residency.\n\n| URL strategy                | Main and fallback domain                           | Use sub domains | Is Data Residency |\n|-----------------------------|----------------------------------------------------|-----------------|-------------------|\n| EU data residency           | `{\"eu.adjust.com\"}`                                  | `true`          | `true`            |\n| Turkish data residency      | `{\"tr.adjust.com\"}`                                  | `true`          | `true`            |\n| US data residency           | `{\"us.adjust.com\"}`                                  | `true`          | `true`            |\n| China global URL strategy   | `{\"adjust.world\"`, `\"adjust.com\"}`                   | `true`          | `false`           |\n| China only URL strategy     | `{\"adjust.cn\"}`                                      | `true`          | `false`           |\n| India URL strategy          | `{\"adjust.net.in\"`, `\"adjust.com\"}`                  | `true`          | `false`           |\n\nExamples:\n\n```lua\n-- India URL strategy\nlocal adjust = require \"plugin.adjust\"\nadjust.initSdk({\n    appToken = \"2fm9gkqubvpc\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    -- URL strategy parameters below\n    urlStrategyDomains = { \"adjust.net.in\", \"adjust.com\" },\n    useSubdomains = true,\n    isDataResidency = false\n})\n```\n\n```lua\n-- China global URL strategy\nlocal adjust = require \"plugin.adjust\"\nadjust.initSdk({\n    appToken = \"2fm9gkqubvpc\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    -- URL strategy parameters below\n    urlStrategyDomains = { \"adjust.world\", \"adjust.com\" },\n    useSubdomains = true,\n    isDataResidency = false\n})\n```\n\n```lua\n-- China only URL strategy\nlocal adjust = require \"plugin.adjust\"\nadjust.initSdk({\n    appToken = \"2fm9gkqubvpc\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    -- URL strategy parameters below\n    urlStrategyDomains = { \"adjust.cn\" },\n    useSubdomains = true,\n    isDataResidency = false\n})\n```\n\n```lua\n-- EU data residency\nlocal adjust = require \"plugin.adjust\"\nadjust.initSdk({\n    appToken = \"2fm9gkqubvpc\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    -- URL strategy parameters below\n    urlStrategyDomains = { \"eu.adjust.com\" },\n    useSubdomains = true,\n    isDataResidency = true\n})\n```\n\n```lua\n-- US data residency\nlocal adjust = require \"plugin.adjust\"\nadjust.initSdk({\n    appToken = \"2fm9gkqubvpc\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    -- URL strategy parameters below\n    urlStrategyDomains = { \"us.adjust.com\" },\n    useSubdomains = true,\n    isDataResidency = true\n})\n```\n\n```lua\n-- Turkey data residency\nlocal adjust = require \"plugin.adjust\"\nadjust.initSdk({\n    appToken = \"2fm9gkqubvpc\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    -- URL strategy parameters below\n    urlStrategyDomains = { \"us.adjust.com\" },\n    useSubdomains = true,\n    isDataResidency = true\n})\n```\n\n### \u003ca id=\"deeplinking\"\u003e\u003c/a\u003eDeep linking\n\nIf you are using the Adjust campaign link 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. Hitting 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).\n\n### \u003ca id=\"deeplinking-deferred\"\u003e\u003c/a\u003eDeferred deep linking scenario\n\nWhile deferred deep linking is not supported out of the box on Android and iOS, our Adjust SDK makes it possible.\n\nIn order to get information about the URL content in a deferred deep linking scenario, you should set a callback method, which will receive one `string` parameter where the content of the URL will be delivered. You should set this method on the config object by calling the method `setDeferredDeeplinkCallback`:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\n-- make sure to set the callback before calling initSdk\nadjust.setDeferredDeeplinkCallback(function(event)\n    print(\"Deferred deep link: \" .. event.message)\nend)\n\n-- ...\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\"\n})\n```\n\nIn a deferred deep linking scenario, there is one additional setting which can be set in the initialization map. Once the Adjust SDK gets the deferred deep link information, you have the possibility to choose whether our SDK should open this URL or not. You can choose to set this option by setting the `isDeferredDeeplinkOpeningEnabled` parameter in the initialization map:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\n-- make sure to set the callback before calling initSdk\nadjust.setDeferredDeeplinkCallback(function(event)\n    print(\"Deferred deep link: \" .. event.message)\nend)\n\n-- ...\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    isDeferredDeeplinkOpeningEnabled = false\n})\n```\n\nIf nothing is set, **the Adjust SDK will always try to launch the URL by default**.\n\nTo enable your app to support deep linking, you should do some additional set up for each supported platform.\n\n### \u003ca id=\"deeplinking-reattribution\"\u003e\u003c/a\u003eReattribution via deep links\n\nAdjust enables you to run re-engagement campaigns through deep links.\n\nIf you are using this feature, in order for your user to be properly reattributed, you need to make one additional call to the Adjust SDK in your app.\n\nOnce you have received deep link content information in your app, add a call to the `processDeeplink` method. By making this call, the Adjust SDK will try to find if there is any new attribution information inside of the deep link. If there is any, it will be sent to the Adjust backend. If your user should be reattributed due to a click on the Adjust campaign link URL with deep link content, you will see the [attribution callback](#attribution-callback) in your app being triggered with new attribution info for this user.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjustDeeplink = {}\nadjustDeeplink.deeplink = \"your-deep-link\"\n\nadjust.processDeeplink(adjustDeeplink)\n```\n\n### \u003ca id=\"short-links-resolution\"\u003e\u003c/a\u003eResolve Adjust short links\n\nTo resolve an Adjust shortened deep link, invoke the `processAndResolveDeeplink` method with a callback function. The callback function receives the resolved deep link as a `string`.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjustDeeplink = {}\nadjustDeeplink.deeplink = \"your-deep-link\"\n\nadjust.processAndResolveDeeplink(adjustDeeplink, function(resolvedLink)\n    print(\"Resolved link: \" .. resolvedLink.message)\nend)\n```\n\n\u003e Note: If the link passed to the `processAndResolveDeeplink` method was shortened, the callback function receives the extended original link. Otherwise, the callback function receives the link you passed.\n\n### \u003ca id=\"last-deeplink-getter\"\u003e\u003c/a\u003eGet last processed deep link\n\nYou can get the last deep link URL processed by the `processDeeplink` or `processAndResolveDeepLink` method by calling the `getLastDeeplink` method. This method returns the last processed deep link as a string.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.getLastDeeplink(function(lastDeeplink)\n    print(\"Last deep link = \" .. lastDeeplink.message)\nend)\n```\n\n### \u003ca id=\"app-tracking-transparency\"\u003e\u003c/a\u003eApp Tracking Transparency\n\n\u003e Note: This feature exists only in iOS platform.\n\nIf you want to record the device’s ID for Advertisers (IDFA), you must display a prompt to get your user’s authorization. To do this, you need to include Apple’s App Tracking Transparency (ATT) framework in your app. The Adjust SDK stores the user’s authorization status and sends it to Adjust’s servers with each request.\n\nBelow, you can find the list of possible ATT status values:\n\n| Status                                    | Code | Description                                                          |\n|-------------------------------------------|------|----------------------------------------------------------------------|\n| `ATTrackingManagerAuthorizationStatusNotDetermined` | `0`  | The user hasn’t responded to the access prompt yet                   |\n| `ATTrackingManagerAuthorizationStatusRestricted`   | `1`  | Access to app-related data is blocked at the device level            |\n| `ATTrackingManagerAuthorizationStatusDenied`       | `2`  | The user has denied access to app-related data for device measurement |\n| `ATTrackingManagerAuthorizationStatusAuthorized`   | `3`  | The user has approved access to app-related data for device measurement |\n\n\u003e Note: You might receive a status code of -1 if the SDK is unable to retrieve the ATT (App Tracking Transparency) status.\n\n### \u003ca id=\"att-wrapper\"\u003e\u003c/a\u003eATT authorization wrapper\n\n**Note**: This feature exists only in iOS platform.\n\nThe Adjust SDK contains a wrapper around [Apple’s requestTrackingAuthorizationWithCompletionHandler: method](https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547037-requesttrackingauthorizationwith). You can use this wrapper if you don’t want to use the ATT prompt.\n\nThe callback method triggers when your user responds to the consent dialog. This method sends the user’s consent status code to Adjust’s servers. You can define responses to each status code within the callback function.\n\nYou must specify text content for the ATT. To do this, add your text to the `NSUserTrackingUsageDescription` key in your `Info.plist` file.\n\n\nYou can trigger ATT prompt via Adjust SDK wrapper method like this:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.requestAppTrackingAuthorization(function(status)\n    if status.message == 0 then\n        -- ATTrackingManagerAuthorizationStatusNotDetermined case\n    elseif status.message == 1 then\n        -- ATTrackingManagerAuthorizationStatusRestricted case\n    elseif status.message == 2 then\n        -- ATTrackingManagerAuthorizationStatusDenied case\n    elseif status.message == 3 then\n        -- ATTrackingManagerAuthorizationStatusAuthorized case\n    else\n        -- error case\n    end\nend)\n```\n\n### \u003ca id=\"att-status-getter\"\u003e\u003c/a\u003eGet current authorization status\n\nYou can retrieve a user’s current authorization status at any time. Call the `getAppTrackingAuthorizationStatus` method to return the authorization status code as an `integer`.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.getAppTrackingAuthorizationStatus(function(status)\n    print(\"Authorization status: \" .. status.message)\nend)\n```\n\n### \u003ca id=\"att-waiting-interval\"\u003e\u003c/a\u003eATT prompt waiting interval\n\nIf your app includes an onboarding process or a tutorial, you may want to delay sending your user’s ATT consent status until after the user has completed this process. To do this, you can set the `attConsentWaitingInterval` parameter of your initialization map to delay the sending of data for up to **360 seconds** to give the user time to complete the initial onboarding. After the timeout ends or the user sets their consent status, the SDK sends all information it has recorded during the delay to Adjust’s servers along with the user’s consent status.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    attConsentWaitingInterval = 30\n})\n```\n\n### \u003ca id=\"skan-framework\"\u003e\u003c/a\u003eSKAdNetwork and conversion values\n\n\u003e Important: This feature is only available on devices running iOS 14 and above.\n\nSKAdNetwork is Apple’s attribution framework for app install and reinstall attribution. The SKAdNetwork workflow goes like this:\n\n1. Apple gathers attribution information and notifies the relevant ad network.\n2. The network sends a postback with this information to Adjust.\n3. Adjust displays SKAdNetwork data in [Datascape](https://help.adjust.com/en/suite/article/datascape).\n\n### \u003ca id=\"skan-disable\"\u003e\u003c/a\u003eDisable SKAdNetwork communication\n\nThe Adjust SDK communicates with SKAdNetwork by default. The SDK registers for SKAdNetwork attribution upon initialization.\n\nYou can control this behavior by setting `isSkanAttributionEnabled` parameter of your initialization map:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    isSkanAttributionEnabled = false\n})\n```\n\n### \u003ca id=\"skan-update-callback\"\u003e\u003c/a\u003eListen for changes to conversion values\n\nIf you use Adjust to manage conversion values, the Adjust’s servers send conversion value updates to the SDK. You can set up a callback function to listen for these changes assigning a callback method for this on before you initialize the SDK:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\nlocal json = require \"json\"\n\n-- callback needs to be set before calling initSdk method\nadjust.setSkanUpdatedCallback(function(event)\n    local json_skan_updated = json.decode(event.message)\n    print(\"SKAN conversion value updated!\")\n    print(\"Conversion value: \" .. (json_skan_updated.conversionValue or \"N/A\"))\n    print(\"Coarse value: \" .. (json_skan_updated.coarseValue or \"N/A\"))\n    print(\"Lock window: \" .. (json_skan_updated.lockWindow or \"N/A\"))\n    print(\"Error: \" .. (json_skan_updated.error or \"N/A\"))\nend)\n\n-- ...\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\"\n})\n```\n\nThe callback function receives a postback from SKAdNetwork with the following properties:\n\n| Arguments      | Description                                                                                                                       |\n|----------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| `conversionValue`   | The conversion value sent by Adjust’s servers                                                                                    |\n| `coarseValue` | The coarse conversion value. This value is used if your app doesn’t have sufficient installs to reach the privacy threshold.      |\n|                | - `none`                                                                                                                         |\n|                | - `low`                                                                                                                          |\n|                | - `medium`                                                                                                                       |\n|                | - `high`                                                                                                                         |\n|                | Apple sends `none` whenever none of the conditions that are set for `low`, `medium`, and `high` were met.                        |\n| `lockWindow`  | Whether to send the postback before the conversion window ends. `true` indicates the postback will be sent before the window ends.   |\n|                | Defaults to `false` in SKAdNetwork 4.0 postbacks and `null` in older SKAdNetwork versions.                                             |\n| `error`        | Contains the error message if an error occurred.                                                                                 |\n\n### \u003ca id=\"skan-postbacks\"\u003e\u003c/a\u003eSet up direct install postbacks\n\n\u003e Note: Direct install postbacks contain only SKAdNetwork information. Information such as campaign data isn’t included in these postbacks.\n\nYou can configure your app to send a copy of winning SKAdNetwork callbacks to Adjust. This enables you to use SKAdNetwork information in your analytics.\n\nTo set up direct install postbacks, you need to add the Adjust callback URL to your `Info.plist` file:\n\n```xml\n\u003ckey\u003eNSAdvertisingAttributionReportEndpoint\u003c/key\u003e\n\u003cstring\u003ehttps://adjust-skadnetwork.com\u003c/string\u003e\n```\n\n\u003e See also: See Apple’s guide on [Configuring an Advertised App](https://developer.apple.com/documentation/storekit/skadnetwork/configuring_an_advertised_app) for more information.\n\n### \u003ca id=\"adrevenue-recording\"\u003e\u003c/a\u003eRecord ad revenue information\n\nYou can record ad revenue for [supported network partners](https://help.adjust.com/en/article/ad-revenue) using the Adjust SDK.\n\n\u003e Important: You need to perform some extra setup steps in your Adjust dashboard to measure ad revenue. Contact your Technical Account Manager or support@adjust.com to get started.\n\nTo send ad revenue information with the Adjust SDK, you need to instantiate an ad revenue map. This map contains variables that are sent to Adjust when ad revenue is recorded in your app.\n\nTo instantiate an ad revenue map, pass the following parameters:\n\n- source (`string`): The source of the ad revenue. See the table below for available sources.\n\n| Argument                     | Ad revenue Source       |\n|------------------------------|-------------------------|\n| `\"applovin_max_sdk\"`         | AppLovin MAX            |\n| `\"admob_sdk\"`                | AdMob                   |\n| `\"ironsource_sdk\"`           | ironSource              |\n| `\"admost_sdk\"`               | AdMost                  |\n| `\"unity_sdk\"`                | Unity                   |\n| `\"helium_chartboost_sdk\"`    | Helium Chartboost       |\n| `\"adx_sdk\"`                  | Ad(X)                   |\n| `\"tradplus_sdk\"`             | TradPlus                |\n| `\"topon_sdk\"`                | TopOn                   |\n| `\"publisher_sdk\"`            | Generic source          |\n\n### \u003ca id=\"adrevenue-amount\"\u003e\u003c/a\u003eAd revenue amount\n\nTo send the ad revenue amount, call the `setRevenue` method of your `AdjustAdRevenue` instance and pass the following arguments:\n\n- revenue (`integer`): The amount of revenue\n- currency (`string`): The 3 character [ISO 4217 code](https://www.iban.com/currency-codes) of your reporting currency\n\n\u003e See also: Check the [guide to recording purchases in different currencies](https://help.adjust.com/en/article/currency-conversion) for more information.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackAdRevenue({\n    source = \"applovin_max_sdk\",\n    revenue = 1.0,\n    currency = \"EUR\"\n})\n```\n\n### \u003ca id=\"adrevenue-network\"\u003e\u003c/a\u003eAd revenue network\n\nTo record the network associated with the ad revenue, assign `adRevenueNetwork` parameter in your ad revenue map with the network name.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackAdRevenue({\n    source = \"applovin_max_sdk\",\n    revenue = 1.0,\n    currency = \"EUR\",\n    adRevenueNetwork = \"network1\"\n})\n```\n\n### \u003ca id=\"adrevenue-unit\"\u003e\u003c/a\u003eAd revenue unit\n\nTo send the ad revenue unit, assign `adRevenueUnit` parameter of your ad revenue map with the unit value.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackAdRevenue({\n    source = \"applovin_max_sdk\",\n    revenue = 1.0,\n    currency = \"EUR\",\n    adRevenueUnit = \"unit1\"\n})\n```\n\n### \u003ca id=\"adrevenue-placement\"\u003e\u003c/a\u003eAd revenue placement\n\nTo send the ad revenue placement, assign `adRevenuePlacement` parameter of your ad revenue map with the placement value.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackAdRevenue({\n    source = \"applovin_max_sdk\",\n    revenue = 1.0,\n    currency = \"EUR\",\n    adRevenuePlacement = \"banner\"\n})\n```\n\n### \u003ca id=\"adrevenue-impressions\"\u003e\u003c/a\u003eAd impressions count\n\nTo send the number of recorded ad impressions, assign `adImpressionsCount` parameter of your ad revenue map with the number of ad impressions.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackAdRevenue({\n    source = \"applovin_max_sdk\",\n    revenue = 1.0,\n    currency = \"EUR\",\n    adImpressionsCount = 6\n})\n```\n\n### \u003ca id=\"adrevenue-callback-params\"\u003e\u003c/a\u003eAd revenue callback parameters\n\nSimilar to how one can set [event callback parameters](#event-callback-params), the same can be done for ad revenue:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackAdRevenue({\n    source = \"applovin_max_sdk\",\n    revenue = 1.0,\n    currency = \"EUR\",\n    callbackParameters = {\n        {\n            key = \"key\",\n            value = \"value\",\n        },\n        {\n            key = \"foo\",\n            value = \"bar\",\n        }\n    }\n})\n```\n\n### \u003ca id=\"adrevenue-partner-params\"\u003e\u003c/a\u003eAd revenue partner parameters\n\nSimilar to how one can set [event partner parameters](#event-partner-params), the same can be done for ad revenue:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackAdRevenue({\n    source = \"applovin_max_sdk\",\n    revenue = 1.0,\n    currency = \"EUR\",\n    partnerParameters = {\n        {\n            key = \"key\",\n            value = \"value\",\n        },\n        {\n            key = \"foo\",\n            value = \"bar\",\n        }\n    }\n})\n```\n\n### \u003ca id=\"purchase-verification\"\u003e\u003c/a\u003ePurchase verification\n\nIf you’ve enabled [purchase verification](https://help.adjust.com/en/article/purchase-verification), you can use the Adjust SDK to request App Store or Google Play Store purchase verification. There are two ways to verify purchases with the Adjust SDK.\n\n### \u003ca id=\"verify-and-record\"\u003e\u003c/a\u003eVerify purchase and record event\n\nWith this approach, you will be performing verification of your purchase and having an event recorded for that verification. This will give you an overview later in the dashboard on the events (and assigned revenue) based on whether verification was successful or not.\n\nIn order to do this, you need to complete your in-app purchase and then pass parameters that Adjust SDK needs out of that purchase in order to be able to try to verify the purchase. Once you have obtained the verification parameters the SDK needs, you can perform verification and recording of an event by calling `verifyAndTrackAppStorePurchase` or `verifyAndTrackPlayStorePurchase` methods.\n\nNext to revenue and currency of the purchase, you need to obtain the following parameters as well:\n\n- Product ID (for both, App Store and Play Store purchases)\n- Transaction ID (for App Store purchases)\n- Purchase token (for Play Store purchases)\n\n```lua\nlocal adjust = require \"plugin.adjust\"\nlocal json = require \"json\"\n\n-- perform App Store in-app purchase\n\n-- create an event with purchase parameters attached\nadjustEvent = {}\nadjustEvent.eventToken = \"abc123\"\nadjustEvent.revenue = 6.0\nadjustEvent.currency = \"EUR\"\nadjustEvent.transactionId = \"transaction-id\"\nadjustEvent.productId = \"product-id\"\n\n-- call verifyAndTrackAppStorePurchase method\nadjust.verifyAndTrackAppStorePurchase(adjustEvent, function(result)\n    local json_verification_result = json.decode(result.message)\n    print(\"Verification status: \" .. json_verification_result.verificationStatus)\n    print(\"Code: \" .. json_verification_result.code)\n    print(\"Message: \" .. json_verification_result.message)\nend)\n```\n\n```lua\nlocal adjust = require \"plugin.adjust\"\nlocal json = require \"json\"\n\n-- perform Play Store in-app purchase\n\n-- create an event with purchase parameters attached\nadjustEvent = {}\nadjustEvent.eventToken = \"abc123\"\nadjustEvent.revenue = 6.0\nadjustEvent.currency = \"EUR\"\nadjustEvent.productId = \"product-id\"\nadjustEvent.purchaseToken = \"purchase-token\"\n\n-- call verifyAndTrackPlayStorePurchase method\nadjust.verifyAndTrackPlayStorePurchase(adjustEvent, function(result)\n    local json_verification_result = json.decode(result.message)\n    print(\"Verification status: \" .. json_verification_result.verificationStatus)\n    print(\"Code: \" .. json_verification_result.code)\n    print(\"Message: \" .. json_verification_result.message)\nend)\n```\n\n### \u003ca id=\"verify-only\"\u003e\u003c/a\u003eVerify purchase only\n\nIn case you don't want to see revenue events being automatically recorded once you verify the purchase, but you are instead interested in just getting the information on the validity of the purchase, you can also perform only the verification of the purchase. For this, you need to invoke `verifyAppStorePurchase` and `verifyPlayStorePurchase` methods.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\nlocal json = require \"json\"\n\n-- perform App Store in-app purchase\n\n-- create a purchase map with purchase parameters attached\nadjustPurchase = {}\nadjustPurchase.transactionId = \"transaction-id\"\nadjustPurchase.productId = \"product-id\"\n\n-- call verifyAppStorePurchase method\nadjust.verifyAppStorePurchase(adjustPurchase, function(result)\n    local json_verification_result = json.decode(result.message)\n    print(\"Verification status: \" .. json_verification_result.verificationStatus)\n    print(\"Code: \" .. json_verification_result.code)\n    print(\"Message: \" .. json_verification_result.message)\nend)\n```\n\n```lua\nlocal adjust = require \"plugin.adjust\"\nlocal json = require \"json\"\n\n-- perform Play Store in-app purchase\n\n-- create a purchase map with purchase parameters attached\nadjustPurchase = {}\nadjustPurchase.productId = \"product-id\"\nadjustPurchase.purchaseToken = \"purchase-token\"\n\n-- call verifyPlayStorePurchase method\nadjust.verifyPlayStorePurchase(adjustPurchase, function(result)\n    local json_verification_result = json.decode(result.message)\n    print(\"Verification status: \" .. json_verification_result.verificationStatus)\n    print(\"Code: \" .. json_verification_result.code)\n    print(\"Message: \" .. json_verification_result.message)\nend)\n```\n\n### \u003ca id=\"subscription-sending\"\u003e\u003c/a\u003eSend subscription information\n\n\u003e Important: The following steps only set up subscription measurement within the Adjust SDK. To enable the feature, follow the steps at [Set up subscriptions for your app](https://help.adjust.com/en/article/set-up-subscriptions-for-your-app).\n\nYou can record App Store and Play Store subscriptions and verify their validity with the Adjust SDK. After the user purchases a subscription, create a subscription map containing the purchase details.\n\n```lua\n-- App Store subscription\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackAppStoreSubscription({\n    price = \"just-price-numeric-value-as-string\", -- for example \"0.99\" or \"6.00\"\n    currency = \"EUR\",\n    transactionId = \"transaction-id\"\n})\n```\n\n```lua\n-- Play Store subscription\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackPlayStoreSubscription({\n    price = \"price-numeric-value-in-micros-as-string\", -- for example \"0.99\" should be \"990000\"\n    currency = \"EUR\",\n    sku = \"product-sku\",\n    orderId = \"order-id\",\n    signature = \"signature\",\n    purchaseToken = \"purchase-token\"\n})\n```\n\nSubscription parameters for App Store subscription:\n\n- [price](https://developer.apple.com/documentation/storekit/product/price)\n- currency (you need to pass [currencyCode](https://developer.apple.com/documentation/foundation/nslocale/1642836-currencycode?language=objc))\n- [transactionId](https://developer.apple.com/documentation/storekit/skpaymenttransaction/1411288-transactionidentifier?language=objc)\n- [transactionDate](https://developer.apple.com/documentation/storekit/skpaymenttransaction/1411273-transactiondate?language=objc)\n- salesRegion (you need to pass [countryCode](https://developer.apple.com/documentation/foundation/nslocale/1643060-countrycode?language=objc) of the [priceLocale](https://developer.apple.com/documentation/storekit/skproduct/1506145-pricelocale?language=objc) object)\n\nSubscription parameters for Play Store subscription:\n\n- [price](https://developer.android.com/reference/com/android/billingclient/api/SkuDetails#getpriceamountmicros)\n- [currency](https://developer.android.com/reference/com/android/billingclient/api/SkuDetails#getpricecurrencycode)\n- [sku](https://developer.android.com/reference/com/android/billingclient/api/Purchase#getsku)\n- [orderId](https://developer.android.com/reference/com/android/billingclient/api/Purchase#getorderid)\n- [signature](https://developer.android.com/reference/com/android/billingclient/api/Purchase#getsignature)\n- [purchaseToken](https://developer.android.com/reference/com/android/billingclient/api/Purchase#getpurchasetoken)\n- [purchaseTime](https://developer.android.com/reference/com/android/billingclient/api/Purchase#getpurchasetime)\n\n\u003e Note: All the links behind the parameters are pointing to fields one needs to obtain from native iOS and Android in-app purchases API. In-app purchases on Solar2D / Corona platform are being done with usage of some plugins which are wrapping the native API and can therefore have these fields exposed under different names or, in bad case scenario, not provide some of these fields at all. In case you are having issues in understanding how to properly pass these fields based on what your Solar2D / Corona plugin is sending you back, feel free contact us about it.\n\n### \u003ca id=\"subscription-purchase-date\"\u003e\u003c/a\u003eSubscription purchase date\n\nYou can record the date on which the user purchased a subscription. The SDK returns this data for you to report on.\n\n```lua\n-- App Store subscription\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackAppStoreSubscription({\n    price = \"just-price-numeric-value-as-string\", -- for example \"0.99\" or \"6.00\"\n    currency = \"EUR\",\n    transactionId = \"transaction-id\",\n    transactionDate = \"unix-timestamp\"\n})\n```\n\n```lua\n-- Play Store subscription\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackPlayStoreSubscription({\n    price = \"price-numeric-value-in-micros-as-string\", -- for example \"0.99\" should be \"990000\"\n    currency = \"EUR\",\n    sku = \"product-sku\",\n    orderId = \"order-id\",\n    signature = \"signature\",\n    purchaseToken = \"purchase-token\",\n    purchaseDate = \"unix-timestamp\"\n})\n```\n\n### \u003ca id=\"subscription-region\"\u003e\u003c/a\u003eSubscription region\n\n\u003e Note: This is feature is iOS only.\n\nYou can record the region in which the user purchased a subscription. To do this, set the `salesRegion` method of your Apple App Store subscription map to the country code as a string. This needs to be formatted as the [countryCode](https://developer.apple.com/documentation/storekit/storefront/3792000-countrycode) of the [Storefront](https://developer.apple.com/documentation/storekit/storefront) object.\n\n```lua\n-- App Store subscription\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackAppStoreSubscription({\n    price = \"just-price-numeric-value-as-string\", -- for example \"0.99\" or \"6.00\"\n    currency = \"EUR\",\n    transactionId = \"transaction-id\",\n    salesRegion = \"sales-region\"\n})\n```\n\n### \u003ca id=\"subscription-callback-params\"\u003e\u003c/a\u003eSubscription callback parameters\n\nSimilar to how one can set [event callback parameters](#event-callback-params), the same can be done for subscriptions:\n\n```lua\n-- App Store subscription\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackAppStoreSubscription({\n    price = \"just-price-numeric-value-as-string\", -- for example \"0.99\" or \"6.00\"\n    currency = \"EUR\",\n    transactionId = \"transaction-id\",\n    callbackParameters = {\n        {\n            key = \"key\",\n            value = \"value\",\n        },\n        {\n            key = \"foo\",\n            value = \"bar\",\n        }\n    }\n})\n```\n\n### \u003ca id=\"subscription-partner-params\"\u003e\u003c/a\u003eSubscription partner parameters\n\nSimilar to how one can set [event partner parameters](#event-partner-params), the same can be done for subscriptions:\n\n```lua\n-- App Store subscription\nlocal adjust = require \"plugin.adjust\"\n\nadjust.trackAppStoreSubscription({\n    price = \"just-price-numeric-value-as-string\", -- for example \"0.99\" or \"6.00\"\n    currency = \"EUR\",\n    transactionId = \"transaction-id\",\n    partnerParameters = {\n        {\n            key = \"key\",\n            value = \"value\",\n        },\n        {\n            key = \"foo\",\n            value = \"bar\",\n        }\n    }\n})\n```\n\n### \u003ca id=\"device-ids\"\u003e\u003c/a\u003eDevice IDs\n\nThe Adjust SDK contains helper methods that return device information. Use these methods to add details to your callbacks and improve your reporting.\n\n### \u003ca id=\"idfa\"\u003e\u003c/a\u003eIDFA\n\nTo obtain the IDFA, call the `getIdfa` method:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.getIdfa(function(event)\n    print(\"IDFA: \" .. (event.message or \"N/A\"))\nend)\n```\n\n### \u003ca id=\"idfv\"\u003e\u003c/a\u003eIDFV\n\nTo obtain the IDFV, call the `getIdfv` method:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.getIdfv(function(event)\n    print(\"IDFV: \" .. (event.message or \"N/A\"))\nend)\n```\n\n### \u003ca id=\"gps-adid\"\u003e\u003c/a\u003eGoogle advertising identifier\n\nTo obtain Google advertising ID, call the `getGoogleAdId` method:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.getGoogleAdId(function(event)\n    print(\"Google Advertising ID: \" .. (event.message or \"N/A\"))\nend)\n```\n\n### \u003ca id=\"fire-adid\"\u003e\u003c/a\u003eAmazon advertising identifier\n\nIf you need to obtain the Amazon advertising ID, you can call the `getAmazonAdId` method:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.getAmazonAdId(function(event)\n    print(\"Amazon Advertising ID: \" .. (event.message or \"N/A\"))\nend)\n```\n\n### \u003ca id=\"adid\"\u003e\u003c/a\u003eAdjust device identifier\n\nFor every 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 `getAdid` method:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.getAdid(function(event)\n    print(\"Adjust ID: \" .. (event.message or \"N/A\"))\nend)\n```\n\n**Note**: Information about the **adid** is available after app installation has been recorded 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 initialised and installation of your app has been successfully recorded.\n\n### \u003ca id=\"session-event-callbacks\"\u003e\u003c/a\u003eSession and event callbacks\n\nYou can register a callback to be notified of successful and failed recorded events and/or sessions.\n\nFollow the same steps to implement the callback for successfully recorded events:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\n-- make sure to set callback before calling initSdk method\nadjust.setEventSuccessCallback(function(event)\n    local json_event_success = json.decode(event.message)\n    print(\"Event tracking success!\")\n    print(\"Event token: \" .. (json_event_success.eventToken or \"N/A\"))\n    print(\"Message: \" .. (json_event_success.message or \"N/A\"))\n    print(\"Timestamp: \" .. (json_event_success.timestamp or \"N/A\"))\n    print(\"Adid: \" .. (json_event_success.adid or \"N/A\"))\n    print(\"JSON response: \" .. (json.encode(json_event_success.jsonResponse) or \"N/A\"))\nend)\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\"\n})\n```\n\nThe callback function for failed recorded events:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\n-- make sure to set callback before calling initSdk method\nadjust.setEventFailureCallback(function(event)\n    local json_event_failure = json.decode(event.message)\n    print(\"Event tracking failure!\")\n    print(\"Event token: \" .. (json_event_failure.eventToken or \"N/A\"))\n    print(\"Message: \" .. (json_event_failure.message or \"N/A\"))\n    print(\"Timestamp: \" .. (json_event_failure.timestamp or \"N/A\"))\n    print(\"Adid: \" .. (json_event_failure.adid or \"N/A\"))\n    print(\"Will retry: \" .. (json_event_failure.willRetry or \"N/A\"))\n    print(\"JSON response: \" .. (json.encode(json_event_failure.jsonResponse) or \"N/A\"))\nend)\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\"\n})\n```\n\nFor successfully recorded sessions:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\n-- make sure to set callback before calling initSdk method\nadjust.setSessionSuccessCallback(function(event)\n    local json_session_success = json.decode(event.message)\n    print(\"Session tracking success!\")\n    print(\"Message: \" .. (json_session_success.message or \"N/A\"))\n    print(\"Timestamp: \" .. (json_session_success.timestamp or \"N/A\"))\n    print(\"Adid: \" .. (json_session_success.adid or \"N/A\"))\n    print(\"JSON response: \" .. (json.encode(json_session_success.jsonResponse) or \"N/A\"))\nend)\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\"\n})\n```\n\nAnd for failed recorded sessions:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\n-- make sure to set callback before calling initSdk method\nadjust.setSessionFailureCallback(function(event)\n    local json_session_failure = json.decode(event.message)\n    print(\"Session tracking failure!\")\n    print(\"Message: \" .. (json_session_failure.message or \"N/A\"))\n    print(\"Timestamp: \" .. (json_session_failure.timestamp or \"N/A\"))\n    print(\"Adid: \" .. (json_session_failure.adid or \"N/A\"))\n    print(\"Will retry: \" .. (json_session_failure.willRetry or \"N/A\"))\n    print(\"JSON response: \" .. (json.encode(json_session_failure.jsonResponse) or \"N/A\"))\nend)\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\"\n})\n```\n\nThe callback functions will be called after the SDK tries to send a package to the server. Within the callback, you have access to a response data object specifically for the callback. Here is a quick summary of the session response data properties:\n\n- `message` the message from the server or the error logged by the SDK.\n- `timestamp` timestamp from the server.\n- `adid` a unique device identifier provided by Adjust.\n- `jsonResponse` the JSON string with the response from the server.\n\nBoth event response data objects contain:\n\n- `eventToken` the event token, if the package recorded was an event.\n- `callbackId` the custom defined callback ID set on event object.\n\nAnd both event and session failed objects also contain:\n\n- `willRetry` indicates there will be an attempt to resend the package at a later time.\n\n### \u003ca id=\"disable-sdk\"\u003e\u003c/a\u003eDisable the SDK\n\nYou can disable the Adjust SDK from recording any activity by invoking the `disable` method. This setting is **remembered between sessions**.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.disable()\n```\n\nYou can verify if the Adjust SDK is currently active with the `isEnabled` method. It is always possible to activate the Adjust SDK by invoking `enable` method.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.enable()\n```\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 still retaining recorded 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 the `switchToOfflineMode` method.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.switchToOfflineMode()\n```\n\nConversely, you can deactivate the offline mode by calling `switchBackToOnlineMode` method. When the Adjust SDK is put back in online mode, all saved information is sent to our servers with the correct timestamps.\n\nUnlike disabling the SDK, 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=\"background-sending\"\u003e\u003c/a\u003eSending from background \n\nThe default behaviour of the Adjust SDK is to **pause sending HTTP requests while the app is in the background**. You can change this in your initialization map by assigning the `isSendingInBackgroundEnabled` parameter:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    isSendingInBackgroundEnabled = true\n})\n```\n\nIf nothing is set, sending in background is **disabled by default**.\n\n### \u003ca id=\"external-device-id\"\u003e\u003c/a\u003eSet external device ID\n\n\u003e **Note** If you want to use external device IDs, please contact your Adjust representative. They will talk you through the best approach for your use case.\n\nAn external device identifier is a custom value that you can assign to a device or user. They can help you to recognize users across sessions and platforms. They can also help you to deduplicate installs by user so that a user isn't counted as multiple new installs.\n\nYou can also use an external device ID as a custom identifier for a device. This can be useful if you use these identifiers elsewhere and want to keep continuity.\n\nCheck out our [external device identifiers article](https://help.adjust.com/en/article/external-device-identifiers) for more information.\n\nTo set an external device ID, assign the identifier to the `externalDeviceId` parameter of your initialization map.\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    externalDeviceId = \"unique-id-for-each-user\"\n})\n```\n\n\u003e **Important**: You need to make sure this ID is **unique to the user or device** depending on your use-case. Using the same ID across different users or devices could lead to duplicated data. Talk to your Adjust representative for more information.\n\nIf you want to use the external device ID in your business analytics, you can pass it as a session callback parameter. See the section on [session callback parameters](#session-callback-params) for more information.\n\nYou can import existing external device IDs into Adjust. This ensures that the backend matches future data to your existing device records. If you want to do this, please contact your Adjust representative.\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 **whenever you get your token in the app or when it gets updated**:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.setPushToken(\"push-notifications-token\")\n```\n\nPush tokens are used for Audience Builder and client callbacks, and they are required for the uninstall detection feature.\n\n### \u003ca id=\"disable-ad-services\"\u003e\u003c/a\u003eDisable AdServices information reading\n\n\u003e Note: This is iOS only feature.\n\nThe SDK is enabled by default to try to communicate with `AdServices.framework` on iOS in order to try to obtain attribution token which is later being used for handling Apple Search Ads attribution. In case you would not like Adjust to show information from Apple Search Ads campaigns, you can disable this in the SDK by assigning `isSkanAttributionEnabled` parameter of your initialization map:\n\n```lua\nlocal adjust = require \"plugin.adjust\"\n\nadjust.initSdk({\n    appToken = \"{YourAppToken}\",\n    environment = \"SANDBOX\",\n    logLevel = \"VERBOSE\",\n    isSkanAttributionEnabled = false\n})\n```\n\n## \u003ca id=\"license\"\u003e\u003c/a\u003eLicense\n\nThe Adjust SDK is licensed under the MIT License.\n\nCopyright (c) 2017-Present Adjust GmbH, http://www.adjust.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fcorona_sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadjust%2Fcorona_sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fcorona_sdk/lists"}