https://github.com/mgsx-dev/gdx-analytics
https://github.com/mgsx-dev/gdx-analytics
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/mgsx-dev/gdx-analytics
- Owner: mgsx-dev
- License: apache-2.0
- Created: 2018-08-06T12:09:29.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-06T14:13:47.000Z (almost 8 years ago)
- Last Synced: 2025-02-06T03:31:16.133Z (over 1 year ago)
- Language: Java
- Size: 73.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://jitpack.io/#mgsx-dev/gdx-analytics)
[Full documentation](https://jitpack.io/com/github/mgsx-dev/gdx-analytics/master-SNAPSHOT/javadoc/index.html)
User tracking for your LibGDX game.
| Compatibility | Desktop | WebGL | Android | iOS |
|------------------|:------------:|:------------:|:------------:|:------------:|
| Google Analytic | OK | OK | *not tested* | *not tested* |
| Matomo (Piwik) | *not tested* | *not tested* | *not tested* | *not tested* |
**GDPR compliance** : if you want to send data to identify the players (even randomly generated ID), you'll have to comply to GDPR law and ask consent to the players before performing any requests. You could collect data without player's consent but you can't use any identifier and then having less accurate statistics.
# Setup
## Google Analytics
You need to create a new website to track and get its tracker ID.
see [Example here](test/net/mgsx/analytics/GoogleAnalyticsTrackerTest.java)
## Matomo (piwik)
see [Example here](test/net/mgsx/analytics/MatomoTrackerTest.java)
### Test with a local instance (docker)
run docker compose :
$ cd docker/matomo
$ docker-compose up web
Install : go to http://localhost:9000
Setup DB
* db address : db
* login: root
* pwd : root
* db name : piwik
Setup User
* login : matomo
* pwd : matomo
* email : your email
Setup website
* name : localhost
* geo : anything
Then run integration test to send an event :
* idsite must be your created site id (1 for the first one)
you can see the result [http://localhost:9000/index.php?module=CoreHome&action=index&date=today&period=day&idSite=1#?idSite=1&period=day&date=today&category=General_Actions&subcategory=Events_Events](here)