{"id":37029570,"url":"https://github.com/dheid/matomo-tracker","last_synced_at":"2026-01-14T03:33:43.824Z","repository":{"id":56012581,"uuid":"523348389","full_name":"dheid/matomo-tracker","owner":"dheid","description":"A lightweight client library for JVM-based applications that helps you to track page views, events, visits using the Matomo Tracking API","archived":true,"fork":false,"pushed_at":"2024-04-29T20:02:47.000Z","size":232,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-30T03:43:22.877Z","etag":null,"topics":["analytics","android","dsl","graalvm","java","java-client","java-client-sdk","kotlin","matomo","matomo-analytics","matomo-sdk","matomo-tracking","matomo-web-analytics","metrics","mobile","piwik","piwik-sdk","tracker","web-analytics"],"latest_commit_sha":null,"homepage":"https://www.daniel-heid.de/open-source-projekte/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dheid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["dheid"],"ko_fi":"dheid"}},"created_at":"2022-08-10T13:09:58.000Z","updated_at":"2024-04-29T20:03:43.000Z","dependencies_parsed_at":"2023-11-21T21:24:56.962Z","dependency_job_id":"fd087176-c2af-43e4-922a-2637b3c7d9fe","html_url":"https://github.com/dheid/matomo-tracker","commit_stats":{"total_commits":91,"total_committers":4,"mean_commits":22.75,"dds":0.6923076923076923,"last_synced_commit":"f02d29ddef59073c77e8d56f7c2bcecfad195734"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/dheid/matomo-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dheid%2Fmatomo-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dheid%2Fmatomo-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dheid%2Fmatomo-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dheid%2Fmatomo-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dheid","download_url":"https://codeload.github.com/dheid/matomo-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dheid%2Fmatomo-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","android","dsl","graalvm","java","java-client","java-client-sdk","kotlin","matomo","matomo-analytics","matomo-sdk","matomo-tracking","matomo-web-analytics","metrics","mobile","piwik","piwik-sdk","tracker","web-analytics"],"created_at":"2026-01-14T03:33:43.109Z","updated_at":"2026-01-14T03:33:43.815Z","avatar_url":"https://github.com/dheid.png","language":"Java","funding_links":["https://github.com/sponsors/dheid","https://ko-fi.com/dheid","https://ko-fi.com/W7W3EER56"],"categories":[],"sub_categories":[],"readme":"# :mag: Matomo Tracking API Java Client\n\n[![Maven Central](https://img.shields.io/maven-central/v/org.drjekyll/matomo-tracker.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22org.drjekyll%22%20AND%20a:%22matomo-tracker%22)\n[![Java CI with Maven](https://github.com/dheid/matomo-tracker/actions/workflows/build.yml/badge.svg)](https://github.com/dheid/matomo-tracker/actions/workflows/build.yml)\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/W7W3EER56)\n\n\u003e :warning: **This library was integrated into the [official Matomo Java Tracker library](https://github.com/matomo-org/matomo-java-tracker)**\n\nA lightweight client library for JVM-based applications that helps you to track page views, events, visits using the\nMatomo Tracking API:\n\n* Automatically performs bulk requests with a configurable delay (default: 1 second)\n* Keeps queries until the request was transmitted successfully: If requests fail, the queries will not get lost.\n* Supports nearly all tracking parameters\n* The request API is designed with fluent builders and immutability.\n* Performs asynchronous calls so that your application is not influenced by the Matomo endpoint speed\n* Easy to use\n* Well documented with Javadoc\n* Ensures correct values are sent to Matomo Tracking API\n* Includes debug logging\n* Minimal dependencies (only SLF4J and JSR-305 annotations)\n* Easy to integrate in frameworks, e.g. Spring: Just create the MatomoTracker Spring bean and use it in other beans\n\n## :wrench: Usage\n\nInclude the dependency using Maven\n\n```xml\n\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.drjekyll\u003c/groupId\u003e\n  \u003cartifactId\u003ematomo-tracker\u003c/artifactId\u003e\n  \u003cversion\u003e1.2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nor Gradle with Groovy DSL:\n\n```groovy\nimplementation 'org.drjekyll:matomo-tracker:1.2.0'\n```\n\nor Gradle with Kotlin DSL:\n\n```kotlin\nimplementation(\"org.drjekyll:matomo-tracker:1.2.0\")\n```\n\nRun your build tool and add the tracker like in the following example:\n\n```java\n\nTrackerConfiguration config = TrackerConfiguration.builder()\n  .apiEndpoint(URI.create(\"https://your-domain.net/matomo/matomo.php\"))\n  .defaultSiteId(42) // if not explicitly specified by action\n  .build();\n\n// Prepare the tracker (stateless - can be used for multiple actions)\nMatomoTracker tracker = new MatomoTracker(config);\n\n// Track an action\nCompletableFuture\u003cVoid\u003e future = tracker.track(Action.builder()\n  .name(\"User Profile / Upload Profile Picture\")\n  .url(\"https://your-domain.net/user/profile/picture\")\n  .visitorId(VisitorId.fromHash(\"some@email-adress.org\".hashCode()))\n  // ...\n.build());\n\n// If you want to ensure the request has been handled:\nif(future.isCompletedExceptionally()){\n  // log, throw, ...\n}\n```\n\nThis example sends a request to a Matomo endpoint. Usually many more parameters should be set.\n\n## :gear: Tracker Parameters\n\nThe Matomo Tracker currently supports the following builder methods:\n\n* `.apiEndpoint(...)` An `URI` object that points to the Matomo Tracking API endpoint of your Matomo installation. Must be set.\n* `.defaultSiteId(...)` If you provide a default site id, it will be taken if the action does not contain a site id.\n* `.defaultTokenAuth(...)` If you provide a default token auth, it will be taken if the action does not contain a token\n  auth.\n* `.delay(...)` The duration on how long the tracker collects actions until they will be sent out as a bulk request.\n  Default: 1 seconds\n* `.enabled(...)` The tracker is enabled per default. You can disable it per configuration with this flag.\n* `.logFailedTracking(...)` Will send errors to the log if the Matomo Tracking API responds with an errornous HTTP code\n* `.connectTimeout(...)` allows you to change the default connection timeout of 10 seconds. 0 is\n  interpreted as infinite, null uses the system default\n* `.socketTimeout(...)` allows you to change the default socket timeout of 10 seconds. 0 is\n  interpreted as infinite, null uses the system default\n* `.userAgent(...)` used by the request made to the endpoint is `MatomoJavaClient` per default. You can change it by using this builder method.\n* `.proxyHost(...)` The hostname or IP address of an optional HTTP proxy. `proxyPort` must be\n  configured as well\n* `.proxyPort(...)` The port of an HTTP proxy. `proxyHost` must be configured as well.\n* `.proxyUserName(...)` If the HTTP proxy requires a user name for basic authentication, it can be\n  configured with this method. Proxy host, port and password must also be set.\n* `.proxyPassword(...)` The corresponding password for the basic auth proxy user. The proxy host,\n  port and user name must be set as well.\n\n## :sunglasses: Development\n\nTo build and locally install the library and run the tests, just call\n\n    mvn install\n\n## :handshake: Contributing\n\nPlease read [the contribution document](CONTRIBUTING.md) for details on our code of conduct, and the\nprocess for submitting pull requests to us.\n\n## :notebook: Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see\nthe [tags on this repository](https://github.com/dheid/matomo-tracker/tags).\n\n## :scroll: License\n\nThis project is licensed under the LGPL License - see the [license](LICENSE) file for details.\n\n## :loudspeaker: Release Notes\n\n### 1.2.0\n\n`Country.fromLanguageRanges` now checks whether ranges are empty on extraction of country from language ranges.\n\n### 1.1.5\n\nDependency updates\n\n### 1.1.4\n\nRequests will be sent as bulk requests now. The tracker waits a configurable duration (default: 1 second) until it sends\nout the collected requests.\n\n### 1.0.3\n\nAllow to enable connection error logging\n\n### 1.0.2\n\nFirst public version\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdheid%2Fmatomo-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdheid%2Fmatomo-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdheid%2Fmatomo-tracker/lists"}