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

Matomo Php Tracker Laravel Package

matomo/matomo-php-tracker

Official PHP client for Matomo Analytics that enables server-side tracking of page views, events, goals, ecommerce, and custom dimensions from PHP applications. Supports bulk requests, visitor attribution, and privacy-friendly analytics without relying on client-side JavaScript.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Analytics architecture: server-side vs. client-side tracking. This package lets backend code (Laravel jobs, controllers, console commands) send events straight to a Matomo Tracking API endpoint. That answers a real product question — "which business events can we trust the browser to report?" — with an answer that doesn't depend on ad blockers, ITP, or a JS bundle that may never load.
  • Consent and privacy roadmap. If you're in the EU/UK or selling to privacy-sensitive buyers, a first-party, self-hosted Matomo plus server-side tracking is a defensible posture: no third-party data processor for core analytics, cookie-free event tracking possible for non-identifying events. This is a roadmap-enabling decision, not just an implementation detail.
  • Revenue-critical instrumentation. Checkout completions, subscription upgrades, refunds, trial starts, API usage, background job outcomes — events that must be recorded exactly once and must not be lost to a blocked script. Server-side emission turns these from "best effort" into "system of record adjacent."
  • Build vs. buy for the transport layer. The alternative is a hand-rolled Guzzle wrapper around Matomo's HTTP Tracking API. Writing it is a day; maintaining correct payload structure, bulk requests, ecommerce item arrays, custom dimensions, visitor ID/cookie handling, and retry/fallback behavior is the recurring cost. Adopting an SDK shifts that to a maintained dependency.
  • Use cases worth scoping now: Laravel e-commerce funnel and order attribution; B2B SaaS activation and feature-adoption events fired from the backend; offline/conversion tracking for lead-gen forms; internal product telemetry where you want product analytics and business metrics in one warehouse; migrations off GA4 where the team wants a self-hosted equivalent.
  • Vendor and lock-in judgment. Choosing this package is a soft commitment to Matomo. That's acceptable if Matomo is already the analytics platform of record; it's a poor entry point if the analytics vendor decision is still open.

When to Consider This Package

Adopt when all of these hold:

  • Matomo (cloud or self-hosted) is already, or is about to become, the analytics platform of record.
  • You have events that originate server-side and cannot be reliably captured by the JS tracker — payments, provisioning, billing changes, async jobs.
  • Your stack is PHP/Laravel and you want a dependency the platform team can read in an afternoon, with no vendor SDK or data-egress contract attached.
  • You're comfortable owning the integration layer: a Laravel service provider, a config file, a thin AnalyticsTracker facade, and an environment-aware no-op for local/test.

Look elsewhere when:

  • You need pageview and session analytics. Server-side tracking is a complement, not a replacement. You still need the Matomo JS tracker (or Matomo Tag Manager) for engagement metrics. Don't let this package be sold internally as "the analytics integration."
  • You're not on Matomo. GA4 Measurement Protocol, Segment/RudderStack, or Snowplow are the parallel choices; don't back into Matomo because a PHP client was convenient.
  • You need dashboards or reporting. This is a write-only client. Reading Matomo reports means the Reporting API and a different library.
  • Your team isn't PHP-first. The package is framework-agnostic, so a polyglot stack will end up with several tracking clients and divergent event schemas.
  • Governance is strict. Due diligence signals here are modest — roughly 200 GitHub stars and no downstream dependents — so you're relying on Matomo maintaining a first-party client for its own API rather than on community adoption. That's usually fine for a thin transport client, but it belongs in your dependency review, with a documented fallback (direct HTTP calls) if the package stalls.
  • You need guaranteed delivery. This client does not give you durable queues or exactly-once semantics. If event loss is unacceptable, you need your own queue and retry layer around it — budget for that explicitly rather than assuming the SDK covers it.

How to Pitch It (Stakeholders)

To executives: Our conversion and revenue numbers currently depend on a browser script that ad blockers and privacy settings can suppress — meaning we systematically undercount the events we care most about. This package lets our own servers report those events directly to our analytics platform, so order and subscription data is captured at the source. It's a small, permissively licensed (BSD-3), first-party client from the Matomo project; it is not a new vendor, not a new data processor, and not a data-egress decision. The investment is roughly a sprint-week of integration plus a documented event schema — the value is trustworthy funnel and revenue reporting, and a defensible privacy posture for EU customers.

To engineering: Framework-agnostic PHP client for the Matomo Tracking API, so we wrap it once behind a service provider and an AnalyticsTracker interface — nothing else in the codebase touches it. That gives us testability (no-op or fake in local/CI), a single place to enforce event naming, and a clean exit if we ever swap transports. It handles payload construction, bulk requests, ecommerce and custom-dimension formatting — the fiddly parts we'd otherwise reimplement and get subtly wrong. What it does not handle: delivery guarantees, queueing, retries, schema governance, or consent enforcement. Those stay with us, and we should scope them in the same ticket rather than discovering them in production.

To the analytics/GTM owner: This supplements, not replaces, the JS tracker — engagement metrics still come from the browser. What changes is that conversion-class events become server-authoritative, which means fewer discrepancies between our dashboards and finance, and a much smaller unexplained-traffic bucket. We'll need one working session to agree the event taxonomy and visitor-stitching approach (user ID vs. cookie-based) before anyone writes code.

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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package