weblizards/tag-management-bundle

Re-introduces the 'Tag and Snippet Management' feature which was deprecated in Pimcore 6.x and removed in Pimcore 10.

Maintainers

Package info

github.com/weblizards-gmbh/tag-management-bundle

Type:pimcore-bundle

pkg:composer/weblizards/tag-management-bundle

Statistics

Installs: 324

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.2.0 2026-05-21 10:34 UTC

This package is auto-updated.

Last update: 2026-05-21 12:03:27 UTC


README

This bundle restores the "Tag & Snippet Management" area that was available in older Pimcore versions and removed later on.

For Pimcore 10 please use the pimcore 10 branch

Features

The bundle allows you to inject HTML tags and snippets into websites based on different rules:

  • URL patterns: output only on matching requests
  • HTTP methods: restrict output to GET, POST, and similar methods
  • Site checks: assign tags to specific Pimcore sites
  • Parameters: check query or request parameters
  • Positioning: insert content at the beginning or end of <head> or <body>, or into CSS-selected target elements
  • Scheduling: define an expiry date per item
  • Editmode control: enable or disable items separately for Pimcore editmode
  • Dynamic parameters: no more fixed 5-field limitation in the admin UI
  • Rename in admin: tags can be renamed safely in the backend

Requirements

  • PHP >= 8.2
  • Pimcore ^11.0

Installation

  1. Require the bundle via Composer:
composer require weblizards/tag-management-bundle
  1. Enable the bundle:
bin/console pimcore:bundle:enable WeblizardsTagManagementBundle
  1. Run the bundle migrations:
bin/console doctrine:migrations:migrate --prefix="Weblizards\\TagManagementBundle"
  1. If present, migrate legacy configuration from var/config/tag-manager.php into the Pimcore SettingsStore:
bin/console weblizards:tag-management:migrate-config-storage --dry-run
bin/console weblizards:tag-management:migrate-config-storage

Optionally remove the legacy file after a successful migration:

bin/console weblizards:tag-management:migrate-config-storage --cleanup-legacy-file

Storage

Current versions persist tag configurations in the Pimcore SettingsStore using a bundle-specific scope. This is the intended Pimcore 11-compatible persistence path.

For existing installations, a read-only fallback to the legacy file var/config/tag-manager.php remains in place during rollout. New or updated entries are persisted in the SettingsStore.

Commands

Disable expired items

To persistently disable expired items:

bin/console weblizards:tag-management:disable-expired-items

This is suitable for a regular cron job.

Normalize legacy date values

If existing data still contains legacy epoch timestamps or inconsistent date formats:

bin/console weblizards:tag-management:migrate-item-dates

Migrate legacy storage into SettingsStore

To migrate the old PHP array file into the SettingsStore:

bin/console weblizards:tag-management:migrate-config-storage --dry-run
bin/console weblizards:tag-management:migrate-config-storage

Useful options:

  • --dry-run: show what would be migrated without writing anything
  • --overwrite: overwrite existing SettingsStore entries
  • --cleanup-legacy-file: remove the old tag-manager.php after a successful migration

Admin Routing

Inside the Pimcore admin, the bundle prefers Routing.generate(...) when a compatible global routing base is available in the current setup. For its own admin endpoints, it also provides an internal fallback to stable bundle paths under /admin/tag-management/....

This keeps the bundle functional even without a hard dependency on a specific JavaScript routing setup.

Development and Testing

The repository contains simple PHP-based regression tests and helper configuration for local development. Additional details can be found in docs/development_testing.md.

Upgrade Notes

When upgrading from older bundle versions, these points are relevant:

  • Tag configurations are now persisted via the SettingsStore.
  • Existing configurations from var/config/tag-manager.php should be migrated using the provided migration command.
  • Legacy key names and older request payloads are still read tolerantly during the transition.
  • Expiry dates are normalized internally to a consistent ISO-8601 UTC format.

License

This bundle is licensed under GPL-3.0-or-later.

Developed by pimcore and further maintained by Weblizards GmbH.