项目作者: lumpn

项目描述 :
Matomo Analytics for Unity
高级语言: C#
项目地址: git://github.com/lumpn/unity-matomo.git
创建时间: 2021-01-11T15:33:47Z
项目社区:https://github.com/lumpn/unity-matomo

开源协议:MIT License

下载


Matomo Analytics

Matomo Analytics for Unity. GDPR compliant by default. No need to ask the user for consent.

Installation

Download the entire repository from https://github.com/lumpn/unity-matomo and use Unity’s built in package manager to Add package from disk.

Usage

  1. public MatomoTrackerData trackerData;
  2. IEnumerator Start()
  3. {
  4. var tracker = trackerData.CreateTracker();
  5. var session = tracker.CreateSession();
  6. yield return session.RecordEvent("MyGameEvent", Time.time);
  7. yield return session.RecordEvent("AnotherGameEvent", Time.time);
  8. }

Installing Matomo

Follow Matomo’s guide to installing Matomo on-premise, then set up a website to track, create a MatomoTrackerData asset, and paste the website URL and id into the MatomoTrackerData asset.

Copy website URL

Nomenclature

Matomo is built for website tracking, but we will use it to track game events. The names of things are different, but the results are just the same.

Game Matomo
Project Website
Event Page
Event name Page URL
Event time Page load time

You can make up any website URL for your project. The domain does not have to exist. I tend to use https://<project-name>.game because it’s short.

Samples

See Samples for details.