You can record ad revenue for supported network partners using the Adjust SDK.
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.
Instantiate an AdjustAdRevenue object
To send ad revenue information with the Adjust SDK, you need to instantiate an AdjustAdRevenue
object. This object contains variables that are sent to Adjust when ad revenue is recorded in your app.
To instantiate an ad revenue object, create a new AdjustAdRevenue
instance and pass the following parameters:
source
(string
): The source of the ad revenue. See the table below for available sources
Argument | Ad revenue Source |
---|---|
"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 |
Send ad revenue
To send ad revenue to Adjust, call the Adjust.TrackAdRevenue
method with your ad revenue instance as an argument.
Record ad revenue amount
To send the ad revenue amount, call the SetRevenue
method of your AdjustAdRevenue
instance and pass the following arguments:
revenue
(double
): The amount of revenuecurrency
(string
): The 3 character ISO 4217 code of your reporting currency
Check the guide to recording purchases in different currencies for more information.
Record ad campaign details
The AdjustAdRevenue
class contains properties you can use to report on your ad campaigns.
Ad impressions
To send the number of recorded ad impressions, set the AdImpressionsCount
property of your AdjustAdRevenue
instance to the number of ad impressions.
Ad revenue network
To record the network associated with the ad revenue, assign the network name to the AdRevenueNetwork
property of your AdjustAdRevenue
instance.
Ad revenue unit
To send the ad revenue unit, assign the unit to the AdRevenueUnit
property of your AdjustAdRevenue
instance.
Ad revenue placement
To send the ad revenue placement, assign the ad placement to the AdRevenuePlacement
property of your AdjustAdRevenue
instance.
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.
Add callback parameters to your event by calling the AddCallbackParameter
method with string
key-value arguments. You can add multiple parameters by calling this method multiple times.
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:
Adjust doesn’t store your custom callback parameters. Custom parameters are only appended to your callback URL.
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.
You can read more about using URL callbacks, including a full list of available values, in the callbacks guide.
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.
Partner parameters don’t appear in raw data by default. You can add the {partner_parameters}
placeholder to receive them as a single string.
Add partner parameters to your event by calling the AddPartnerParameter
method with string
key-value arguments. You can add multiple parameters by calling this method multiple times.
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"
You can record ad revenue for supported network partners using the Adjust SDK.
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.
Instantiate an AdjustAdRevenue object
To send ad revenue information with the Adjust SDK, you need to instantiate an AdjustAdRevenue
object. This object contains variables that are sent to Adjust when ad revenue is recorded in your app.
To instantiate an ad revenue object, create a new AdjustAdRevenue
instance and pass the following parameters:
source
(string
): The source of the ad revenue. See the table below for available sources
Parameter | Source |
---|---|
AdjustConfig.AdjustAdRevenueSourceAppLovinMAX | AppLovin MAX |
AdjustConfig.AdjustAdRevenueSourceMopub | Mopub |
AdjustConfig.AdjustAdRevenueSourceAdMob | AdMob |
AdjustConfig.AdjustAdRevenueSourceIronSource | ironSource |
AdjustConfig.AdjustAdRevenueSourceAdmost | AdMost |
AdjustConfig.AdjustAdRevenueSourceUnity | Unity |
AdjustConfig.AdjustAdRevenueSourceHeliumChartboost | Helium Chartboost |
AdjustConfig.AdjustAdRevenueSourceAdx | AD(X) |
AdjustConfig.AdjustAdRevenueSourceTradPlus | TradPlus |
AdjustConfig.AdjustAdRevenueSourceTopOn | TopOn |
AdjustConfig.AdjustAdRevenueSourcePublisher | Generic source |
Send ad revenue
To send ad revenue to Adjust, call the trackAdRevenue
method with your ad revenue instance as an argument.
Record ad revenue amount
To send the ad revenue amount, call the setRevenue
method and pass the following arguments:
revenue
(double
): The amount of revenuecurrency
(string
): The 3 character ISO 4217 code of your reporting currency
Check the guide to recording purchases in different currencies for more information.
Record ad campaign details
The AdjustAdRevenue
class contains properties you can use to report on your ad campaigns.
Ad impressions
To send the number of recorded ad impressions, call the setAdImpressionsCount
method and pass the following arguments:
adImpressionsCount
(int
): The number of ad impressions.
Ad revenue network
To send the ad revenue network, call the setAdRevenueNetwork
method and pass the following arguments:
adRevenueNetwork
(string
): The network name.
Ad revenue unit
To send the ad revenue unit, call the setAdRevenueUnit
method and pass the following arguments:
adRevenueUnit
(string
): The ad unit.
Ad revenue placement
To send the ad revenue placement, call the setAdRevenuePlacement
method and pass the following arguments:
adRevenuePlacement
(string
): The ad placement.
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.
Add callback parameters to your event by calling the addCallbackParameter
method with string
key-value arguments. You can add multiple parameters by calling this method multiple times.
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:
Adjust doesn’t store your custom callback parameters. Custom parameters are only appended to your callback URL.
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.
You can read more about using URL callbacks, including a full list of available values, in the callbacks guide.
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.
Partner parameters don’t appear in raw data by default. You can add the {partner_parameters}
placeholder to receive them as a single string.
Add partner parameters to your event by calling the addPartnerParameter
method with string
key-value arguments. You can add multiple parameters by calling this method multiple times.
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"