Skip to content

v1.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 12 Jul 19:04
Immutable release. Only release title and notes can be modified.
b319de1

Initial release of the Google Tag Manager integration for the ArtisanPack UI ecosystem. Ships two independent surfaces — a client-side container snippet installer and a server-side Tag Manager API client — either of which can be adopted on its own.

Added

  • Client-side container snippet@gtmSnippet, @gtmSnippetHead, and @gtmSnippetBody Blade directives, plus React (<GtmSnippet />) and Vue equivalents, emit the standard GTM head <script> and body <noscript> fallback with escaped container IDs and safe defaults. Renders nothing when snippet.container_id is empty or snippet.enabled is false, so it's safe to leave in a shared layout across environments.
  • Server-side Tag Manager API clientTagManagerClient wraps the Tag Manager API v2 (accounts, containers, workspaces, tags, triggers, variables, latest version header) with typed DTOs (AccountData, ContainerData, WorkspaceData, TagData, TriggerData, VariableData, ContainerVersionHeaderData), transparent OAuth via the base package's TokenManager, nextPageToken-driven pagination, and a configurable response cache keyed on the connection and endpoint.
  • Container overview surface<livewire:google-tag-manager::container-overview /> plus React and Vue equivalents render container name, public ID, workspace, tag/trigger/variable counts, and the latest published version, backed by ContainerOverviewFetcher and the /google-tag-manager/container-overview HTTP endpoint.
  • Tag list surface<livewire:google-tag-manager::tag-list /> plus React and Vue equivalents render every tag in a workspace with name, type, firing triggers, and status. Client-side sort by any column and pagination, backed by TagListFetcher and the /google-tag-manager/tags HTTP endpoint.
  • CMS framework admin widgetsgoogle-tag-manager-container-overview and google-tag-manager-tag-list register automatically when artisanpack-ui/cms-framework is installed, both guarded behind the view_tag_manager capability. Wrapper classes extend the underlying Livewire components with all-optional mount() signatures so the CMS dashboard can instantiate them by class name.
  • Scope registration — contributes tagmanager.readonly to the artisanpack-ui/google scope registry via the ap.google.scopes filter hook, so consent flows include the Tag Manager read scope automatically.
  • Graceful degradation without the base — the service provider boots regardless of whether artisanpack-ui/google is installed. TagManagerClient::isAvailable() returns false when the base is missing, list methods throw a well-typed BaseNotInstalledException instead of a class-not-found fatal, admin components render an "install the base" prompt, and HTTP endpoints return 501 base_not_installed.
  • GoogleConnectionResolver — shared singleton for looking up the current user's connection; rebind it to override behavior for both Livewire components and both HTTP controllers uniformly (useful for multi-tenant apps).
  • HTTP error contract — controllers return 401 unauthenticated, 409 not_connected, 422 invalid_request, 501 base_not_installed (with a baseInstalled: false flag), and 502 api_error, all consumed by the React/Vue components' error-code branch.
  • Comprehensive documentation — full docs/ tree covering installation, snippet installer, Livewire/React/Vue components, CMS framework widgets, testing, FAQ, and a complete API reference.
  • Laravel 10, 11, 12, and 13 support — CI matrix runs PHP 8.2 / 8.3 / 8.4 against Laravel 12 and 13.