Skip to content

Commit

Permalink
Update README file
Browse files Browse the repository at this point in the history
  • Loading branch information
af-obodovskyi committed Oct 15, 2024
1 parent ab3e1aa commit ca02cd8
Showing 1 changed file with 73 additions and 3 deletions.
76 changes: 73 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


### <a id="plugin-build-for"> This plugin is built for
Expand Down Expand Up @@ -199,16 +201,67 @@ AppsFlyerX::stop(false); // or false
```
---
##### <a id="sharingFilterForAllPartners"> **`sharingFilterForAllPartners();`**
##### <a id="validate_and_log_2.0"> **`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;

---


##### <a id="logAdRevenue"> **`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);
```
---
##### <a id="logEvent"> **`trackEvent(eventName, eventValues): void`** (optional)
Expand Down Expand Up @@ -772,6 +825,23 @@ Used by advertisers to set some (one or more) networks/integrated partners to ex
---
##### <a id="SharingFilterForPartners"> **`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<std::string>` | partners to exclude from getting data
*Example:*
```cpp
```

---



##### <a id="disableNetworkID"> **`setDisableNetworkData(disable);`**
Use to opt-out of collecting the network operator name (carrier) and sim operator name from the device.
Expand Down

0 comments on commit ca02cd8

Please sign in to comment.