Skip to content

osov/defold-app-metrica

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yandex.Metrica(AppMetrica) for Defold

“This plugin is not endorsed or sponsored by Yandex LLC. This is an independent, unofficial plugin. “

Yandex.Metrica(AppMetrica) is a free of charge app analytics tool for Android and iOS.

This native extension doesn't implement all Yandex.Metrica functions, but they are enough to track most of the stats of your game.

How do I use this extension ?

1. Add AppMetrica As Dependency

You can use AppMetrica in your own project by adding this project as a Defold library dependency.

Open your game.project file and in the dependencies field under project add:

https://github.com/osov/defold-app-metrica/archive/master.zip

2. Get API KEY

Create an app and get API Key AppMetrica

3. Call AppMetrica Method

In your main.script call init to start monitoring. It means, for the AppMetrica, that your game finished loading:

function init(self)
  appmetrica.set_callback(function()
     print("app metrica initialized")
  end)
  appmetrica.initialize(YOUR_KEY)
end

Send events

function init(self)
   appmetrica.report_event('game_start', '') -- without parameters
   appmetrica.report_event('game_start',  json.encode({key1 = par1, key2 = par2})) -- or with parameters
end

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published