Skip to content

Commit

Permalink
Add AD(X) docs (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sporiff authored Feb 8, 2024
2 parents 91be55b + ff44c23 commit aca8b42
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 16 deletions.
31 changes: 16 additions & 15 deletions src/content/docs/en/sdk/android/features/ad-revenue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,17 @@ To send ad revenue to Adjust:

<Table>

| Parameter | Source |
| ------------------------------------ | ----------------- |
| Parameter | Source |
| ------------------------------------------- | ----------------- |
| `AdjustConfig.AD_REVENUE_APPLOVIN_MAX` | AppLovin MAX |
| `AdjustConfig.AD_REVENUE_MOPUB` | Mopub |
| `AdjustConfig.AD_REVENUE_ADMOB` | AdMob |
| `AdjustConfig.AD_REVENUE_IRONSOURCE` | ironSource |
| `AdjustConfig.AD_REVENUE_ADMOST` | AdMost |
| `AdjustConfig.AD_REVENUE_UNITY` | Unity |
| `AdjustConfig.AD_REVENUE_MOPUB` | Mopub |
| `AdjustConfig.AD_REVENUE_ADMOB` | AdMob |
| `AdjustConfig.AD_REVENUE_IRONSOURCE` | ironSource |
| `AdjustConfig.AD_REVENUE_ADMOST` | AdMost |
| `AdjustConfig.AD_REVENUE_UNITY` | Unity |
| `AdjustConfig.AD_REVENUE_HELIUM_CHARTBOOST` | Helium Chartboost |
| `AdjustConfig.AD_REVENUE_SOURCE_PUBLISHER` | Generic source |
| `AdjustConfig.AD_REVENUE_SOURCE_PUBLISHER` | Generic source |
| `AdjustConfig.AD_REVENUE_ADX` | Ad(X) |

</Table>

Expand Down Expand Up @@ -197,14 +198,14 @@ Adjust.trackAdRevenue(adjustAdRevenue);
<Tab title="Javascript" sync="js">

```js
let adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AD_REVENUE_APPLOVIN_MAX)
adjustAdRevenue.setRevenue(1.00, 'EUR');
let adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AD_REVENUE_APPLOVIN_MAX);
adjustAdRevenue.setRevenue(1.0, "EUR");
adjustAdRevenue.setAdImpressionsCount(10);
adjustAdRevenue.setAdRevenueNetwork('network1');
adjustAdRevenue.setAdRevenueUnit('unit1');
adjustAdRevenue.setAdRevenuePlacement('banner');
adjustAdRevenue.addCallbackParameter('key1', 'value1');
adjustAdRevenue.addPartnerParameter('key2', 'value2');
adjustAdRevenue.setAdRevenueNetwork("network1");
adjustAdRevenue.setAdRevenueUnit("unit1");
adjustAdRevenue.setAdRevenuePlacement("banner");
adjustAdRevenue.addCallbackParameter("key1", "value1");
adjustAdRevenue.addPartnerParameter("key2", "value2");
Adjust.trackAdRevenue(adjustAdRevenue);
```

Expand Down
53 changes: 53 additions & 0 deletions src/content/docs/en/sdk/android/integrations/adx.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: AD(X) SDK integration
description: Use the Ad(X) integration to pass AD(X) information to Adjust's servers.
slug: en/sdk/android/integrations/adx
---

<MinorVersion added="v4.36.0">

You can use the Adjust SDK to send AD(X) data to Adjust as an `AdjustAdRevenue` instance. To do this:

</MinorVersion>

1. Create a new function that triggers when the `rewardedAd.OnPaidEvent` method is called in the AD(X) SDK. This function should receive the eCPM (Effective Cost Per Mille) amount as an argument.
2. Instantiate an [`AdjustAdRevenue` object](/en/sdk/android/features/ad-revenue) with the source `AdjustConfig.AdRevenueSourceAdx`.
3. Fill in the details of your `AdjustAdRevenue` object. Divide the `ecpm` value by 1000 to return the estimated revenue for the ad.
4. Send the ad revenue information to Adjust by calling the `trackAdRevenue` method.

## Example

<Tabs>
<Tab title="Kotlin">

```kotlin
override fun onPaidEvent(double ecpm) {
double revenue = ecpm / 1000

AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AD_REVENUE_ADX)
adjustAdRevenue.setRevenue(revenue, "USD")
adjustAdRevenue.setAdRevenueUnit("ADX Rewarded Ad")

Adjust.trackAdRevenue(adjustAdRevenue)
}

```

</Tab>
<Tab title="Java">

```java
@Override
public void onPaidEvent(double ecpm) {
double revenue = ecpm / 1000;

AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AD_REVENUE_ADX);
adjustAdRevenue.setRevenue(revenue, "USD");
adjustAdRevenue.setAdRevenueUnit("ADX Rewarded Ad");

Adjust.trackAdRevenue(adjustAdRevenue);
}
```

</Tab>
</Tabs>
1 change: 1 addition & 0 deletions src/content/docs/en/sdk/ios/features/ad-revenue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ To send ad revenue to Adjust:
| `ADJAdRevenueSourceUnity` | Unity |
| `ADJAdRevenueSourceHeliumChartboost` | Helium Chartboost |
| `ADJAdRevenueSourcePublisher` | Generic source |
| `ADJAdRevenueSourceADX` | Ad(X) |

</Table>

Expand Down
51 changes: 51 additions & 0 deletions src/content/docs/en/sdk/ios/integrations/adx.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: AD(X) SDK integration
description: Use the Ad(X) integration to pass AD(X) information to Adjust's servers.
slug: en/sdk/ios/integrations/adx
---

<MinorVersion added="v4.35.3">

You can use the Adjust SDK to send AD(X) data to Adjust as an `AdjustAdRevenue` instance. To do this:

</MinorVersion>

1. Create a new function that triggers when the `rewardedAd.OnPaidEvent` method is called in the AD(X) SDK. This function should receive the eCPM (Effective Cost Per Mille) amount as an argument.
2. Instantiate an [`ADJAdRevenue` object](/en/sdk/ios/features/ad-revenue) with the source `ADJAdRevenueSourceADX`.
3. Fill in the details of your `AdjustAdRevenue` object. Divide the `ecpm` value by 1000 to return the estimated revenue for the ad.
4. Send the ad revenue information to Adjust by calling the `trackAdRevenue` method.

## Example

<Tabs>
<Tab title="Swift">

```swift
func rewardedAd.paidEventHandler(ecpm: double) {
let revenue: double = ecpm / 1000;

let adjustAdRevenue = AJDAdRevenue(source: ADJAdRevenueSourceADX);
adjustAdRevenue.setRevenue(revenue, currency: "USD");
adjustAdRevenue.setAdRevenueUnit("ADX Rewarded Ad");

Adjust.trackAdRevenue(adjustAdRevenue);
}
```

</Tab>
<Tab title="Objective-C">

```objc
rewardedAd.paidEventHandler = ^(double ecpm) {
double revenue = ecpm / 1000;

ADJAdRevenue *adjustAdRevenue = [[ADJAdRevenue alloc] initWithSource: ADJAdRevenueSourceADX];
[adjustAdRevenue setRevenue:revenue currency:@"USD"];
[adjustAdRevenue setAdRevenueUnit:@"ADX Rewarded Ad"];

[Adjust trackAdRevenue: adjustAdRevenue];
};
```

</Tab>
</Tabs>
2 changes: 1 addition & 1 deletion src/content/docs/en/sdk/unity/features/ad-revenue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ To send ad revenue to Adjust:
| `AdjustConfig.AdjustAdRevenueSourceUnity` | Unity |
| `AdjustConfig.AdjustAdRevenueSourceHeliumChartboost` | Helium Chartboost |
| `AdjustConfig.AdjustAdRevenueSourcePublisher` | Generic source |
| `AdjustConfig.AdjustAdRevenueSourceAdx` | AD(X) |

</Table>

Expand Down Expand Up @@ -162,7 +163,6 @@ This example demonstrates how to set up and record an ad revenue object with the
- A callback parameter: `"key1" = "value1"`
- A partner parameter: `"key2" = "value2"`


```c#
AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AdjustAdRevenueSourceAppLovinMAX);
adjustAdRevenue.setRevenue(1.00, "EUR");
Expand Down
39 changes: 39 additions & 0 deletions src/content/docs/en/sdk/unity/integrations/adx.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: AD(X) SDK integration
description: Use the Ad(X) integration to pass AD(X) information to Adjust's servers.
slug: en/sdk/unity/integrations/adx
---

<MinorVersion added="v4.36.0">

You can use the Adjust SDK to send AD(X) data to Adjust as an `AdjustAdRevenue` instance. To do this:

</MinorVersion>

1. Create a new function that triggers when the `rewardedAd.OnPaidEvent` method is called in the AD(X) SDK. This function should receive the eCPM (Effective Cost Per Mille) amount as an argument.
2. Instantiate an [`AdjustAdRevenue` object](/en/sdk/unity/features/ad-revenue) with the source `AdjustConfig.AdRevenueSourceAdx`.
3. Fill in the details of your `AdjustAdRevenue` object. Divide the `ecpm` value by 1000 to return the estimated revenue for the ad.
4. Send the ad revenue information to Adjust by calling the `trackAdRevenue` method.

<Callout type="seealso">

For more information about the `rewardedAd.OnPaidEvent` method, see [AD(X)'s rewarded ad documentation](https://docs.adxcorp.kr/unity/sdk-integration/ad-formats/rewarded-ad/ad-x#id-4.-a-d-revenue-onpaidevent)

</Callout>

## Example

```cs
rewardedAd.OnPaidEvent += RewardedAd_OnPaidEvent;

void RewardedAd_OnPaidEvent(double ecpm)
{
double revenue = ecpm / 1000f;

AdjustAdRevenue adRevenue = new AdjustAdRevenue(AdjustConfig.AdRevenueSourceAdx);
adRevenue.setRevenue(revenue, "USD");
adRevenue.setAdRevenueUnit("ADX Rewarded Ad");

Adjust.trackAdRevenue(adRevenue);
}
```

0 comments on commit aca8b42

Please sign in to comment.