Google Tag Manager - v1.0.0

Home

Welcome to the documentation for ArtisanPack UI Google Tag Manager — the Google Tag Manager (GTM) integration for the ArtisanPack UI ecosystem. It ships the client-side container snippet installer, a server-side Tag Manager API client, and Blade / Livewire / React / Vue components for surfacing container and tag data inside your admin UI.

This package sits on top of the shared artisanpack-ui/google base package for OAuth2 authentication, encrypted token storage, and scope management. The base package handles the connect flow; this package contributes the tagmanager.readonly scope and uses the resulting token to talk to the Tag Manager API.

Use the navigation below to explore topics. Links use the GitLab wiki page style, so you can jump between pages like Getting Started or Snippet Installer.

If you're new here, start with Getting Started.

What this package does

artisanpack-ui/google-tag-manager covers two independent surface areas:

  • Client-side container snippet. A @gtmSnippet Blade directive and GtmSnippet React / Vue components emit the standard GTM head <script> and <noscript> body fallback for a configured container ID. Works standalone — no OAuth required.
  • Server-side Tag Manager API. A typed TagManagerClient wraps the Tag Manager API v2 with caching, pagination, and error translation. Powers the Livewire container overview and tag list components, the React and Vue equivalents, and can be resolved directly for custom UIs. Requires the base artisanpack-ui/google package for OAuth and token refresh.

What this package does not do

  • It does not re-implement OAuth. That is the responsibility of artisanpack-ui/google. This package contributes the tagmanager.readonly scope to the shared consent screen and never handles the auth flow itself.
  • It does not write to your GTM containers. The v1 API scope is read-only. Publishing, tag editing, and workspace mutations are intentionally out of scope; a future major release may add opt-in write scopes.
  • It does not remotely revoke tokens. That is handled by the base package's disconnect flow.