Table of Contents

Class AppsFlyerModule

Namespace
Titipi.MocaLib2

Wraps the AppsFlyer Unity SDK for install attribution, event tracking, ad revenue, and purchase validation.

public static class AppsFlyerModule
Inheritance
AppsFlyerModule
Inherited Members

Properties

Config

The config used to initialize this module.

IsInitialized

Whether the module has been successfully initialized.

Initialization

InitializeAsync(AppsFlyerModuleConfig)

Initializes the AppsFlyer SDK and starts it. When AppsFlyerModuleConfig.EnablePurchaseConnector is true, also sets up the Purchase Connector for automatic revenue validation.

Methods

LogAdRevenue(AdImpressionData)

Reports an ad impression to AppsFlyer for LTV attribution. Assumes AppLovin MAX as the mediation network.

LogEvent(string)

Sends a named AppsFlyer event with no additional parameters.

LogEvent(string, Dictionary<string, object>)

Sends a named AppsFlyer event with mixed-type key-value parameters. All values are converted to strings before being sent to the AppsFlyer SDK, which only accepts Dictionary<string, string>.

LogEvent(string, Dictionary<string, string>)

Sends a named AppsFlyer event with string key-value parameters.

LogPurchase(Product, string)

Validates and reports an in-app purchase to AppsFlyer. receipt is the raw Unity IAP receipt string (order.Info.Receipt) passed through from OnPurchaseSucceeded. On Android, extracts the purchase token from the receipt JSON for server-side validation via the AppsFlyer SDK. On iOS, uses the transaction ID for App Store validation.