Releases: ArtisanPack-UI/google-tag-manager
Releases · ArtisanPack-UI/google-tag-manager
Release list
v1.0.0
Immutable
release. Only release title and notes can be modified.
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@gtmSnippetBodyBlade 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 whensnippet.container_idis empty orsnippet.enabledis false, so it's safe to leave in a shared layout across environments. - Server-side Tag Manager API client —
TagManagerClientwraps 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'sTokenManager,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 byContainerOverviewFetcherand the/google-tag-manager/container-overviewHTTP 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 byTagListFetcherand the/google-tag-manager/tagsHTTP endpoint. - CMS framework admin widgets —
google-tag-manager-container-overviewandgoogle-tag-manager-tag-listregister automatically whenartisanpack-ui/cms-frameworkis installed, both guarded behind theview_tag_managercapability. Wrapper classes extend the underlying Livewire components with all-optionalmount()signatures so the CMS dashboard can instantiate them by class name. - Scope registration — contributes
tagmanager.readonlyto theartisanpack-ui/googlescope registry via theap.google.scopesfilter 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/googleis installed.TagManagerClient::isAvailable()returnsfalsewhen the base is missing, list methods throw a well-typedBaseNotInstalledExceptioninstead of a class-not-found fatal, admin components render an "install the base" prompt, and HTTP endpoints return501 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 abaseInstalled: falseflag), and502 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.