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

Laravel Analytics Event Tracking Laravel Package

protonemedia/laravel-analytics-event-tracking

Laravel Analytics Event Tracking lets you track user events and page views in your Laravel app, storing them locally or sending them to Google Analytics. Simple configuration, middleware support, and a clean API for logging custom events.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Closing the server-side measurement gap. The core product question is whether high-value conversion events (signup, trial start, activation, checkout, subscription changes) get a second, browser-independent measurement path. Client-side gtag loses events to ad blockers, ITP/ETP, consent rejections, and JS failures — precisely the events that drive decisions. A Laravel-native server-side sender turns "how many trials did we actually start?" into a decision-grade number that feeds roadmap prioritization, funnel diagnosis, and experiment readouts. Decision enabled: invest in a server-side pipeline for the 5–10 events that actually drive decisions, or keep trusting client-side data we know undercounts?

  • Build vs. buy vs. fork. This is the sharpest PM lens. The package is MIT, small, and exposes a simple facade, so the realistic framing is not "add a dependency" but "adopt a small, readable codebase we will end up owning." That reframes the comparison to: this package's source (plus maintenance burden) versus a bespoke Measurement Protocol client (mostly one-time HTTP plumbing). Because it is archived (last release Feb 2023, zero dependents), the honest decision is fork-or-reference, not depend. If server-side analytics is commodity plumbing — not your differentiator — forking a 242-star MIT repo is cheaper than greenfield and carries no vendor contract.

  • Event taxonomy ownership and PII guardrails. Centralizing analytics calls behind a facade and queued jobs makes the event schema reviewable code rather than scattered snippets in Blade templates and marketing tags. That gives product a lever to enforce naming conventions, version event definitions, and — critically — keep PII out of third-party analytics. Decision enabled: can we govern what we send to Google as a reviewed, tested artifact?

  • GA4 sequencing — the gating question. Before any of the above matters, confirm whether this package targets Universal Analytics (sunset July 2023) or the GA4 Measurement Protocol v2. If it is UA-only, it is a dead end and the build-vs-fork calculus collapses to "build." Treat this as a prerequisite, not a footnote: Measurement Protocol accepts events and silently discards invalid ones, so a mismatch fails without errors — the worst failure mode for a metrics initiative.

  • Use cases that fit: activation/onboarding events, backend-confirmed purchases and refunds, subscription lifecycle (trial→paid, cancel, churn), and integration-side events (webhook received, job completed) that never touch a browser.

When to Consider This Package

Consider it (as a reference or fork) when:

  • You are on Laravel 10 / PHP 8.1+ (the 1.6.0 baseline) and want server-side events behind a facade your team already understands.
  • Google Analytics is your analytics backbone and you need reliable server-side events — not a vendor-neutral pipeline.
  • The capability is commodity plumbing and your team will own a small fork rather than depend on an unmaintained package — a reasonable trade for MIT code with a clean, testable API and queue support.
  • You value testability (facade fakes, queued jobs) and want analytics assertions in CI.
  • The opportunity signal (8.52) matches a real gap in your stack: few maintained Laravel-native server-side senders exist, so internalizing this one closes a known hole.

Look elsewhere, or defer, when:

  • The archive status is disqualifying. If your org requires a maintained dependency, a Laravel 11/12 upgrade path, or a support SLA, this fails that bar — pinning a 2023 archive is a liability, not a solution.
  • You need GA4 Measurement Protocol specifically and this package only speaks UA — the decision becomes build.
  • You need vendor-neutral destinations (Segment, RudderStack, PostHog, Snowplow) rather than GA-only.
  • You have heavy consent/PII/governance requirements — a thin sender won't give you consent gating, event allow-lists, or data-residency controls; you will outgrow it fast.
  • Zero dependents is a caution, not a selling point: there is no community to inherit fixes. Budget fork maintenance explicitly or don't start.

How to Pitch It (Stakeholders)

For executives: We have a data-quality problem in the events that drive decisions — client-side tracking undercounts conversions because of ad blockers, privacy tooling, and consent rejections. This package is a proven, MIT-licensed pattern for sending those events server-side from our Laravel backend, making funnel numbers trustworthy at essentially no licensing cost. The material caveat: upstream is archived, so the realistic proposal is to fork a small, readable codebase and own it — not to take on a vendor dependency. That is a bounded engineering commitment (roughly a sprint-day of fork-and-harden, not a new platform) in exchange for decision-grade measurement. The buy-vs-build call is close; for commodity plumbing, the fork is the cheaper side.

For engineering: Treat this as a reference implementation to fork, not a package to install. Confirm the GA4 Measurement Protocol target first — if it is Universal Analytics-era, we stop and build. If viable: fork under our namespace, vendor and pin the code, and own the upgrade path to whatever Laravel we run (the 1.6.0 baseline is PHP 8.1+ / Laravel 10 — verify no dead constraints before adopting). Wrap it behind an internal AnalyticsGateway interface so every call site depends on our contract and the package stays swappable — the interface, not the package, is the deliverable. Keep the facade-plus-queued-jobs shape; it is the right seam for fakes and CI assertions. Add an internal event schema and PII allow-list at the gateway layer so product can review what leaves our servers. Budget the fork's maintenance as an explicit line item with a named owner and a dated replacement trigger — nobody upstream will fix it for us.

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