### Complete Channel Setup Example Source: https://dev.adjust.com/en/api/app-automation-api/channel-setup This example demonstrates how to configure channel setup for multiple partners in a single request. ```APIDOC ## POST /app-automation/app ### Description Sets up or updates channel configurations for an application. ### Method POST ### Endpoint https://automate.adjust.com/app-automation/app ### Request Body - **name** (string) - Required - The name of the app. - **bundle_id** (string) - Required - The bundle ID of the app. - **store_id** (string) - Required - The store ID of the app. - **platform** (string) - Required - The platform of the app (e.g., "android", "ios"). - **channel_setup** (object) - Optional - An object containing channel-specific configurations. - **applovin** (object) - Optional - AppLovin configuration. - **sdk_keys** (array of strings) - Required - List of SDK keys. - **chartboost** (object) - Optional - Chartboost configuration. - **app_id** (string) - Required - Chartboost App ID. - **token** (string) - Required - Chartboost App Signature. - **facebook** (object) - Optional - Facebook configuration. - **app_id** (string) - Required - Facebook App ID. - **adimpression_forwarding** (boolean) - Optional - Whether to forward ad impressions. - **gameanalytics** (object) - Optional - GameAnalytics configuration. - **key** (string) - Required - GameAnalytics unique key. - **google** (object) - Optional - Google Ads configuration. - **link_id** (string) - Required - Google Ads Link ID. - **inmobi** (object) - Optional - InMobi configuration. - **property_id** (string) - Required - InMobi Property ID. - **advertiser_id** (string) - Required - InMobi Advertiser ID. - **ironsource** (object) - Optional - ironSource configuration. - **advertiser_id** (string) - Required - ironSource Advertiser ID. - **password** (string) - Required - ironSource password. - **mintegral** (object) - Optional - Mintegral configuration. - **enabled** (boolean) - Optional - Whether Mintegral is enabled. - **snapchat** (object) - Optional - Snapchat configuration. - **snap_app_id** (string) - Required - Snapchat App ID. - **tapjoy** (object) - Optional - Tapjoy configuration. - **app_id** (string) - Required - Tapjoy App ID. - **tiktok** (object) - Optional - TikTok configuration. - **app_id** (string) - Required - TikTok App ID. - **enabled** (boolean) - Optional - Whether TikTok is enabled. - **unityads** (object) - Optional - Unity Ads configuration. - **game_id** (string) - Required - Unity Ads Game ID. - **vungle** (object) - Optional - Vungle configuration. - **app_id** (string) - Required - Vungle App ID. - **force_update** (boolean) - Optional - If true, overwrites existing channel setup. ### Request Example { "name": "My App", "bundle_id": "com.example.myapp", "store_id": "com.example.myapp", "platform": "android", "channel_setup": { "applovin": { "sdk_keys": ["sdk_key_1", "sdk_key_2"] }, "chartboost": { "app_id": "chartboost_app_id", "token": "app_signature" }, "facebook": { "app_id": "123456789", "adimpression_forwarding": true }, "gameanalytics": { "key": "unique_game_key" }, "google": { "link_id": "adwords_link_id" }, "inmobi": { "property_id": "inmobi_property_id", "advertiser_id": "advertiser_id" }, "ironsource": { "advertiser_id": "6734", "password": "abc123" }, "mintegral": { "enabled": true }, "snapchat": { "snap_app_id": "snapchat_app_id" }, "tapjoy": { "app_id": "tapjoy_app_id" }, "tiktok": { "app_id": "5464534", "enabled": true }, "unityads": { "game_id": "unity_game_id" }, "vungle": { "app_id": "vungle_app_id" } } } ``` -------------------------------- ### Single Partner Setup Source: https://dev.adjust.com/en/api/app-automation-api/channel-setup This example shows how to configure only one partner's channel setup. ```APIDOC ## POST /app-automation/app ### Description Sets up or updates channel configurations for an application, focusing on a single partner. ### Method POST ### Endpoint https://automate.adjust.com/app-automation/app ### Request Body - **name** (string) - Required - The name of the app. - **bundle_id** (string) - Required - The bundle ID of the app. - **store_id** (string) - Required - The store ID of the app. - **platform** (string) - Required - The platform of the app (e.g., "android", "ios"). - **channel_setup** (object) - Required - An object containing channel-specific configurations. - **facebook** (object) - Required - Facebook configuration. - **app_id** (string) - Required - Facebook App ID. ### Request Example { "name": "My App", "bundle_id": "com.example.myapp", "store_id": "com.example.myapp", "platform": "android", "channel_setup": { "facebook": { "app_id": "987654321" } } } ``` -------------------------------- ### Initial MainActivity.java Setup Source: https://dev.adjust.com/en/sdk/adobe-extension/android/global-parameters This is the initial setup for your MainActivity.java file if you followed the integration guide. It includes necessary imports and the onCreate method to process deep links. ```java import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import androidx.appcompat.app.AppCompatActivity; import com.adjust.sdk.Adjust; import com.adjust.sdk.AdjustDeeplink; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Intent intent = getIntent(); Uri data = intent.getData(); AdjustDeeplink adjustDeeplink = new AdjustDeeplink(data); Adjust.processDeeplink(adjustDeeplink, getApplicationContext()); } } ``` -------------------------------- ### Update Channel Setup for Existing App Source: https://dev.adjust.com/en/api/app-automation-api/channel-setup This example demonstrates how to add or update channel setup for an existing app by using the `force_update` flag. ```APIDOC ## POST /app-automation/app ### Description Updates the channel setup for an existing app. Setting `force_update` to `true` will overwrite any existing channel configurations with the new ones provided. ### Method POST ### Endpoint https://automate.adjust.com/app-automation/app ### Request Body - **name** (string) - Required - The name of the app. - **bundle_id** (string) - Required - The bundle ID of the app. - **store_id** (string) - Required - The store ID of the app. - **platform** (string) - Required - The platform of the app (e.g., "android", "ios"). - **force_update** (boolean) - Required - Set to `true` to overwrite existing channel setup. - **channel_setup** (object) - Required - An object containing the channel configurations to update. - **google** (object) - Optional - Google Ads configuration. - **link_id** (string) - Required - Google Ads Link ID. - **facebook** (object) - Optional - Facebook configuration. - **app_id** (string) - Required - Facebook App ID. ### Request Example { "name": "My App", "bundle_id": "com.example.myapp", "store_id": "com.example.myapp", "platform": "android", "force_update": true, "channel_setup": { "google": { "link_id": "new_google_link_id" }, "facebook": { "app_id": "updated_facebook_id" } } } ``` -------------------------------- ### Complete Channel Setup Example Source: https://dev.adjust.com/en/api/app-automation-api/channel-setup Use this to set up channel integrations for multiple partners in a single request. Ensure your API token is correctly formatted. ```curl curl --location 'https://automate.adjust.com/app-automation/app' \ --header 'Authorization: Bearer {your-adjust-api-token}' \ --header 'Content-Type: application/json' \ --data '{ \ "name": "My App", \ "bundle_id": "com.example.myapp", \ "store_id": "com.example.myapp", \ "platform": "android", \ "channel_setup": { \ "applovin": { \ "sdk_keys": ["sdk_key_1", "sdk_key_2"] \ }, \ "chartboost": { \ "app_id": "chartboost_app_id", \ "token": "app_signature" \ }, \ "facebook": { \ "app_id": "123456789", \ "adimpression_forwarding": true \ }, \ "gameanalytics": { \ "key": "unique_game_key" \ }, \ "google": { \ "link_id": "adwords_link_id" \ }, \ "inmobi": { \ "property_id": "inmobi_property_id", \ "advertiser_id": "advertiser_id" \ }, \ "ironsource": { \ "advertiser_id": "6734", \ "password": "abc123" \ }, \ "mintegral": { \ "enabled": true \ }, \ "snapchat": { \ "snap_app_id": "snapchat_app_id" \ }, \ "tapjoy": { \ "app_id": "tapjoy_app_id" \ }, \ "tiktok": { \ "app_id": "5464534", \ "enabled": true \ }, \ "unityads": { \ "game_id": "unity_game_id" \ }, \ "vungle": { \ "app_id": "vungle_app_id" \ } \ } \ }' ``` -------------------------------- ### Complete Ad Revenue Object Setup Source: https://dev.adjust.com/en/sdk/ios/features/ad-revenue This example demonstrates setting multiple properties for an ad revenue object, including source, revenue amount, currency, impressions, network, unit, placement, and custom callback/partner parameters. ```swift guard let adRevenue = ADJAdRevenue(source: "applovin_max_sdk") else { return } adRevenue.setRevenue(1, currency: "EUR") adRevenue.setAdImpressionsCount(10) adRevenue.setAdRevenueNetwork("network1") adRevenue.setAdRevenueUnit("unit1") adRevenue.setAdRevenuePlacement("banner") adRevenue.addCallbackParameter("key1", value: "value1") adRevenue.addPartnerParameter("key2", value: "value2") Adjust.trackAdRevenue(adRevenue) ``` ```objectivec ADJAdRevenue *adRevenue = [[ADJAdRevenue alloc] initWithSource:@"applovin_max_sdk"]; [adRevenue setRevenue:1 currency:@"EUR"]; [adRevenue setAdImpressionsCount:10]; [adRevenue setAdRevenueNetwork:@"network1"]; [adRevenue setAdRevenueUnit:@"unit1"]; [adRevenue setAdRevenuePlacement:@"banner"]; [adRevenue addCallbackParameter:@"key1" value:@"value1"]; [adRevenue addPartnerParameter:@"key2" value:@"value2"]; [Adjust trackAdRevenue:adRevenue]; ``` -------------------------------- ### Example Filter: Metrics Source: https://dev.adjust.com/en/api/rs-api/pivot Select specific KPIs to include in your report by providing a comma-separated list of metric names. This example requests cost, installs, and network ECPI. ```http metrics=cost,installs,ecpi_network ``` -------------------------------- ### Install SDK with Yarn Source: https://dev.adjust.com/en/sdk/smart-banner Install the Smart Banner SDK using Yarn. ```bash $ yarn add @adjustcom/smart-banner-sdk ``` -------------------------------- ### Install SDK with npm Source: https://dev.adjust.com/en/sdk/smart-banner Install the Smart Banner SDK using npm. ```bash $ npm install --save @adjustcom/smart-banner-sdk ``` -------------------------------- ### Record Revenue Events via GET Request Source: https://dev.adjust.com/en/api/s2s-api/events This example shows how to record revenue events using a GET request. Include revenue, currency, and optionally environment parameters. ```curl 1 curl \ 2 -H "Authorization: Bearer ADD_YOUR_AUTH_TOKEN_HERE" \ 3 "https://s2s.adjust.com/event?s2s=1&event_token=f0ob4r&app_token=4w565xzmb54d&idfa=D2CADB5F-410F-4963-AC0C-2A78534BDF1E&created_at=2017-01-02T15%3A04%3A05Z%2B0200&callback_params=%7B%22f0o%22%3A%22bar%22%2C%20%22bar%22%3A%22baz%22%7D&partner_params=%7B%22f0o%22%3A%22bar%22%2C%20%22bar%22%3A%22baz%22%7D¤cy=EUR&revenue=123.4&environment=sandbox" ``` -------------------------------- ### Install SDK with pnpm Source: https://dev.adjust.com/en/sdk/smart-banner Install the Smart Banner SDK using pnpm. ```bash $ pnpm add @adjustcom/smart-banner-sdk ``` -------------------------------- ### Example: Track Simple Event (Java) Source: https://dev.adjust.com/en/sdk/android/features/events This example shows how to record an event with a specific token when a user interacts with a button. ```java public void onTrackSimpleEventClick(View v) { AdjustEvent event = new AdjustEvent("g3mfiw"); Adjust.trackEvent(event); } ``` -------------------------------- ### Instantiate AdjustPlayStoreSubscription Source: https://dev.adjust.com/en/sdk/android/features/subscriptions To get started, you need to instantiate a subscription object containing details of the subscription purchase. Pass the price, currency, SKU, order ID, signature, and purchase token to the constructor. ```APIDOC ## Instantiate AdjustPlayStoreSubscription ### Description Instantiate an `AdjustPlayStoreSubscription` object with the following details: ### Parameters #### Constructor Parameters - **price** (long) - The price of the subscription. - **currency** (String) - The currency of the subscription. - **sku** (String) - The ID of the product. - **orderId** (String) - Your ID for the transaction. - **signature** (String) - The signature of the purchase data. - **purchaseToken** (String) - The unique token of the transaction. ### Request Example (Kotlin) ```kotlin val subscription = AdjustPlayStoreSubscription( price, currency, sku, orderId, signature, purchaseToken ) ``` ### Request Example (Java) ```java AdjustPlayStoreSubscription subscription = new AdjustPlayStoreSubscription( price, currency, sku, orderId, signature, purchaseToken ); ``` ``` -------------------------------- ### Initialize View Controller with Adjust SDK Source: https://dev.adjust.com/en/sdk/adobe-extension/ios/global-parameters This is a basic View Controller setup in Swift, including necessary imports for AEPCore and AdjustAdobeExtension. It serves as a starting point for integrating Adjust functionalities. ```swift import AEPCore import AdjustAdobeExtension class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } } ``` -------------------------------- ### Example: Track Simple Event (Kotlin) Source: https://dev.adjust.com/en/sdk/android/features/events This example shows how to record an event with a specific token when a user interacts with a button. ```kotlin fun onTrackSimpleEventClick(v: View) { val event = AdjustEvent("g3mfiw") Adjust.trackEvent(event) } ``` -------------------------------- ### Example Event Rules Configuration Source: https://dev.adjust.com/en/api/app-automation-api/events-endpoint An example demonstrating how to configure `flow_check` and `source_check` rules within the `event_rules` object. ```APIDOC ```json { "event_rules": { "flow_check": { "status": "live", "template_type": "post_install_activity", "settings": { "action": "reject_event", "pre_conditions": [ { "event_token__in": ["<{event_token}>"] } ], "conditions": [ { "time_since_install__gt": "2m", "time_since_event_103scx__gte": "0s", "callback_parameters__contain_all": ["test"] } ] } }, "source_check": { "status": "live", "template_type": "post_install_activity", "settings": { "action": "reject_event", "pre_conditions": [ { "event_token__in": ["<{event_token}>"] } ], "conditions": [ { "source__in": ["s2s"], "check_s2s_ip_address": true } ] } } } } ``` ``` -------------------------------- ### Example Callback URL with Parameters Source: https://dev.adjust.com/en/sdk/flutter/features/events An example of a callback URL with appended parameters, demonstrating how Adjust SDK sends data to your servers. ```url 1 https://www.mydomain.com/callback?key=value&foo=bar ``` -------------------------------- ### Create an iOS App with Channel Setup Source: https://dev.adjust.com/en/api/app-automation-api/app-endpoint This cURL example demonstrates creating an iOS app and configuring channel-specific settings, such as Facebook and Google parameters. Replace the placeholder token with your valid Adjust API token. ```curl curl --location 'https://automate.adjust.com/app-automation/app' \ --header 'Authorization: Bearer {your-adjust-api-token}' \ --header 'Content-Type: application/json' \ --data '{ "name": "My iOS App", "bundle_id": "com.example.myiosapp", "store_id": "123456789", "platform": "ios", "channel_setup": { "facebook": { "app_id": "987654321" }, "google": { "link_id": "google_link_123" } } }' ``` ```json { "adjust_app_token": "xyz789abc", "name": "My iOS App", "bundle_id": "com.example.myiosapp", "store_id": "123456789", "ticket_token": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "sk_app_id": "86372991152" } ``` -------------------------------- ### Example: Record an event on button click Source: https://dev.adjust.com/en/sdk/cordova/features/events This example demonstrates how to record an event with a specific token when a user interacts with a button. ```APIDOC ### Example This example shows how to record an event with the token _`g3mfiw`_whenever a user interacts with a button. ```javascript var app = { // Application Constructor initialize: function () { this.bindEvents(); }, // Bind Event Listeners bindEvents: function () { document.addEventListener("deviceready", this.onDeviceReady, false); }, onDeviceReady: function () { app.receivedEvent("deviceready"); var adjustConfig = new AdjustConfig( "YourAppToken", AdjustConfig.EnvironmentSandbox, ); Adjust.initSdk(adjustConfig); }, receivedEvent: function (id) { console.log("Received Event: " + id); var btnRecordSimpleEvent = document.getElementById( "btnRecordSimpleEvent", ); btnRecordSimpleEvent.addEventListener( "click", function () { var adjustEvent = new AdjustEvent("g3mfiw"); Adjust.trackEvent(adjustEvent); }, false, ); }, }; app.initialize(); ``` ``` -------------------------------- ### Example Usage Source: https://dev.adjust.com/en/api/deep-link-generator-api/qr-codes Example of how to generate a QR code using the Byte Stream endpoint with custom parameters. ```APIDOC ## Example ```bash curl -o $HOME/Downloads/png_custom_test.png --location https://automate.adjust.com/engage/qr-code/stream \ --header 'Authorization: Bearer adjustApiToken' \ --header 'Content-Type: application/json' \ --data '{ "data": { "link_token": "1k4hnyz7", "redirect": "https://youtu.be/AyOqGRjVtls", "fallback": "https://youtu.be/AyOqGRjVtls", "deeplink_path": "/custom-path" }, "qr_code_params": { "file_type": "png", "error_correction": "quartile", "box_size": 12, "border": 2, "fill_color": "rgb(42,208,251)", "back_color": "rgb(255,255,255)", "style": {"name": "rounded"}, "logo_url": "https://apptrace.com/api/app/com.adjust.insights/artwork_url_512", "logo_background_color": "rgb(42,208,251)" } }' ``` ``` -------------------------------- ### Viewing Channel Setup Source: https://dev.adjust.com/en/api/app-automation-api/channel-setup This section describes how to retrieve the current channel setup for an app. ```APIDOC ## GET /app/{app_token} ### Description Retrieves the details of a specific app, including its channel setup configuration. ### Method GET ### Endpoint /app/{app_token} ### Parameters #### Path Parameters - **app_token** (string) - Required - The unique token of the app. ### Response #### Success Response (200) - **name** (string) - The name of the app. - **store_id** (string) - The store ID of the app. - **platform** (string) - The platform of the app. - **adjust_app_token** (string) - The Adjust-generated app token. - **channel_setup** (object) - An object containing the configured channel setups. - **facebook** (object) - Facebook configuration. - **app_id** (string) - Facebook App ID. - **google** (object) - Google Ads configuration. - **link_id** (string) - Google Ads Link ID. - **snapchat** (object) - Snapchat configuration. - **snap_app_id** (string) - Snapchat App ID. ### Response Example { "name": "My App", "store_id": "com.example.myapp", "platform": "android", "adjust_app_token": "abc123xyz", "channel_setup": { "facebook": { "app_id": "123456789" }, "google": { "link_id": "adwords_link_id" }, "snapchat": { "snap_app_id": "snapchat_app_id" } } } ``` -------------------------------- ### Set External Device Identifier Source: https://dev.adjust.com/en/sdk/web/configuration Assign a custom externalDeviceId to a device or user for cross-session and cross-platform recognition, and to help deduplicate installs. Contact your Adjust representative to get started. ```typescript Adjust.initSdk({ appToken: "YOUR_APP_TOKEN", environment: "sandbox", externalDeviceId: "YOUR_EXTERNAL_DEVICE_ID", }); ``` -------------------------------- ### Basic MainActivity Setup Source: https://dev.adjust.com/en/sdk/adobe-extension/android/integration Set up a basic MainActivity that extends AppCompatActivity. ```java public class MainActivity extends AppCompatActivity {} ``` ```java public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) {} } ``` ```java @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } ``` ```java @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } ``` -------------------------------- ### Get Xiaomi Install Referrer (Java) Source: https://dev.adjust.com/en/sdk/android/migration/v4-to-v5 Retrieves install referrer information from Xiaomi devices. Requires application context and an implementation of OnXiaomiInstallReferrerReadListener. ```java AdjustXiaomiReferrer.getXiaomiInstallReferrer(getApplicationContext(), new OnXiaomiInstallReferrerReadListener() { @Override public void onXiaomiInstallReferrerRead(XiaomiInstallReferrerDetails referrerDetails) { } @Override public void onFail(String message) { } }); ``` -------------------------------- ### Get Vivo Install Referrer (Java) Source: https://dev.adjust.com/en/sdk/android/migration/v4-to-v5 Fetches install referrer information from Vivo devices. Requires application context and an implementation of OnVivoInstallReferrerReadListener. ```java AdjustVivoReferrer.getVivoInstallReferrer(getApplicationContext(), new OnVivoInstallReferrerReadListener() { @Override public void onVivoInstallReferrerRead(VivoInstallReferrerDetails referrerDetails) { } @Override public void onFail(String message) { } }); ``` -------------------------------- ### Example: Configure EU URL Strategy in SDK v5 Source: https://dev.adjust.com/en/sdk/migration/cocos2dx/v4-to-v5 Example demonstrating how to set the URL strategy for the EU in SDK v5, specifying the domain, enabling subdomains, and enabling data residency. ```java // EU URL strategy adjustConfig.setUrlStrategy({"eu.adjust.com"}, true, true); ``` -------------------------------- ### Get Samsung Install Referrer (Java) Source: https://dev.adjust.com/en/sdk/android/migration/v4-to-v5 Retrieves install referrer information from Samsung devices. Requires application context and an implementation of OnSamsungInstallReferrerReadListener. ```java AdjustSamsungReferrer.getSamsungInstallReferrer(getApplicationContext(), new OnSamsungInstallReferrerReadListener() { @Override public void onSamsungInstallReferrerRead(SamsungInstallReferrerDetails referrerDetails) { } @Override public void onFail(String message) { } }); ``` -------------------------------- ### Install Adjust SDK via Package Manager Console Source: https://dev.adjust.com/en/sdk/windows Use this command in the Package Manager Console to install the Adjust SDK. ```powershell PM> Install-Package Adjust ``` -------------------------------- ### Get Xiaomi Install Referrer (Kotlin) Source: https://dev.adjust.com/en/sdk/android/migration/v4-to-v5 Retrieves install referrer information from Xiaomi devices. Requires application context and an implementation of OnXiaomiInstallReferrerReadListener. ```kotlin AdjustXiaomiReferrer.getXiaomiInstallReferrer( applicationContext, object : OnXiaomiInstallReferrerReadListener() { fun onXiaomiInstallReferrerRead(referrerDetails: XiaomiInstallReferrerDetails?) {} fun onFail(message: String?) {} }) ``` -------------------------------- ### Full Ad Revenue Example - Java Source: https://dev.adjust.com/en/sdk/android/features/ad-revenue This example demonstrates setting up an AdjustAdRevenue object with various properties including revenue source, amount, impressions, network, unit, placement, and both callback and partner parameters. ```java AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AD_REVENUE_APPLOVIN_MAX); adjustAdRevenue.setRevenue(1.00, "EUR"); adjustAdRevenue.setAdImpressionsCount(10); adjustAdRevenue.setAdRevenueNetwork("network1"); adjustAdRevenue.setAdRevenueUnit("unit1"); adjustAdRevenue.setAdRevenuePlacement("banner"); adjustAdRevenue.addCallbackParameter("key1", "value1"); adjustAdRevenue.addPartnerParameter("key2", "value2"); Adjust.trackAdRevenue(adjustAdRevenue); ``` -------------------------------- ### Get Vivo Install Referrer (Kotlin) Source: https://dev.adjust.com/en/sdk/android/migration/v4-to-v5 Fetches install referrer information from Vivo devices. Requires application context and an implementation of OnVivoInstallReferrerReadListener. ```kotlin AdjustVivoReferrer.getVivoInstallReferrer( applicationContext, object : OnVivoInstallReferrerReadListener() { fun onVivoInstallReferrerRead(referrerDetails: VivoInstallReferrerDetails?) {} fun onFail(message: String?) {} }) ``` -------------------------------- ### Record Ad Revenue with All Properties Source: https://dev.adjust.com/en/sdk/maui/features/ad-revenue This example demonstrates how to set up and track an ad revenue object with a specific source, revenue amount, currency, impressions, network, unit, placement, and both callback and partner parameters. ```csharp AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue("applovin_max_sdk"); adjustAdRevenue.SetRevenue(1.00, "EUR"); adjustAdRevenue.AdImpressionsCount = 10; adjustAdRevenue.AdRevenueNetwork = "network1"; adjustAdRevenue.AdRevenueUnit = "unit1"; adjustAdRevenue.AdRevenuePlacement = "banner"; adjustAdRevenue.AddCallbackParameter("key1", "value1"); adjustAdRevenue.AddPartnerParameter("key2", "value2"); Adjust.TrackAdRevenue(adjustAdRevenue); ``` -------------------------------- ### Get Samsung Install Referrer (Kotlin) Source: https://dev.adjust.com/en/sdk/android/migration/v4-to-v5 Retrieves install referrer information from Samsung devices. Requires application context and an implementation of OnSamsungInstallReferrerReadListener. ```kotlin AdjustSamsungReferrer.getSamsungInstallReferrer( applicationContext, object : OnSamsungInstallReferrerReadListener() { fun onSamsungInstallReferrerRead(referrerDetails: SamsungInstallReferrerDetails?) {} fun onFail(message: String?) {} }) ``` -------------------------------- ### Example: Configure US URL Strategy in SDK v5 Source: https://dev.adjust.com/en/sdk/migration/cocos2dx/v4-to-v5 Example demonstrating how to set the URL strategy for the US in SDK v5, specifying the domain, enabling subdomains, and enabling data residency. ```java // US URL strategy adjustConfig.setUrlStrategy({"us.adjust.com"}, true, true); ``` -------------------------------- ### Get current attribution information Source: https://dev.adjust.com/en/sdk/corona/features/attribution Retrieve the current attribution details for an install by calling the `getAttribution` method. This provides information about the campaign that attributed the install. ```lua local adjust = require "plugin.adjust" local json = require "json" adjust.getAttribution(function(event) local json_attribution = json.decode(event.message) print("Tracker token: " .. (json_attribution.trackerToken or "N/A")) print("Tracker name: " .. (json_attribution.trackerName or "N/A")) print("Campaign: " .. (json_attribution.campaign or "N/A")) print("Network: " .. (json_attribution.network or "N/A")) print("Creative: " .. (json_attribution.creative or "N/A")) print("Adgroup: " .. (json_attribution.adgroup or "N/A")) print("Cost type: " .. (json_attribution.costType or "N/A")) print("Cost amount: " .. (json_attribution.costAmount or "N/A")) print("Cost currency: " .. (json_attribution.costCurrency or "N/A")) print("FB install referrer: " .. (json_attribution.fbInstallReferrer or "N/A")) print("JSON response: " .. (json_attribution.jsonResponse or "N/A")) end) ``` -------------------------------- ### Example: Configure Turkey URL Strategy in SDK v5 Source: https://dev.adjust.com/en/sdk/migration/cocos2dx/v4-to-v5 Example demonstrating how to set the URL strategy for Turkey in SDK v5, specifying the domain, enabling subdomains, and enabling data residency. ```java // Turkey URL strategy adjustConfig.setUrlStrategy({"tr.adjust.com"}, true, true); ``` -------------------------------- ### Get Huawei Install Referrer (Java) Source: https://dev.adjust.com/en/sdk/android/migration/v4-to-v5 Fetches install referrer information from Huawei Ads and AppGallery. Requires application context and an implementation of OnHuaweiInstallReferrerReadListener. ```java AdjustHuaweiReferrer.getHuaweiAdsInstallReferrer(getApplicationContext(), new OnHuaweiInstallReferrerReadListener() { @Override public void onInstallReferrerDetailsRead(HuaweiInstallReferrerDetails referrerDetails) { } @Override public void onFail(String message) { } }); AdjustHuaweiReferrer.getHuaweiAppGalleryInstallReferrer(getApplicationContext(), new OnHuaweiInstallReferrerReadListener() { @Override public void onInstallReferrerDetailsRead(HuaweiInstallReferrerDetails referrerDetails) { } @Override public void onFail(String message) { } }); ``` -------------------------------- ### Record Event with Partner Parameters on Button Click Source: https://dev.adjust.com/en/sdk/cordova/features/events This example shows how to initialize the Adjust SDK and then record an event with specific partner parameters when a button is clicked. It includes the full application initialization flow. ```javascript var app = { // Application Constructor initialize: function () { this.bindEvents(); }, // Bind Event Listeners bindEvents: function () { document.addEventListener("deviceready", this.onDeviceReady, false); }, onDeviceReady: function () { app.receivedEvent("deviceready"); var adjustConfig = new AdjustConfig( "YourAppToken", AdjustConfig.EnvironmentSandbox, ); Adjust.initSdk(adjustConfig); }, receivedEvent: function (id) { console.log("Received Event: " + id); var btnRecordPartnerParamEvent = document.getElementById( "btnRecordPartnerParamEvent", ); btnRecordPartnerParamEvent.addEventListener( "click", function () { var adjustEvent = new AdjustEvent("g3mfiw"); adjustEvent.addPartnerParameter("product_id", "29"); adjustEvent.addPartnerParameter("user_id", "835"); Adjust.trackEvent(adjustEvent); }, false, ); }, }; app.initialize(); ``` -------------------------------- ### Get Huawei Install Referrer (Kotlin) Source: https://dev.adjust.com/en/sdk/android/migration/v4-to-v5 Fetches install referrer information from Huawei Ads and AppGallery. Requires application context and an implementation of OnHuaweiInstallReferrerReadListener. ```kotlin AdjustHuaweiReferrer.getHuaweiAdsInstallReferrer( applicationContext, object : OnHuaweiInstallReferrerReadListener() { fun onInstallReferrerDetailsRead(referrerDetails: HuaweiInstallReferrerDetails?) {} fun onFail(message: String?) {} }) AdjustHuaweiReferrer.getHuaweiAppGalleryInstallReferrer( applicationContext, object : OnHuaweiInstallReferrerReadListener() { fun onInstallReferrerDetailsRead(referrerDetails: HuaweiInstallReferrerDetails?) {} fun onFail(message: String?) {} }) ``` -------------------------------- ### Set up Direct Install Postbacks Source: https://dev.adjust.com/en/sdk/unity/features/skad Configure your app to send a copy of winning SKAdNetwork and AdAttributionKit callbacks to Adjust by adding the Adjust callback URL to your `Info.plist` file. ```APIDOC ## Set up direct install postbacks You can configure your app to send a copy of winning **SKAdNetwork** and **AdAttributionKit** callbacks to Adjust. This enables you to use both sources of attribution information in your analytics. To set up direct install postbacks, you need to add the Adjust callback URL to your `Info.plist` file: 1. Select **Info.plist** in the Project navigator in Xcode. 2. Select the Add button beside a key in the property list editor and press `Return`. 3. Add the following keys: **For SKAdNetwork** * **Key:** _`Advertising attribution report endpoint URL`_(or _`NSAdvertisingAttributionReportEndpoint`_raw key representation) * **Type:** **String** * **Value:** _`https://adjust-skadnetwork.com`_ **For AdAttributionKit** * **Key:** _`AdAttributionKit - Postback Copy URL`_(or _`AttributionCopyEndpoint`_raw key representation) * **Type:** **String** * **Value:** _`https://adjust-skadnetwork.com`_ ``` -------------------------------- ### Full Ad Revenue Example - Kotlin Source: https://dev.adjust.com/en/sdk/android/features/ad-revenue This example demonstrates setting up an AdjustAdRevenue object with various properties including revenue source, amount, impressions, network, unit, placement, and both callback and partner parameters. ```kotlin val adjustAdRevenue = AdjustAdRevenue(AdjustConfig.AD_REVENUE_APPLOVIN_MAX) adjustAdRevenue.setRevenue(1.00, "EUR") adjustAdRevenue.setAdImpressionsCount(10) adjustAdRevenue.setAdRevenueNetwork("network1") adjustAdRevenue.setAdRevenueUnit("unit1") adjustAdRevenue.setAdRevenuePlacement("banner") adjustAdRevenue.addCallbackParameter("key1", "value1") adjustAdRevenue.addPartnerParameter("key2", "value2") Adjust.trackAdRevenue(adjustAdRevenue) ``` -------------------------------- ### Full Ad Revenue Example Source: https://dev.adjust.com/en/sdk/android/features/ad-revenue Example demonstrating how to set up and record an ad revenue object with various properties including revenue source, amount, impressions, network, unit, placement, callback parameters, and partner parameters. ```APIDOC ## Example ### Description This example shows how to set up and record an ad revenue object with the following properties: * AppLovin MAX as the revenue source * 1 Euro as the revenue amount * 10 ad impressions * _`"network1"`_as the ad revenue network * _`"unit1"`_as the ad revenue unit * _`"banner"`_as the ad revenue placement * A callback parameter: `"key1" = "value1"` * A partner parameter: `"key2" = "value2"` ### Example (Kotlin) ```kotlin val adjustAdRevenue = AdjustAdRevenue(AdjustConfig.AD_REVENUE_APPLOVIN_MAX) adjustAdRevenue.setRevenue(1.00, "EUR") adjustAdRevenue.setAdImpressionsCount(10) adjustAdRevenue.setAdRevenueNetwork("network1") adjustAdRevenue.setAdRevenueUnit("unit1") adjustAdRevenue.setAdRevenuePlacement("banner") adjustAdRevenue.addCallbackParameter("key1", "value1") adjustAdRevenue.addPartnerParameter("key2", "value2") Adjust.trackAdRevenue(adjustAdRevenue) ``` ### Example (Java) ```java AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AD_REVENUE_APPLOVIN_MAX); adjustAdRevenue.setRevenue(1.00, "EUR"); adjustAdRevenue.setAdImpressionsCount(10); adjustAdRevenue.setAdRevenueNetwork("network1"); adjustAdRevenue.setAdRevenueUnit("unit1"); adjustAdRevenue.setAdRevenuePlacement("banner"); adjustAdRevenue.addCallbackParameter("key1", "value1"); adjustAdRevenue.addPartnerParameter("key2", "value2"); Adjust.trackAdRevenue(adjustAdRevenue); ``` ``` -------------------------------- ### Get Google Play Install Referrer (Java) Source: https://dev.adjust.com/en/sdk/android/migration/v4-to-v5 Use this method to fetch install referrer information from Google Play. Requires application context and an implementation of OnGooglePlayInstallReferrerReadListener. ```java Adjust.getGooglePlayInstallReferrer(getApplicationContext(), new OnGooglePlayInstallReferrerReadListener() { @Override public void onInstallReferrerRead(GooglePlayInstallReferrerDetails referrerDetails) { } @Override public void onFailure(String message) { } }); ``` -------------------------------- ### Example: Configure India URL Strategy in SDK v5 Source: https://dev.adjust.com/en/sdk/migration/cocos2dx/v4-to-v5 Example demonstrating how to set the URL strategy for India in SDK v5, specifying the main and fallback domains, enabling subdomains, and disabling data residency. ```java // India URL strategy adjustConfig.setUrlStrategy({"adjust.net.in", "adjust.com"}, true, false); ``` -------------------------------- ### Record Event with Callback Parameters Source: https://dev.adjust.com/en/sdk/cordova/features/events This example demonstrates initializing the Adjust SDK and tracking an event with specific callback parameters. It includes event listeners for button clicks to trigger the event tracking. ```javascript var app = { // Application Constructor initialize: function () { this.bindEvents(); }, // Bind Event Listeners bindEvents: function () { document.addEventListener("deviceready", this.onDeviceReady, false); }, onDeviceReady: function () { app.receivedEvent("deviceready"); var adjustConfig = new AdjustConfig( "YourAppToken", AdjustConfig.EnvironmentSandbox, ); Adjust.initSdk(adjustConfig); }, receivedEvent: function (id) { console.log("Received Event: " + id); var btnRecordCallbackEvent = document.getElementById( "btnRecordCallbackEvent", ); btnRecordCallbackEvent.addEventListener( "click", function () { var adjustEvent = new AdjustEvent("g3mfiw"); adjustEvent.addCallbackParameter("event_token", "g3mfiw"); adjustEvent.addCallbackParameter("revenue_amount", "0.05"); Adjust.trackEvent(adjustEvent); }, false, ); }, }; app.initialize(); ``` -------------------------------- ### Get Google Play Install Referrer (Kotlin) Source: https://dev.adjust.com/en/sdk/android/migration/v4-to-v5 Use this method to fetch install referrer information from Google Play. Requires application context and an implementation of OnGooglePlayInstallReferrerReadListener. ```kotlin Adjust.getGooglePlayInstallReferrer( applicationContext, object : OnGooglePlayInstallReferrerReadListener { override fun onInstallReferrerRead(referrerDetails: GooglePlayInstallReferrerDetails) {} override fun onFailure(message: String) {} }) ``` -------------------------------- ### View App Channel Setup Source: https://dev.adjust.com/en/api/app-automation-api/channel-setup Retrieve the current channel setup for an app using the `GET /app/{app_token}` endpoint. The response will contain a `channel_setup` object detailing the configured values. ```json { "name": "My App", "store_id": "com.example.myapp", "platform": "android", "adjust_app_token": "abc123xyz", "channel_setup": { "facebook": { "app_id": "123456789" }, "google": { "link_id": "adwords_link_id" }, "snapchat": { "snap_app_id": "snapchat_app_id" } } } ``` -------------------------------- ### CSV Report Data Example Source: https://dev.adjust.com/en/api/rs-api/csv This is an example of the data format you will receive in the CSV report. It includes headers for dimensions such as app, partner_name, campaign, and campaign_id_network, followed by the corresponding metrics for installs and network_cost. ```csv app,partner_name,campaign,campaign_id_network,campaign_network,installs,network_cost App Name,AppLovin,Campaign Name (Campaign ID),Campaign ID,Campaign Network,64,1000 ``` -------------------------------- ### Example: Configure China URL Strategy in SDK v5 Source: https://dev.adjust.com/en/sdk/migration/cocos2dx/v4-to-v5 Example demonstrating how to set the URL strategy for China in SDK v5, specifying the main and fallback domains, enabling subdomains, and disabling data residency. ```java // China URL strategy adjustConfig.setUrlStrategy({"adjust.world", "adjust.com"}, true, false); ``` -------------------------------- ### Get Huawei Ads Install Referrer (Java) Source: https://dev.adjust.com/en/sdk/android/plugins/huawei-referrer-plugin Use this Java code to retrieve Huawei Ads Install Referrer details. It requires the application context and a listener to handle the results or errors. ```java AdjustHuaweiReferrer.getHuaweiAdsInstallReferrer(getApplicationContext(), new OnHuaweiInstallReferrerReadListener() { @Override public void onInstallReferrerDetailsRead(HuaweiInstallReferrerDetails referrerDetails) { } @Override public void onFail(String message) { } }); ``` -------------------------------- ### Track Ad Revenue with Parameters Source: https://dev.adjust.com/en/sdk/cordova/features/ad-revenue This example demonstrates how to set up and track an ad revenue object, including revenue details, ad impressions, network, unit, placement, and both callback and partner parameters. ```javascript var adjustAdRevenue = new AdjustAdRevenue("applovin_max_sdk"); adjustAdRevenue.setRevenue(1.0, "EUR"); adjustAdRevenue.setAdImpressionsCount(10); adjustAdRevenue.setAdRevenueNetwork("network1"); adjustAdRevenue.setAdRevenueUnit("unit1"); adjustAdRevenue.setAdRevenuePlacement("banner"); adjustAdRevenue.addCallbackParameter("key1", "value1"); adjustAdRevenue.addPartnerParameter("key2", "value2"); Adjust.trackAdRevenue(adjustAdRevenue); ``` -------------------------------- ### Get Huawei Ads Install Referrer (Kotlin) Source: https://dev.adjust.com/en/sdk/android/plugins/huawei-referrer-plugin Use this Kotlin code to retrieve Huawei Ads Install Referrer details. It requires the application context and a listener to handle the results or errors. ```kotlin AdjustHuaweiReferrer.getHuaweiAdsInstallReferrer( applicationContext, object : OnHuaweiInstallReferrerReadListener() { fun onInstallReferrerDetailsRead(referrerDetails: HuaweiInstallReferrerDetails?) {} fun onFail(message: String?) {} } ) ``` -------------------------------- ### Track Ad Revenue Example Source: https://dev.adjust.com/en/sdk/flutter/features/ad-revenue This example shows how to set up and record an ad revenue object with various properties, including callback and partner parameters. ```APIDOC ## Example This example shows how to set up and record an ad revenue object with the following properties: * AppLovin MAX as the revenue source * 1 Euro as the revenue amount * 10 ad impressions * _`'network1'`_as the ad revenue network * _`'unit1'`_as the ad revenue unit * _`'banner'`_as the ad revenue placement * A callback parameter: `'key1' = 'value1'` * A partner parameter: `'key2' = 'value2'` ```dart 1 AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue('applovin_max_sdk'); 2 adjustAdRevenue.setRevenue(1.00, 'EUR'); 3 adjustAdRevenue.adImpressionsCount = 10; 4 adjustAdRevenue.adRevenueNetwork = 'network1'; 5 adjustAdRevenue.adRevenueUnit = 'unit1'; 6 adjustAdRevenue.adRevenuePlacement = 'banner'; 7 adjustAdRevenue.addCallbackParameter('key1', 'value1'); 8 adjustAdRevenue.addPartnerParameter('key2', 'value2'); 9 Adjust.trackAdRevenue(adjustAdRevenue); ``` ``` -------------------------------- ### Get Huawei App Gallery Install Referrer (Java) Source: https://dev.adjust.com/en/sdk/android/plugins/huawei-referrer-plugin Use this Java code to retrieve Huawei App Gallery Install Referrer details. It requires the application context and a listener to handle the results or errors. ```java AdjustHuaweiReferrer.getHuaweiAppGalleryInstallReferrer(getApplicationContext(), new OnHuaweiInstallReferrerReadListener() { @Override public void onInstallReferrerDetailsRead(HuaweiInstallReferrerDetails referrerDetails) { } @Override public void onFail(String message) { } }); ``` -------------------------------- ### Get Huawei App Gallery Install Referrer (Kotlin) Source: https://dev.adjust.com/en/sdk/android/plugins/huawei-referrer-plugin Use this Kotlin code to retrieve Huawei App Gallery Install Referrer details. It requires the application context and a listener to handle the results or errors. ```kotlin AdjustHuaweiReferrer.getHuaweiAppGalleryInstallReferrer( applicationContext, object : OnHuaweiInstallReferrerReadListener() { fun onInstallReferrerDetailsRead(referrerDetails: HuaweiInstallReferrerDetails?) {} fun onFail(message: String?) {} } ) ``` -------------------------------- ### Extract SHA-1 Fingerprint from OpenSSL Output Source: https://dev.adjust.com/en/sdk/android/integrations/retrieve-certificate-fingerprints This is an example of the output you will receive after running the OpenSSL command to get the SHA-1 fingerprint. ```text SHA1 Fingerprint=C4:BD:07:91:BC:09:F8:B6:15:CD:BC:A3:3F:BC:68:8B:C2:EF:4F:F5 ```