Google Tag Manager - v1.0.0

Requirements

Runtime

  • PHP 8.2 or newer
  • Laravel 10.x, 11.x, 12.x, or 13.x (illuminate/support ^10.0|^11.0|^12.0|^13.0)
  • artisanpack-ui/core ^1.0 — pulled in automatically
  • artisanpack-ui/google ^1.0 — pulled in automatically. Handles OAuth, token storage, and consent

Optional peer packages

The package auto-detects these at runtime and skips the relevant hooks when they're absent.

Package Version Enables
livewire/livewire ^3.6 <livewire:google-tag-manager::container-overview /> and <livewire:google-tag-manager::tag-list /> components
artisanpack-ui/cms-framework any version exposing the AdminWidgetInterface contract CMS Framework Widgets
artisanpack-ui/livewire-ui-components ^1.0 x-artisanpack-* components used inside the shipped Blade views (optional — the views degrade gracefully)

Development

For contributing to the package itself:

  • Pest ^3.8|^4.0
  • Orchestra Testbench ^10.2|^11.0
  • Laravel Pint ^1.26
  • PHP-CS-Fixer ^3.75
  • ArtisanPack UI code-style / code-style-pint

Install with composer install in the package root.

Google Cloud requirements

  • A Google Cloud project with an OAuth 2.0 client ID (Web application type) — configured on the base artisanpack-ui/google package
  • The Tag Manager API enabled under APIs & Services → Library. This is separate from adding the scope on the consent screen — both are required, or every API request will 403
  • The https://www.googleapis.com/auth/tagmanager.readonly scope added on the OAuth consent screen. The package contributes this scope to the shared scope registry automatically, but Google's consent screen must also declare it
  • A Google Tag Manager container the connected user has read access to

What is not required

  • No web-worker or service-worker runtime — the client-side snippet is a plain <script> tag.
  • No custom database tables. This package uses the base package's google_connections table and does not add its own.
  • No queue worker. All API calls are synchronous and cached; no background jobs are dispatched.