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

Analytics Laravel Package

andreaselia/analytics

andreaselia/analytics is a lightweight, privacy-friendly analytics package for Laravel. It tracks page views, unique visitors, referrers, browsers, devices, and countries in your own database, with a built-in dashboard for quick insights and no external service required.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Whether to instrument analytics at all in the MVP. For an early-stage Laravel product, an internal tool, or a docs/marketing site, this package answers "do we need analytics yet?" with a low-cost yes: one middleware and a migration gets you page views, sessions, and referral sources without a new vendor, a JS tag, or a consent-banner redesign.
  • Build vs. buy vs. skip. It sits between "build our own analytics pipeline" (weeks of engineering, ongoing ownership) and "buy GA4/Plausible/Fathom/PostHog" (new subprocessor, new contract, new JS surface). The decision it unlocks is "adopt small OSS now, revisit at a traffic or question-complexity threshold."
  • Roadmap and content prioritization. Top pages, referrers, and session trends support concrete calls: which landing pages convert attention into signups, which docs pages justify more investment, which acquisition channels deserve budget, which features get discovered vs. ignored.
  • Privacy and compliance posture. Data stays in our own database, first-party, no third-party cookie dependency. That directly supports a decision to avoid a cookie-consent vendor, avoid a DPA/subprocessor review, and keep the GDPR story simple — a product, legal, and sales-enablement decision, not just a technical one.
  • Pricing and packaging for a Laravel SaaS. Traffic-source and page-level data feed decisions about which plan pages, comparison pages, and CTAs earn their keep — the inputs to packaging experiments.
  • Cost decisions at low volume. Per-event SaaS pricing is a real line item once you add product analytics, session replay, and a warehouse. This defers that spend until volume or question depth justifies it.
  • Internal reporting without a BI project. A dashboard route inside the admin panel gives founders/PM/marketing a shared source of truth without standing up Metabase or exporting CSVs.
  • A bounded "no" decision. The assessment itself documents why we are not building an in-house tracking service: this package plus a retention job covers the 80% case, and the remaining 20% is a buy decision later.

When to Consider This Package

Adopt when most of these hold:

  • Stack fit: actively maintained Laravel app (10/11/12-era), standard MySQL/Postgres, no unusual tenancy or sharding constraints.
  • Volume: modest traffic — thousands to low hundreds of thousands of page views per month. Single-table pageview storage is fine at that scale; it is not a high-cardinality event store.
  • Question type: you need traffic answers (what pages, from where, on what device), not user-journey answers (funnels, cohorts, retention, experiment lift).
  • Data residency / privacy: you want first-party data in your own DB, no third-party script, and a lighter consent surface.
  • Operational tolerance: the team can own a dependency with ~200 GitHub stars, a single maintainer, and effectively zero downstream dependents — meaning you pin the version, read the source, and are prepared to fork or replace.
  • Access control: a single-tenant or role-gated admin dashboard is acceptable; you do not need per-customer analytics segmentation out of the box.

Look elsewhere when any of these are true:

  • Product analytics depth is the requirement — funnels, cohorts, retention curves, A/B test readouts, user-level event streams, session replay. That is PostHog/Amplitude/Mixpanel territory; forcing it here means building a schema on top of a pageview table.
  • Scale or performance sensitivity: millions of views per day, strict p95 latency budgets on the request path, or a need to keep write amplification off the primary database. Consider an async/queue-based collector, ClickHouse-backed tooling, or a hosted service.
  • Attribution and revenue: multi-touch attribution, ad-platform ROI, ecommerce conversion values, warehouse joins with billing data.
  • Vendor-risk intolerance: if procurement or security review requires an SLA, support contract, SOC 2, or a maintained security-response process, a 198-star single-maintainer package will not clear the bar. Self-hosted Plausible or Fathom is the nearest comparable with more institutional weight.
  • Bot filtering, IP anonymization, and retention are hard requirements — verify the package's defaults first; you may end up implementing and owning those behaviors regardless, which changes the buy-vs-build math.

How to Pitch It (Stakeholders)

To executives: We can get first-party traffic visibility for roughly a day of engineering and zero license or vendor cost, with no customer data leaving our infrastructure and no new privacy review. It's reversible — if it doesn't earn its keep, we delete a middleware and a table. The trade is depth: it tells us what is happening on the site, not why individual users do what they do.

To engineering: One composer require, a published migration and config, and a middleware on the web group. Data lands in our existing database, the dashboard is a guarded route in the admin panel. The real work items are the ones we'd own anyway: indexes on the pageview table, a scheduled pruning/retention job, and confirming IP handling and bot filtering meet our privacy stance. Pin the version — small maintainer base — and treat it as forkable code, not an oracle.

The ask: a one-day spike on a staging branch to validate query cost against realistic data volume, plus a short follow-up review at 90 days. Decision rule up front: if we need user-level journeys or exceed roughly a million page views a month, we graduate to PostHog or self-hosted Plausible rather than extending this package.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib