Server-to-server ad revenue

If you track ad revenue yourself, you can share this data server-to-server (S2S) to view it with all of your other Adjust-tracked metrics. This gives a complete overview of your campaign performance, letting you calculate your users’ LTV and optimize your campaign ROAS and ROI.

Send your ad revenue data to Adjust server-to-server to view it in your dashboard Statistics and Cohorts.

Before you begin

Here’s what you need to know before getting started.

Availability

  • Ad revenue package

Helpful information

  • Ad revenue sent S2S is added to ad revenue KPIs and Cohort calculations for LTV and ROAS.

Send S2S ad revenue

We accept the following types of requests for S2S ad revenue:

  • GET with URL parameters
  • POST with URL parameters (no body)
  • POST with body parameters as Content-Type application/x-www-form-urlencoded

When should I send S2S ad revenue to Adjust?

FAQ

Set up S2S Security

Set up S2S Security to guarantee the security of your S2S ad revenue and protect against spoofed requests. This requires each incoming request to carry a token generated in your Adjust dashboard. Requests that do not carry the token or that carry an incorrect token are rejected by our server. To get set up, follow the steps in our S2S Security article.

Note:
Always test the implementation of your auth token in your ad revenue requests before activating S2S authentication in the dashboard.

Required parameters

To send ad revenue to Adjust, always pass the following parameters to https://s2s.adjust.com/ad_revenue:

ParameterDescriptionExample
idfa; gps_adid; etc. Platform dependent Device ID (see full list).idfa=D2CADB5F-410F-4963-AC0C-2A78534BDF1E

gps_adid=660e1d86-6796-463a-be86-897993136018
app_tokenAdjust app token from the dashboard.app_token=4w565xzmb54d
s2ss2s parameter set to 1.1
revenue or amountThe amount of ad revenue earned by the device.4.99
currencyThe currency that the revenue is represented in.

If your event request contains the {revenue} or {amount} parameter with a value appended, it is essential to include {currency}. If this parameter is missing, our backend rejects the request.
USD
ad_impressions_countThe number of impressions the revenue is associated with (int > 0).100
sourceAlways publisher.publisher
Recommended but not mandatory:
adidAdjust device ID (all platforms)18546f6171f67e29d1cb983322ad1329
created_at_unix
(recommended)

or

created_at
Tells us the exact time an ad impression was served to the user (should not be older than 28 days).created_at_unix=1484085154

or

created_at=2017-01-02T15:04:05.000+0000
environmentThe current SDK environment setting.production or sandbox

Recommended additional parameters for callbacks

Parameter
Description
Example
callback_paramsUse to pass your callback parameters as a JSON object (properly escaped and string to string) callback_params=%7B%22f0o%22%3A%22bar%22%2C%20%22bar%22%3A%22baz%22%7D
ad_revenue_network
Additional data about ad revenue 
ad_revenue_network=Admob
ad_revenue_unit
Additional data about ad revenue 
ad_revenue_unit=rewarded_video
ad_revenue_placement
Additional data about ad revenue 
ad_revenue_placement=home_screen

Example POST request with token added:

curl -X POST -H "Authorization: Bearer b9eb9d6228842aeb05d64f30d56b361e" "https://s2s.adjust.com/ad_revenue?app_token=abc123abc123&idfa=FAD135C7-C5F8-4DCC-9478-2203956B0870&source=publisher&ad_impressions_count=1&revenue=0.01&currency=USD&s2s=1"

Example success response:

{"status":"OK"}

Example error response:

{"error":"Ad revenue request failed (wrong authentication token) (app_token:abc123abc123)"}