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

setono/tag-bag

Setono Tag Bag is a PHP library for collecting and rendering HTML tags like scripts, meta, and link elements. Add tags from anywhere in your code and output them later, making it ideal for Symfony apps that need clean, centralized head and body tag management.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Tag/analytics instrumentation strategy: Tag Bag is an in-app tag container for Symfony/Laravel-style PHP applications, letting product teams define, queue, and render marketing/analytics tags (Google Analytics, GTM, Meta Pixel, conversion pixels) from application code rather than hardcoding snippets in templates.
  • Build vs. buy: Reduces the incentive to build a bespoke tag-rendering layer or to adopt a heavyweight client-side tag manager for every environment; the package handles tag ordering, rendering, and (depending on version) consent/queue semantics.
  • Roadmap input: Relevant when planning consent-management, server-side tagging, or multi-tenant analytics rollouts — the tag abstraction becomes the single place to enforce "no tag fires without consent."
  • Use cases: e-commerce checkout/conversion tracking, per-page/per-route tag assignment, A/B-test or campaign pixel injection, and environment-specific tag sets (staging vs. production IDs).

When to Consider This Packag

  • Adopt when: you already run PHP 8.2+ (now mandatory as of v2.5.0), you want programmatic, testable control over which tags render on which pages, and you prefer tags defined in code (versioned, reviewable, diffable) over tags configured in a third-party UI.
  • Adopt when: you need a thin abstraction that a backend team owns, and you want static analysis (PHPStan) and a shared code-quality baseline enforced in your dependency tree — v2.5.0 tightens both.
  • Look elsewhere when: you are on PHP 8.0/8.1 or older — v2.5.0 is a breaking platform requirement and will block upgrades until the runtime is raised.
  • Look elsewhere when: your marketing team needs self-service tag changes without a deploy (a hosted tag manager such as GTM is a better fit), or when you need a fully managed consent-management platform with legal/compliance guarantees rather than a rendering library.
  • Caution when: the package is not Laravel-first — verify service-provider/config integration and Laravel version compatibility against your app skeleton before committing; the changelog references Symfony-ecosystem tooling (loevgaard/code-quality-pack), so Laravel ergonomics may require glue code.

How to Pitch It (Stakeholders)

For executives: Tag Bag is a small, mature open-source PHP library that centralizes how marketing and analytics tags get injected into our product. It replaces scattered hardcoded snippets with one reviewable, testable code path — which lowers the risk of misfired pixels, duplicate conversion counting, and tags leaking into environments where they shouldn't. Cost is zero in licensing; the investment is engineering time.

For engineering: v2.5.0 is a maintenance release with a hard platform bump — PHP 8.2+ is now required, alongside upgraded static analysis (PHPStan) and a shared code-quality pack (3.1). There are no new features and no API changes called out, so integration risk is low if we're already on 8.2. Treat this as a dependency-hygiene decision, not a capability decision: confirm our runtime matrix, then adopt to keep static analysis and coding standards aligned with the rest of the PHP ecosystem. If we're pinned below 8.2, defer and track the runtime upgrade as the blocker.

Recommendation: Low-risk, low-effort adoption for teams on PHP 8.2+ that want code-owned tag management. Validate Laravel integration and consent requirements before rollout; do not position it as a replacement for a marketing-owned tag manager.

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