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 Tagmanager Laravel Package

label84/laravel-tagmanager

A lightweight Laravel package for Google Tag Manager integration. Configure your GTM container, inject the required scripts, and push data layer events from PHP or Blade with a clean, simple API - no manual snippet handling.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Analytics instrumentation strategy: whether to standardize GTM/GA4 dataLayer event pushes in-app (server-side PHP) versus relying on front-end snippets managed by marketing — this package is the "instrument once in Laravel, let GTM own the tags" option.
  • Feature-level tracking coverage: shipping e-commerce, signup, and funnel events (add_to_cart, purchase, begin_checkout, custom conversions) as part of a feature's definition of done, with the TagManager facade giving a single, testable call site.
  • Roadmap sequencing for measurement work: the v1.5.3 merge()-on-array fix removes a known sharp edge when composing event payloads from multiple sources (e.g. base product data + user context + promo attributes), which de-risks scheduling analytics work alongside feature work rather than as a separate hardening sprint.
  • Build vs. buy: reinforces "buy/compose" — a small, MIT-licensed, single-purpose package instead of building a bespoke dataLayer abstraction, keeping effort on product differentiators.
  • Experimentation/attribution readiness: consistent dataLayer payloads are the prerequisite for A/B test targeting, audience building, and GA4 conversion imports — a PM-level dependency for growth initiatives.
  • Not a decision driver for: server-side tagging (sGTM), consent management, or warehouse-native analytics — this package is the client-side dataLayer bridge, not the pipeline.

When to Consider This Package

Adopt when:

  • The stack is Laravel/PHP and marketing operates tags through Google Tag Manager (GTM container owned by marketing, not engineering).
  • You need to emit e-commerce and conversion events from server-rendered flows (checkout, registration, subscription) where front-end JS alone is unreliable.
  • You want a thin, auditable surface: a facade that pushes arrays into dataLayer, with merge() for combining payload fragments — trivial to unit test and to review in PRs.
  • You value a minimal dependency: single maintainer, small codebase, MIT license, semantic versioning with patch releases like v1.5.3 landing promptly.
  • Payloads are assembled from multiple sources and you need the merge semantics from this release to behave predictably on array inputs.

Look elsewhere when:

  • You are not on Laravel, or you need a framework-agnostic/TypeScript-first analytics layer.
  • You require vendor-backed SLAs, guaranteed security patching, or a support contract — this is a community package with a bus-factor of one; plan for pinning and a fork/abandonment contingency.
  • You need server-side GTM, Measurement Protocol, consent-mode enforcement, or PII scrubbing built in — those must be added (and governed) separately.
  • Your event schema is large and typed; you'd likely want a schema/validation layer (e.g. generated DTOs) rather than raw arrays, in which case wrap or replace this package.
  • Compliance-heavy contexts where every outbound data payload must be auditable end-to-end — you'll need additional review and likely a wrapper façade of your own.

How to Pitch It (Stakeholders)

To executives: This is a small, free, open-source Laravel library that lets our application tell Google Tag Manager what happened — purchases, signups, funnel steps — using one consistent, code-reviewed mechanism. It replaces ad-hoc tracking snippets scattered across templates with a single, testable integration point, which means faster analytics changes, fewer "the conversion pixel broke" incidents, and less engineering time spent on marketing requests. The v1.5.3 patch fixes a bug where combining event data from multiple sources could silently fail — precisely the kind of silent tracking gap that distorts reporting and spend decisions. Cost is effectively zero; risk is manageable with version pinning.

To engineering: Adopt Label84/laravel-tagmanager as the single sanctioned way to push to dataLayer. Rationale: MIT license, tiny dependency surface, a TagManager facade that makes tracking calls explicit and greppable, and merge() for composing payloads without array-merge boilerplate. Note v1.5.3 corrects merge() behavior when passed an array — worth a quick regression test on any multi-source payload construction (product data + user context + promo). Caveats to own deliberately: single maintainer and low release cadence, so pin the version, add a thin internal wrapper if our event schema stabilizes, and keep an escape hatch — the package is small enough to vendor or reimplement in an afternoon. Keep consent handling and PII hygiene outside this package and in our own layer; do not let raw user identifiers flow into the dataLayer payloads.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums