Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Piwik Laravel Package

robbrazier/piwik

Laravel package that integrates the Piwik (Matomo) analytics API into your app, providing a simple facade to track visits and query reports, stats, and metrics without writing raw API calls.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Analytics stack selection (build vs. buy vs. self-host): Informs the decision between GA4, Plausible, PostHog, and self-hosted Matomo. If privacy/GDPR posture is a differentiator or a procurement requirement, a Matomo-backed path is much easier to defend than shipping Google tags.
  • Server-side event tracking for conversion-critical flows: Deciding whether order completions, signups, and trial starts are tracked from the browser (blocked by ad blockers, ITP/ETP) or from Laravel server-side. This package is the cheapest way to test whether server-side tracking improves measurement coverage before investing in a CDP or a commercial pipeline.
  • In-product reporting / white-label dashboards: Whether to surface traffic and campaign reports inside an admin panel or a customer-facing dashboard, versus sending users to a separate Matomo instance. The reporting API wrapper shortens the "can we show this in-app?" spike considerably.
  • Device and geography reporting scope: The 4.2.0 release adds DevicesDetection and UserCountry modules, so device-type and visitor-country breakdowns are now available in-app without dropping to raw Reporting API calls. This nudges the build-vs-buy needle slightly on "do we need a BI tool for basic segmentation?" — for simple device/geo slices, probably not.
  • Marketing attribution roadmap: Whether to build UTM/campaign attribution on top of an existing self-hosted instance versus buying an attribution tool. This constrains scope: Matomo gives you the raw dimensions, not the modeled attribution.
  • Consent and data-residency architecture: Supports the decision to keep analytics data in a region/on infrastructure you control, which is often the gating requirement in regulated deals.
  • De-prioritization signal (still applies, with a caveat): The 4.2.0 release is a positive maintenance signal — new modules from an outside contributor, plus tests and doc updates — after a long quiet period since the 2023 release. But it remains a ~110-star package with no dependent packages and no formal support commitment. Treat it as a reversible, version-pinned spike rather than a platform bet. The release moves it from "possibly abandoned" to "lightly maintained by volunteers" — not to "strategic dependency."

When to Consider This Package

Consider it when:

  • You already operate a self-hosted Matomo (formerly Piwik) instance — the wrapper is only useful against a real endpoint you own.
  • You need server-side tracking calls from Laravel (HTTP Tracking API) for events ad blockers would otherwise swallow, and you want to avoid hand-rolling an HTTP client.
  • You need programmatic access to the Reporting API inside a Laravel app — embedded reports, scheduled exports, internal dashboards — and you want a service-provider-bound client rather than raw Guzzle calls everywhere.
  • You specifically need device-detection or visitor-country breakdowns in-app; 4.2.0 adds first-class modules for these (getUserCountry, device reports), which previously required hand-rolled API calls.
  • You want a thin, MIT-licensed, easily removable dependency for a time-boxed spike or internal tool, with no commercial contract.
  • Your Laravel version is within the range the 4.2.0 release supports — verify this explicitly, as the release notes do not state the supported range.

Look elsewhere when:

  • Greenfield or long-lived production work. Despite the 4.2.0 release, the package still carries the pre-2018 "Piwik" name, has no dependent packages, and has an irregular release cadence. Prefer matomo-org/matomo-php-tracker directly (framework-agnostic, actively maintained) or a current Laravel wrapper, and wrap it behind your own interface.
  • You only need the JavaScript snippet. That is a Blade partial, not a package. Do not add a dependency for a <script> tag.
  • You are standardizing on GA4, Plausible, PostHog, or a warehouse-native tool. Nothing here transfers.
  • You need typed DTOs, first-class testing fakes, or Laravel 11/12 support — expect to fork or write adapters.
  • You need reporting modules beyond what's wrapped. 4.2.0 covers DevicesDetection and UserCountry in addition to the existing surface, but coverage is still partial: check the specific Reporting API methods you need are wrapped before committing. Contributions arrive piecemeal, so gaps should be expected.
  • You need modeled attribution, funnels, or experimentation. Matomo reports are descriptive; this wrapper exposes them, it doesn't improve them.

Adoption criteria in one line: self-hosted Matomo already in place + a bounded server-side tracking or reporting need (device/geo segmentation now included) + willingness to pin the version and own a fork if it breaks.

How to Pitch It (Stakeholders)

For executives: This is a small, free, MIT-licensed connector that lets our Laravel application talk to a Matomo analytics server we host ourselves. It supports one strategic option: keeping product and marketing analytics on infrastructure we control, which strengthens our data-residency and consent story in enterprise and EU deals, and reduces reliance on third-party ad-tech. The latest release (4.2.0) added device and visitor-country reporting modules, meaning we can now show more useful in-product reports without buying a BI tool. The financial exposure is negligible — no license fee, no vendor contract, roughly a day of integration — and it is easy to remove. The caveat is that the package is still a thin, volunteer-maintained wrapper with an irregular release cadence. I would fund a short spike, not a roadmap item.

For engineering: A service-provider-bound client for Matomo's Tracking and Reporting HTTP APIs — convenient, but a convenience wrapper, not infrastructure. Release 4.2.0 adds DevicesDetection and UserCountry modules (including getUserCountry), with tests and doc updates from an outside contributor; that's a genuine maintenance improvement over the prior 2023 baseline, but the cadence is still irregular and there is no dependent ecosystem to signal health. Plan for: pinning the version, isolating it behind our own AnalyticsClient interface so it's swappable, validating the supported Laravel/PHP range from composer.json rather than the release notes, and expecting to fork or drop to matomo-org/matomo-php-tracker if Laravel compatibility breaks. Note the 4.2.0 fixes removed idSite/period parameters from methods that don't support them — if we were calling those methods with those arguments, check for signature changes. Effort is small; the design constraint that matters is the abstraction boundary, not the package choice.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings