You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find more information in the [following article on branded domains](https://support.appsflyer.com/hc/en-us/articles/360002329137-Implementing-Branded-Links).
716
+
Find more information in the [following article on branded domains](https://support.appsflyer.com/hc/en-us/articles/360002329137-Implementing-Branded-Links).
678
717
679
718
_Example:_
680
719
```dart
@@ -823,3 +862,53 @@ Note:<br>This API will trigger the `appsflyerSdk.onDeepLink` callback. In the fo
The logAdRevenue API is designed to simplify the process of logging ad revenue events to AppsFlyer from your Flutter application. This API tracks revenue generated from advertisements, enriching your monetization analytics. Below you will find instructions on how to use this API correctly, along with detailed descriptions and examples for various input scenarios.
871
+
872
+
### **Usage:**
873
+
To use the logAdRevenue method, you must:
874
+
875
+
1. Prepare an instance of `AdRevenueData` with the required information about the ad revenue event.
876
+
1. Call `logAdRevenue` with the `AdRevenueData` instance.
877
+
878
+
**AdRevenueData Class**
879
+
[AdRevenueData](#AdRevenueData) is a data class representing all the relevant information about an ad revenue event:
880
+
881
+
*`monetizationNetwork`: The source network from which the revenue was generated (e.g., AdMob, Unity Ads).
882
+
*`mediationNetwork`: The mediation platform managing the ad (use AFMediationNetwork enum for supported networks).
883
+
*`currencyIso4217Code`: The ISO 4217 currency code representing the currency of the revenue amount (e.g., "USD", "EUR").
884
+
*`revenue`: The amount of revenue generated from the ad.
885
+
*`additionalParameters`: Additional parameters related to the ad revenue event (optional).
886
+
887
+
888
+
**AFMediationNetwork Enum**
889
+
[AFMediationNetwork](#AFMediationNetwork) is an enumeration that includes the supported mediation networks by AppsFlyer. It's important to use this enum to ensure you provide a valid network identifier to the logAdRevenue API.
890
+
891
+
### Example:
892
+
```dart
893
+
// Instantiate AdRevenueData with the ad revenue details.
894
+
AdRevenueData adRevenueData = AdRevenueData(
895
+
monetizationNetwork: "GoogleAdMob", // Replace with your actual monetization network.
896
+
mediationNetwork: AFMediationNetwork.applovinMax.value, // Use the value from the enum.
897
+
currencyIso4217Code: "USD",
898
+
revenue: 1.23,
899
+
additionalParameters: {
900
+
// Optional additional parameters can be added here. This is an example, can be discard if not needed.
901
+
'adUnitId': 'ca-app-pub-XXXX/YYYY',
902
+
'ad_network_click_id': '12345'
903
+
}
904
+
);
905
+
906
+
// Log the ad revenue event.
907
+
logAdRevenue(adRevenueData);
908
+
```
909
+
910
+
**Additional Points**
911
+
* Mediation network input must be from the provided [AFMediationNetwork](#AFMediationNetwork)
912
+
enum to ensure proper processing by AppsFlyer. For instance, use `AFMediationNetwork.googleAdMob.value` to denote Google AdMob as the Mediation Network.
913
+
* The `additionalParameters` map is optional. Use it to pass any extra information you have regarding the ad revenue event; this information could be useful for more refined analytics.
914
+
* Make sure the `currencyIso4217Code` adheres to the appropriate standard. Misconfigured currency code may result in incorrect revenue tracking.
0 commit comments