Appmetrica Plugin
This plugin allows you log events and setup push with Appmetrica.
Platforms:
this plugin only works with iOSFunctions:
appmetrica.init(apiKey)
-- setup appmetricaapiKey(string) api key from appmetrica dashboard
appmetrica.setUserProfileID(userID)
-- set user iduserID(string) set user id for device user
appmetrica.setLocationTracking(enableLocation)
-- enable locationenableLocation(boolean) enable location tracking
appmetrica.setVersion(verison)
-- set verison numberverison(number) verison of app
appmetrica.setGender(gender)
-- set gender for profilegender(string) set as "male" or "female"
appmetrica.setAge(age)
-- set age for profileage(number) set age of user
appmetrica.setName(name)
-- set name for profilename(string) set name of user
appmetrica.setDidUserEnableNotifcation(boolean)
-- did you enable notifcation for userdidUserEnableNotifcation(boolean)
appmetrica.setCustomUserInfo(key, value)
-- custom data for userkey(string) custom key for user
value(string) custom value for user
appmetrica.reportEvent(eventName, data)
eventName(string) event name
data(table) data for the event
appmetrica.reportError(errorName, errorReason)
errorName(string) error name
errorReason(table) error reason
appmetrica.setupPush(isDevelopmentMode)
isDevelopmentMode(boolean)(optional) using in development mode (default is false)
appmetrica.reportEvent(eventName, data)
eventName(string) event name
data(table) data for the event
Runtime Event:
setup up runtime like so Runtime:addEventListener( "appmetrica", listener )
Returns: event.name = "appmetrica", event.type = "remotePush" or "didRegisterPush", event.isError = boolean, event.error = should return string or nil, event.data(occurs when event.type = "remotePush")(table) = contain aps data in table format see apple docs