Adjust

The Adjust Native Plugin integrates the Adjust iOS and Android SDKs into your app to enable advanced analytics and event tracking. This plugin allows you to register app installs, track user interactions, and retrieve attribution data using the Adjust Android and iOS SDKs.

You can also trigger events and fetch attribution details directly from JavaScript using the Median JavaScript Bridge.

🚧

Adjust Environment

Prior to publishing your app please confirm that the Adjust environment is set to AdjustConfig.EnvironmentProduction.

Implementation Guide

Plugin Initialization

There are 2 ways to initialize the Adjust plugin. Automatically, on app start or manually using a JavaScript bridge method. You can select which way to use via the plugin settings.

To initialize the plugin manually use the following JS snippet

↔️Median JavaScript Bridge

// Initialize method takes an optional argument to enable or disable SKAN 
// This parameter is only relevant for iOS and will be ignored for Android

median.adjust.intialize(true | false)

Sending Events to Adjust

You can send custom events to Adjust from your app using the JavaScript Bridge. These events can include revenue data and additional metadata as configured in the Adjust dashboard.

Example: Track a Revenue Event

↔️Median JavaScript Bridge

const adjustEvent = new AdjustEvent('abc123');
adjustEvent.setRevenue(0.01, 'EUR');
median.adjust.trackEvent(adjustEvent);

Replace 'abc123' with your Adjust event token.

Replace 0.01, 'EUR' with your desired revenue amount and currency code.

Retrieving Attribution Data

When users install your app through an Adjust-tracked campaign or deep link, their attribution information is stored by Adjust. You can retrieve this data via the JavaScript Bridge.

Example: Fetch Attribution Info

↔️Median JavaScript Bridge

const adjustEvent = new AdjustEvent('abc123');
adjustEvent.setRevenue(0.01, 'EUR');
median.adjust.trackEvent(adjustEvent);

Additional information on event recording can be found on the Adjust SDK Documentation