-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added all plugins for Android and iOS (#68)
- Loading branch information
Showing
50 changed files
with
6,231 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,6 @@ exceptions: | |
- KPI | ||
- CSV | ||
- ATT | ||
- JAR | ||
- OAID | ||
- CDN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,5 @@ tokens: | |
- lb | ||
- miles | ||
- pounds | ||
exceptions: | ||
- "Facebook pixels" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
``` | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# AppLovin MAX SDK integration | ||
|
||
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} | ||
``` | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
``` | ||
::: |
Oops, something went wrong.