appodeal.trackInAppPurchase()

Type Function
Return value none
Revision Current Public Release (2018.3326)
Keywords ads, advertising, Appodeal, trackInAppPurchase
See also appodeal.init()
appodeal.*

Overview

Important

This method is not supported by stable modular & legacy plugin versions for now. Make sure to use new modular plugin beta to get the latest and greatest.

This method helps you keep track of an inApp purchase. It allows to group users by the fact of purchasing in-apps. This will help you adjust the ads for such users or simply turn it off, if needed.

Syntax

appodeal.trackInAppPurchase( options )
options (required)

Table. Table containing option values — see the next section for details.

Options Reference

The options table includes parameters for specifying user details.

amount (required)

Number. In app purchase cost amount.

currency (required)

String. In app purchase currency. Should be ISO 4217 Code (3 digit code).

Example

local appodeal = require( "plugin.appodeal" )

local function adListener( event )

    if ( event.phase == "init" ) then  -- Successful initialization
        -- Track inApp purchase
        appodeal.trackInAppPurchase( { amount = 10, currency = "USD" } )
    end
end

-- Initialize the Appodeal plugin
appodeal.init( adListener, { appKey = "YOUR_APP_KEY" } )