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

Tag Bag Bundle Laravel Package

setono/tag-bag-bundle

Symfony bundle for centralized tag management. Collect and render analytics, tracking, and marketing tags such as Google Analytics or Facebook Pixel from one place in your templates, keeping scripts organized and easy to control.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for tag/script delivery: Decide whether to hand-roll a tag collector (registering <script>, <meta>, <link>, and JSON-LD tags from controllers, listeners, service providers, and view composers) or adopt this bundle. The bundle wraps setono/tag-bag, so the underlying concept is reusable even if the framework integration is thin and Symfony-specific.
  • Platform baseline decision (new in v3.3.0): The release sets a hard floor of PHP >= 8.2 and Symfony ^6.4 || ^7.x. This turns adoption into a platform question: if we are on PHP 8.1 or Symfony 5.x/6.0–6.3, the choice is to fund a platform upgrade, pin v3.2.0, or defer. If we are already on PHP 8.2+ and Symfony 6.4 LTS or 7.x, this is a zero-friction maintenance upgrade.
  • Roadmap for marketing and analytics plumbing: Supports roadmap work such as consent-aware script loading, GTM/dataLayer injection, structured data, hreflang, preload/prefetch hints, and per-page SEO meta. Each becomes a “tag provider” instead of scattered template edits.
  • Architecture decision: centralize head/body tag rendering: Moves tag ownership from templates into services/listeners, making tags testable, orderable, deduplicable, and environment-aware (e.g., analytics only in production).
  • Stack-fit decision: This remains Symfony-specific, not Laravel. If the product is Laravel, the decision is “port the concept or find a Laravel equivalent,” not “install this.” The v3.3.0 bump does not change that; it only confirms the package tracks modern Symfony. For Laravel, setono/tag-bag itself (framework-agnostic) plus a small service provider is the realistic reuse path, and that path now also assumes PHP 8.2+.
  • Vendor/exit decision: Because the bundle is thin and MIT-licensed, a PM can approve a pilot with a clear exit: abstract behind an internal TagRenderer interface and swap implementations later. v3.3.0 is a maintenance release with no API additions, which keeps the exit option intact and cheap.
  • Use cases: ecommerce tracking snippets, multi-store/multi-tenant tag variation, A/B test scripts, cookie-consent gating, affiliate/pixel management, and structured data for product/checkout pages.

When to Consider This Package

Consider it when:

  • You run a Symfony 6.4 LTS or 7.x application on PHP 8.2+ with Twig/server-rendered pages and need to collect tags from multiple layers. Earlier Symfony versions are no longer supported as of v3.3.0.
  • You need deterministic rendering, priority ordering, deduplication, and deferred output—not just “dump a block in base.html.twig.”
  • You want a small, MIT-licensed convention to replace custom tag-collection code and reduce template coupling.
  • You are comfortable with a small ecosystem and can own the integration risk; the bundle is thin enough to fork or replace.
  • You need server-side tag control for compliance (e.g., only output tags after consent) and want that logic in code, not in a marketer-facing tool.
  • You can absorb a platform upgrade cadence: v3.3.0 signals the maintainer will drop EOL PHP/Symfony versions on minor releases, so plan to stay within one Symfony major of current.

Look elsewhere when:

  • Your stack is Laravel or another non-Symfony PHP framework—this bundle will not drop in; evaluate the framework-agnostic setono/tag-bag or build a small service.
  • You are pinned to PHP 8.1 or Symfony 5.x/6.0–6.3 and cannot move soon; you would be adopting an unsupported branch (v3.2.0) with no forward path except a platform upgrade.
  • You need a marketer-facing tag manager UI, audit trail, or no-code governance—this is a developer library, not a GTM replacement.
  • You require strong community support, broad adoption, or long-term vendor guarantees—5 stars and 0 dependents is a real signal; treat it as early-stage/internal-tool maturity.
  • You need advanced client-side consent management, tag sequencing, or third-party integrations out of the box; you will be building that on top.
  • The team cannot accept a single-maintainer dependency without an internal abstraction/fallback.

How to Pitch It (Stakeholders)

Executive summary: This is a small, MIT-licensed Symfony bundle that gives us a clean way to collect and render page tags—scripts, meta, links, structured data—from anywhere in the application. It replaces scattered template edits and custom helpers with a single, testable pipeline. The new v3.3.0 release is a maintenance-only update: no new features, no API changes, but it raises the platform floor to PHP 8.2+ and Symfony 6.4/7.x. Cost stays near zero; the main risks are ecosystem maturity and an explicit platform-version dependency.

For engineering: v3.3.0 integrates setono/tag-bag into Symfony’s container and Twig layer with no API or behavioral changes—it bumps constraints to PHP >=8.2, Symfony ^6.4 || ^7.x, and refreshes dev tooling (code-quality-pack ^3.2). Because the change is constraint-only, the upgrade is low-risk if we are already on PHP 8.2+ and Symfony 6.4 LTS or 7.x; if not, pin v3.2.0 and schedule the platform bump. Note the maintainer’s pattern: minor releases can drop EOL platforms, so treat the Symfony/PHP baseline as a tracked dependency. The API remains small—register tags/providers, render the bag in the layout—so we can isolate it behind our own interface, pilot it on one surface (e.g., structured data or marketing scripts), and swap it if needed. It also makes tag ordering, deduplication, and environment/consent gating explicit.

For product/finance: Approve a time-boxed pilot, not a platform bet. It reduces custom code and merge conflicts in base.html.twig, and it makes analytics/consent changes code-reviewable. The upgrade itself carries no migration cost beyond confirming our PHP/Symfony versions—no rewrite, no data migration, no re-testing of tag behavior. Do not assume community support: 5 stars, 0 dependents, and a single-vendor maintenance model mean we should budget an exit path. If the pilot shows value, keep it behind an internal abstraction; if not, remove it with limited sunk cost. If we are on an older Symfony, treat the platform upgrade as the real cost item and decide whether the tag pipeline alone justifies it—or defer to v3.2.0 until another driver forces the upgrade.

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.
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
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route