Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added all plugins for Android and iOS #68

Merged
merged 15 commits into from
Sep 18, 2023
Merged
8 changes: 8 additions & 0 deletions .github/styles/Adjust/Avoid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: substitution
message: "Use '%s' instead of '%s'."
level: error
ignorecase: true
action:
name: replace
swap:
backend: servers
1 change: 0 additions & 1 deletion .github/styles/Microsoft/Avoid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ tokens:
- app(?:lication)?s? (?:developer|program)
- app(?:lication)? file
- backbone
- backend
- contiguous selection
2 changes: 2 additions & 0 deletions .github/styles/Microsoft/HeadingAcronyms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ exceptions:
- KPI
- CSV
- ATT
- JAR
- OAID
- CDN
2 changes: 2 additions & 0 deletions .github/styles/Microsoft/Units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ tokens:
- lb
- miles
- pounds
exceptions:
- "Facebook pixels"
55 changes: 55 additions & 0 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,23 @@ subtrees:
- file: ios/reference/ADJLinkResolution
- file: ios/reference/ADJSubscription
- file: ios/reference/ADJThirdPartySharing
- file: ios/third-party-plugin/index
entries:
- file: ios/third-party-plugin/criteo-plugin
- file: ios/third-party-plugin/facebook-pixel
- file: ios/third-party-plugin/sociomantic-plugin
- file: ios/third-party-plugin/trademob-plugin
- file: ios/integrations/index
entries:
- file: ios/integrations/admob
- file: ios/integrations/admost
- file: ios/integrations/applovin-max
- file: ios/integrations/batch.com
- file: ios/integrations/helium
- file: ios/integrations/ironsource
- file: ios/integrations/mixpanel
- file: ios/integrations/segment
- file: ios/integrations/unity
- file: android/index
title: Android
options:
Expand Down Expand Up @@ -95,6 +112,28 @@ subtrees:
- file: android/reference/AdjustEvent
- file: android/reference/AdjustPlayStoreSubscription
- file: android/reference/AdjustThirdPartySharing
- file: android/third-party-plugin/index
entries:
- file: android/third-party-plugin/criteo-plugin
- file: android/third-party-plugin/facebook-pixel
- file: android/third-party-plugin/imei-plugin
- file: android/third-party-plugin/oaid-plugin
- file: android/third-party-plugin/samsung-referrer-plugin
- file: android/third-party-plugin/sociomantic-plugin
- file: android/third-party-plugin/trademob-plugin
- file: android/third-party-plugin/vivio-referrer-plugin
- file: android/third-party-plugin/xiaomi-referrer-plugin
- file: android/integrations/index
entries:
- file: android/integrations/admob
- file: android/integrations/admost
- file: android/integrations/applovin-max
- file: android/integrations/batch.com
- file: android/integrations/helium
- file: android/integrations/ironsource
- file: android/integrations/mixpanel
- file: android/integrations/segment
- file: android/integrations/unity
- file: unity/index
title: Unity
options:
Expand Down Expand Up @@ -129,6 +168,17 @@ subtrees:
- file: unity/reference/AdjustEvent
- file: unity/reference/AdjustPlayStoreSubscription
- file: unity/reference/AdjustThirdPartySharing
- file: unity/third-party-plugin/index
entries:
- file: unity/third-party-plugin/oaid-plugin
- file: android/integrations/index
entries:
- file: android/integrations/admob
- file: android/integrations/admost
- file: android/integrations/applovin-max
- file: android/integrations/helium
- file: android/integrations/ironsource
- file: android/integrations/unity
- file: react-native/index
title: React Native
options:
Expand Down Expand Up @@ -162,6 +212,11 @@ subtrees:
- file: react-native/reference/AdjustAppStoreSubscription
- file: react-native/reference/AdjustPlayStoreSubscription
- file: react-native/reference/AdjustThirdPartySharing
- file: unity/third-party-plugin/index
entries:
- file: react-native/third-party-plugin/criteo-plugin
- file: react-native/third-party-plugin/sociomantic-plugin
- file: react-native/third-party-plugin/trademob-plugin
- file: flutter/index
title: Flutter
options:
Expand Down
4 changes: 2 additions & 2 deletions docs/android/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Get started

The Adjust Unity SDK enables you to record attribution, events, and more in your Android app. Follow the steps in this guide to set up your app to work with the Adjust SDK.
The Adjust Android SDK enables you to record attribution, events, and more in your Android app. Follow the steps in this guide to set up your app to work with the Adjust SDK.

:::{seealso}
You can see an example of how to integrate the Adjust SDK [on GitHub](https://github.com/adjust/android_sdk/tree/master/Adjust).
:::

## 1. Get the Adjust SDK

To use the Adjust SDK in your Unity app, you need to add it to your project. You can download the latest version from the [GitHub releases page](https://github.com/adjust/adjust_android_sdk/releases/latest).
To use the Adjust SDK in your Android app, you need to add it to your project. You can download the latest version from the [GitHub releases page](https://github.com/adjust/adjust_android_sdk/releases/latest).

:::{important}
The minimum supported Android API level for the Adjust SDK integration is 9 (Gingerbread).
Expand Down
65 changes: 65 additions & 0 deletions docs/android/integrations/admob.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# AdMob SDK integration

If you want to measure ad revenue with the AdMob SDK, you can use the SDK-to-SDK integration to pass this information to Adjust's servers.

:::{note}
If you have any questions about ad revenue tracking with AdMob, please contact your dedicated account manager or send an email to [email protected].
:::

## Before you begin

To use this feature, you need to first reach out to your Google representative and request access. Once that's done, you can proceed with setup in Adjust.

__Requirements__

- Android SDK v4.28.0 and later

## Examples

:::{tab-set-code}

```Java
AdRequest adRequest = new AdRequest.Builder().build();

RewardedAd.load(this, "ad unit ID",
adRequest, new RewardedAdLoadCallback(){
@Override
public void onAdLoaded(@NonNull RewardedAd ad) {
rewardedAd = ad;
// Set paid event listener
rewardedAd.setOnPaidEventListener(new OnPaidEventListener() {
@Override
public void onPaidEvent(AdValue adValue) {
// for more information, please check AdMob official docs at:
// https://developers.google.com/admob/android/impression-level-ad-revenue
AdapterResponseInfo loadedAdapterResponseInfo = rewardedAd.getResponseInfo().getLoadedAdapterResponseInfo();

// send ad revenue info to Adjust
AdjustAdRevenue adRevenue = new AdjustAdRevenue(AdjustConfig.AD_REVENUE_ADMOB);
adRevenue.setRevenue(adValue.getValueMicros() / 1000000, adValue.getCurrencyCode());
adRevenue.setAdRevenueNetwork(loadedAdapterResponseInfo.getAdSourceName());
Adjust.trackAdRevenue(adRevenue);
}
});
}
});
```

```C#
this.rewardedAd.OnPaidEvent += this.HandleAdPaidEvent;
public void HandleAdPaidEvent(object sender, AdValueEventArgs args)
{
// for more information, please check AdMob official docs at:
// https://developers.google.com/admob/unity/impression-level-ad-revenue
AdValue adValue = args.AdValue;
AdapterResponseInfo loadedAdapterResponseInfo = rewardedAd.GetResponseInfo().GetLoadedAdapterResponseInfo();

// send ad revenue info to Adjust
AdjustAdRevenue adRevenue = new AdjustAdRevenue(AdjustConfig.AdjustAdRevenueSourceAdMob);
adRevenue.setRevenue(adValue.Value / 1000000f, adValue.CurrencyCode);
adRevenue.setAdRevenueNetwork(loadedAdapterResponseInfo.AdSourceName)
Adjust.trackAdRevenue(adRevenue);
}
```

:::
16 changes: 16 additions & 0 deletions docs/android/integrations/admost.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Admost SDK integration

If you want to measure ad revenue with the Admost SDK, you can use the SDK-to-SDK integration to pass this information to Adjust's servers.

:::{note}
If you have any questions about ad revenue tracking with Admost, please contact your dedicated Technical Account Manager or send an email to [email protected].
:::

## Before you begin

To use this feature, you need to first ask your Admost representative to enable SDK-to-SDK revenue sharing for your app.

__Requirements__

- Integrate the Admost Android SDK v2.4.5 or later in your app.
- Integrate the Adjust Android SDK v4.28.5 or later in your app.
46 changes: 46 additions & 0 deletions docs/android/integrations/applovin-max.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# AppLovin MAX SDK integration

Check warning on line 1 in docs/android/integrations/applovin-max.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/android/integrations/applovin-max.md#L1

[Microsoft.HeadingAcronyms] Avoid using acronyms in a title or heading.
Raw output
{"message": "[Microsoft.HeadingAcronyms] Avoid using acronyms in a title or heading.", "location": {"path": "docs/android/integrations/applovin-max.md", "range": {"start": {"line": 1, "column": 12}}}, "severity": "WARNING"}

If you want to measure ad revenue with the AppLovin MAX SDK, you can use the SDK-to-SDK integration to pass this information to Adjust's servers.

:::{note}
If you have any questions about ad revenue measurement with AppLovin MAX, please contact your dedicated Technical Account Manager or send an email to [email protected].
:::

## Before you begin

__Requirements__

- Adjust Android SDK v4.33.5 and later

## Examples

:::{tab-set-code}

```Java
@Override
public void onAdRevenuePaid(final MaxAd ad) {
AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue( AdjustConfig.AD_REVENUE_APPLOVIN_MAX);
adjustAdRevenue.setRevenue(ad.getRevenue(), "USD");
adjustAdRevenue.setAdRevenueNetwork(ad.getNetworkName());
adjustAdRevenue.setAdRevenueUnit(ad.getAdUnitId());
adjustAdRevenue.setAdRevenuePlacement(ad.getPlacement());

Adjust.trackAdRevenue( adjustAdRevenue);
}
```

```C#
private void OnRewardedAdRevenuePaidEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
{
var adRevenue = new AdjustAdRevenue(AdjustConfig.AdjustAdRevenueSourceAppLovinMAX);
adRevenue.setRevenue(adInfo.Revenue, "USD");
adRevenue.setAdRevenueNetwork(adInfo.NetworkName);
adRevenue.setAdRevenueUnit(adInfo.AdUnitIdentifier);
adRevenue.setAdRevenuePlacement(adInfo.Placement);

Adjust.trackAdRevenue(adRevenue);
}
```
:::

To see how this integration works in context, check out AppLovin's [example Android application](https://github.com/AppLovin/AppLovin-MAX-SDK-Android/blob/master/AppLovin%20MAX%20Demo%20App%20-%20Java/app/src/main/java/com/applovin/enterprise/apps/demoapp/ads/max/RewardedAdActivity.java#L133-L144).
69 changes: 69 additions & 0 deletions docs/android/integrations/batch.com.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Batch.com SDK integration

You can integrate the Adjust SDK with Batch.com events by following one of the methods below.

## Before you begin

To use this feature, you first need to download and set up the Adjust Android SDK.

To integrate Adjust with the Batch.com SDK, you need to send attribution to the Batch.com SDK. You should send this information after receiving a response from the Adjust servers. To do this, follow the steps in the [attribution callback guide](https://help.adjust.com/en/article/attribution-callbacks-android-sdk).

## Examples

You can set the callback method like this:

:::{tab-set-code}

```Java
AdjustConfig config = new AdjustConfig(this, appToken, environment);

config.setOnAttributionChangedListener(new OnAttributionChangedListener() {
@Override
public void onAttributionChanged(AdjustAttribution attribution) {
// Initiate Batch user editor to set new attributes.
BatchUserDataEditor editor = Batch.User.editor();

if (attribution.network != null) {
editor.setAttribute("adjust_network", attribution.network);
}
if (attribution.campaign != null) {
editor.setAttribute("adjust_campaign", attribution.campaign);
}
if (attribution.adgroup != null) {
editor.setAttribute("adjust_adgroup", attribution.adgroup);
}
if (attribution.creative != null) {
editor.setAttribute("adjust_creative", attribution.creative);
}

// Send new attributes to Batch servers.
editor.save();
}
});

Adjust.onCreate(config);
```

```Swift
func adjustAttributionChanged(_ attribution: ADJAttribution?) {
// initiate Batch user editor to set new attributes
let editor = BatchUser.editor()

if attribution?.network != nil {
editor?.setAttribute(attribution?.network, forKey: "adjust_network")
}
if attribution?.campaign != nil {
editor?.setAttribute(attribution?.campaign, forKey: "adjust_campaign")
}
if attribution?.adgroup != nil {
editor?.setAttribute(attribution?.campaign, forKey: "adjust_adgroup")
}
if attribution?.creative != nil {
editor?.setAttribute(attribution?.creative, forKey: "adjust_creative")
}

// send new attribute to Batch servers
editor.save()
}
```
:::
62 changes: 62 additions & 0 deletions docs/android/integrations/helium.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Helium by Chartboost SDK integration

:::{note}
If you have any questions about ad revenue measurement with Helium by Chartboost, please contact your dedicated Technical Account Manager or send an email to [email protected].
:::

If you want to measure ad revenue with the Helium by Chartboost SDK, you can use SDK-to-SDK integration to pass this information to Adjust's servers.

## Before you begin

__Requirement__

- Integrate the Adjust Android SDK v4.29.0 or later in your app.

## Examples

:::{tab-set-code}

```Java
public void ilrdObserver (final HeliumImpressionData impData) {
final AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AD_REVENUE_HELIUM_CHARTBOOST);
// extract the ILRD payload
final JSONObject json = impData.getIlrdInfo();
try {
final double adRevenue = json.getDouble("ad_revenue");
final String currencyType = json.getString("currency_type");
adjustAdRevenue.setRevenue(adRevenue, currencyType);
} catch (JSONException e) {
// error handling as either revenue or currency was not present
return;
}
// optional fields
final String networkName = json.optString("network_name"); // Helium demand network name
final String placementName = json.optString("placement_name"); // Helium placement name
final String lineItemName = json.optString("line_item_name"); // Helium line item name
adjustAdRevenue.setAdRevenueNetwork(networkName);
adjustAdRevenue.setAdRevenueUnit(placementName);
adjustAdRevenue.setAdRevenuePlacement(lineItemName);
// track Adjust ad revenue
Adjust.trackAdRevenue(adjustAdRevenue);
}
```

```C#
void DidReceiveImpressionLevelRevenueData(string placement, Hashtable impressionData)
{
var json = HeliumJSON.Serialize(impressionData);

ParsedJsonObject parsedJsonObject = foobar.parse(json); //app developer defined function to parse Helium impressionData JSON string

AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AdjustAdRevenueSourceHeliumChartboost);
adjustAdRevenue.setRevenue(parsedJsonObject.ad_revenue, parsedJsonObject.currency_type);

// optional fields
adjustAdRevenue.setAdRevenueNetwork(parsedJsonObject.network_name); // Helium demand network name
adjustAdRevenue.setAdRevenueUnit(parsedJsonObject.placement_name); // Helium placement name
adjustAdRevenue.setAdRevenuePlacement(parsedJsonObject.line_item_name); // Helium line item name
// track Adjust ad revenue
Adjust.trackAdRevenue(adjustAdRevenue);
}
```
:::
Loading
Loading