You can use the Adjust SDK to send ad revenue information from supported network partners to Adjust.
Instantiate an ad revenue object
To send ad revenue information with the Adjust SDK, you need to instantiate an AdjustAdRevenue2dx
object. This object contains variables that are sent to Adjust when ad revenue is recorded in your app.
To instantiate an ad revenue object, instantiate an AdjustAdRevenue2dx
objec with the following parameter:
source
(std::string
)The source of the ad revenue. See the table below for all available sources.
Parameter | 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) |
"tradplus_sdk" | TradPlus |
"topon_sdk" | TopOn |
"publisher_sdk" | Generic source |
Once you've instantiated your ad revenue object, set the ad revenue amount by calling the setRevenue
method with the following arguments:
amount
(double
)The amount of ad revenue to be recorded.
currency
(std::string
)The currency of the ad revenue. You MUST format this as a 3 characterISO 4217 code
Set additional properties
To provide more information about ad revenue, you can set any of the following properties on your AdjustAdRevenue2dx
instance.
Ad campaign details
You can provide additional details about the campaign associated with your AdjustAdRevenue2dx
instance by populating various properties. This information is available in Datascape reports and raw data exports.
Ad impressions
To send the number of recorded ad impressions, call the setAdImpressionsCount
method of your AdjustAdRevenue2dx
instance with the following argument:
setAdImpressionsCount
(int
)The number of ad impressions.
Ad revenue network
To send the network associated with ad revenue, call the setAdRevenueNetwork
method of your AdjustAdRevenue2dx
instance with the following argument:
adRevenueNetwork
(std::string
)The name of the network associated with the ad revenue.
Ad revenue unit
To send the advertising unit that earned the revenue, call the setAdRevenueUnit
method of your `AdjustAdRevenue2dx instance with the following argument:
adRevenueUnit
(std::string
)The name of the ad unit associated with the ad revenue.
Ad revenue placement
To send the placement of the ad unit, call the setAdRevenuePlacement
method with the following argument:
adRevenuePlacement
(std::string
)The placement of the ad unit.
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 std::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:
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.
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.
Add partner parameters to your event by calling the addPartnerParameter
method with std::string
key-value arguments. You can add multiple parameters by calling this method multiple times.
Send ad revenue
Once you've populated your AdjustAdRevenue2dx
instance, pass it as an argument to the Adjust2dx::trackAdRevenue
to send the ad revenue information to Adjust.