der-On/godot-matomo-plugin

A godot plugin to integrate matomo analytics into your godot games.

★ 0Forks 0GDScriptGitHub ↗Compare

README

Matomo Analytics for Godot

With this plugin you can integrate Matomo Analytics into your Godot game.

Installation

  1. Install the plugin under addons/matomo.
  2. Enable the Plugin in your Project Settings.
  3. Create a new Scene with the root node beeing of Type "Matomo".
  4. Enter the URL to the matomo instance and the site ID in this Matomo node and save the scene.
  5. Add this scene to your Globals as Matomo under Project Settings.
  6. Now you can access Matomo from everywhere in GD-Script.

Usage

# This will set a user ID for all action tracking. If you do not have a user ID you do not need to set it.
Matomo.set_user_id(id:String)

# This will send a track event to matomo. You must provide an URL.
# You can completely makeup this URL or if you use a web based game use the URL of the game.
# The action name can be seperated with " / " e.g. "button_click / start_game"
Matomo.track(url:String, action_name:String)

Issues