From ca02cd8f0236d7f9147ff2466d13cd9c71c4b4aa Mon Sep 17 00:00:00 2001 From: "ivan.obodovskyi" Date: Tue, 15 Oct 2024 13:37:51 +0300 Subject: [PATCH] Update README file --- README.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 73 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0ad4f96..84e8112 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,8 @@ In order for us to provide optimal support, we would kindly ask you to submit an - [setSharingFilterForPartners](#SharingFilterForPartners) - [setDisableNetworkData](#disableNetworkID) *(android only)* - [Send consent for DMA compliance](#dma_support) +- [validateAndLog](#validate_and_log_2.0) +- [logAdrevenue](#logAdrevenue) ### This plugin is built for @@ -199,16 +201,67 @@ AppsFlyerX::stop(false); // or false ``` --- -##### **`sharingFilterForAllPartners();`** +##### **`Validate and log 2.0 API`** -Use to prevent sharing data with all networks/integrated partners. +| Property | Type | Description | Platform | +| ------------- | ------------------------------ | ----------------------------------------------------------------- | ------------ | +| purchaseType | `AFXPurchaseType` | Purchase type of the event. For Apple implementation, use `APPLE` | Android only | +| purchaseToken | `std::string` | Field required to validate the purchase | Android only | +| transactionId | `std::string` | Transaction ID of the Apple purchase | iOS only | +| productId | `std::string` | ID of the purchased product | Android/iOS | +| price | `std::string` | Price of the product | Android/iOS | +| currency | `std::string` | Currency according to the ISO format (ISO 4217) | Android/iOS | + +*Description:* +The `validateAndLogInAppPurchase` method is part of the receipt validation flow, which enables your app to validate in-app purchase events generated by Google Play and Apple. + + +`AFSDXPurchaseDetails` encapsulates all purchase necessary data for Android and iOS. +* `AFXPurchaseType` is used for Android only, so for iOS, be sure to use `APPLE` option, which is empty string and will be omitted by the implementation. +* `purchaseToken` is the Android propperty, for Apple impl, please use empty string; +* The `transactionId`is used by Apple implementation, Android omits this propperty; *Example:* +```cpp +ValueMap params; // Additional parameters you want to pass to the API +AFSDKXPurchaseDetails details = AFSDKXPurchaseDetails(AFXPurchaseType::SUBSCRIPTION, "", "customId", "6.99", "USD", "transactionId"); + +AppsFlyerX::validateAndLogInAppPurchase(details, params, [](const AFSDKXValidateAndLogResult& result) { + // Your implementation of the completion/callback block; +}); +``` + +**Note:** For Android SDK, the callback block does not return anything for now, it will be supported in the next update; + +--- + +##### **`Log AdRevenue API`** + +*Description:* + +When an impression with revenue occurs, invoke the logAdRevenue method with the revenue details of the impression. + +`AFXAdRevenueData` object encapsulates all data related to the AdRevenue event: + +| Property | Type | Description | +| ----------------------- | ------------------------------------------- | ------------------------------------------------- | +| monetizationNetwork | `std::string` | The name of the monetization network | +| mediationNetwork | `AppsFlyerXAdRevenueMediationNetworkType` | The type of mediation network being used | +| currencyIso4217Code | `std::string` | Currency code according to the ISO format (ISO 4217) | +| eventRevenue | `double` | Revenue generated from the ad event | + + + +*Example:* ```cpp -AppsFlyerX::sharingFilterForAllPartners(); +ValueMap params; // Additional parameters you want to pass to the API +AFXAdRevenueData data = AFXAdRevenueData("someVal", AppsFlyerXAdRevenueMediationNetworkType::ApplovinMax, "USD", 7.99); + +AppsFlyerX::logAdRevenue(data, params); ``` + --- ##### **`trackEvent(eventName, eventValues): void`** (optional) @@ -772,6 +825,23 @@ Used by advertisers to set some (one or more) networks/integrated partners to ex --- +##### **`setSharingFilterForPartners(partners);`** +Used by advertisers to set some (one or more) networks/integrated partners to exclude from getting data. + +| parameter | type | description | +| ----------- |-----------------------------|--------------| +| `partners` | `std::vector` | partners to exclude from getting data + + +*Example:* + +```cpp + +``` + +--- + + ##### **`setDisableNetworkData(disable);`** Use to opt-out of collecting the network operator name (carrier) and sim operator name from the device.