adjust-icon

Record ad revenue information

You can record ad revenue for supported network partners using the Adjust SDK.

Instantiate the ad revenue table

To send ad revenue information with the Adjust SDK, create an ad revenue table. This table contains the parameters that Adjust receives whenever you record ad revenue in your app.

The required parameter is:

  • source (string): The source of the ad revenue. Use one of the values below:
ParameterSource
"applovin_max_sdk"AppLovin MAX
"admob_sdk"AdMob
"ironsource_sdk"ironSource
"admost_sdk"AdMost
"unity_sdk"Unity
"helium_chartboost_sdk"Helium Chartboost
"adx_sdk"Ad(X)
"publisher_sdk"Generic source
"tradplus_sdk"TradPlus
"topon_sdk"TopOn
local adjust = require "plugin.adjust"
adjust.trackAdRevenue({
source = "applovin_max_sdk"
})

Record ad revenue amount

To send the ad revenue amount, set the revenue and currency keys in your ad revenue table:

  • revenue (number): The amount of revenue
  • currency (string): The 3 character ISO 4217 code of your reporting currency
local adjust = require "plugin.adjust"
adjust.trackAdRevenue({
source = "applovin_max_sdk",
revenue = 1.0,
currency = "EUR"
})

Ad impressions

To send the number of recorded ad impressions, set the adImpressionsCount key in your ad revenue table:

local adjust = require "plugin.adjust"
adjust.trackAdRevenue({
source = "applovin_max_sdk",
revenue = 1.0,
currency = "EUR",
adImpressionsCount = 6
})

Ad revenue network

To record the ad network associated with the revenue, set the adRevenueNetwork key:

local adjust = require "plugin.adjust"
adjust.trackAdRevenue({
source = "applovin_max_sdk",
revenue = 1.0,
currency = "EUR",
adRevenueNetwork = "network1"
})

Ad revenue unit

To specify the ad revenue unit, set the adRevenueUnit key:

local adjust = require "plugin.adjust"
adjust.trackAdRevenue({
source = "applovin_max_sdk",
revenue = 1.0,
currency = "EUR",
adRevenueUnit = "unit1"
})

Ad revenue placement

To specify the ad revenue placement, set the adRevenuePlacement key:

local adjust = require "plugin.adjust"
adjust.trackAdRevenue({
source = "applovin_max_sdk",
revenue = 1.0,
currency = "EUR",
adRevenuePlacement = "banner"
})

Add callback parameters

If you register a callback URL in the Adjust dashboard, the SDK sends a GET request to your callback URL when it records an event.

You can configure callback parameters to your servers. Once you configure parameters on an event, the SDK appends them to your callback URL. You can use this information to analyze your users’ in-app behavior with your BI system.

The Adjust SDK measures the event and sends a request to your URL with the callback parameters. For example, if you register the URL https://www.mydomain.com/callback, your callback looks like this:

https://www.mydomain.com/callback?key=value&foo=bar

If you are using CSV uploads, make sure to add the parameters to your CSV definition.

Adjust supports many placeholders which you can use to pass information from the SDK to your URL. For example, the {idfa} placeholder for iOS and the {gps_adid} placeholder for Android. The {publisher_parameter} placeholder presents all callback parameters in a single string.

local adjust = require "plugin.adjust"
adjust.trackAdRevenue({
source = "applovin_max_sdk",
revenue = 1.0,
currency = "EUR",
callbackParameters = {
{
key = "key",
value = "value",
},
{
key = "foo",
value = "bar",
}
}
})

Add partner parameters

You can send extra information to your network partners by adding partner parameters.

Adjust sends partner parameters to external partners you have set up. This information is useful for more granular analysis and retargeting purposes. Adjust’s servers forward these parameters once you have set them up and enabled them for a partner.

local adjust = require "plugin.adjust"
adjust.trackAdRevenue({
source = "applovin_max_sdk",
revenue = 1.0,
currency = "EUR",
partnerParameters = {
{
key = "key",
value = "value",
},
{
key = "foo",
value = "bar",
}
}
})

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"
local adjust = require "plugin.adjust"
adjust.trackAdRevenue({
source = "applovin_max_sdk",
revenue = 1.0,
currency = "EUR",
addImpressionCount = 10,
adRevenueNetwork = "network1",
adRevenueUnit = "unit1",
adRevenuePlacement = "banner",
callbackParameters = {
{
key = "key1",
value = "value1",
}
}
partnerParameters = {
{
key = "key2",
value = "value2",
}
}
})