Skip to content

Commit 8c900c3

Browse files
committed
- add tracking revenue for ironsource
1 parent 3d26589 commit 8c900c3

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

Runtime/AdjustTracking/AdjustTrackingRevenue.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public static void AdjustTrackRevenue(double value, string network, string unitI
1919
case "max":
2020
source = com.adjust.sdk.AdjustConfig.AdjustAdRevenueSourceAppLovinMAX;
2121
break;
22+
case "ironsource":
23+
source = com.adjust.sdk.AdjustConfig.AdjustAdRevenueSourceIronSource;
24+
break;
2225
}
2326

2427
AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(source);

Runtime/AppsFlyerTracking/AppsFlyerTrackingRevenue.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ public static void AppsFlyerTrackRevenueAd(double value, string network, string
2929
mediationNetworks = AppsFlyerAdRevenueMediationNetworkType
3030
.AppsFlyerAdRevenueMediationNetworkTypeApplovinMax;
3131
break;
32+
case "ironsource":
33+
mediationNetworks = AppsFlyerAdRevenueMediationNetworkType
34+
.AppsFlyerAdRevenueMediationNetworkTypeIronSource;
35+
break;
3236
}
3337

3438
Dictionary<string, string> additionalParams = new Dictionary<string, string>();

Runtime/FirebaseTracking/FirebaseAnalyticTrackingRevenue.cs

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,30 @@ public static void FirebaseAnalyticTrackRevenue(double value, string network, st
1010
string adNetwork)
1111
{
1212
#if VIRTUESKY_FIREBASE_ANALYTIC
13+
string ad_platform = "";
1314
switch (adNetwork.ToLower())
1415
{
1516
case "admob":
1617
return;
1718
case "max":
18-
Parameter[] parameters =
19-
{
20-
new("value", value),
21-
new("ad_platform", "AppLovin"),
22-
new("ad_format", format),
23-
new("currency", "USD"),
24-
new("ad_unit_name", unitId),
25-
new("ad_source", network)
26-
};
27-
28-
FirebaseAnalytics.LogEvent("ad_impression", parameters);
19+
ad_platform = "AppLovin";
20+
break;
21+
case "ironsource":
22+
ad_platform = "IronSource";
2923
break;
3024
}
25+
26+
Parameter[] parameters =
27+
{
28+
new("value", value),
29+
new("ad_platform", ad_platform),
30+
new("ad_format", format),
31+
new("currency", "USD"),
32+
new("ad_unit_name", unitId),
33+
new("ad_source", network)
34+
};
35+
36+
FirebaseAnalytics.LogEvent("ad_impression", parameters);
3137
#endif
3238
}
3339
}

0 commit comments

Comments
 (0)