Google Tag Manager
Container management for Laravel. Two Blade directives install the GTM snippet, a server-side Tag Manager API client reads your containers, and Livewire, React and Vue components surface container and tag data inside your own admin UI.
v1.0.0
MIT License
★ 0
composer require artisanpack-ui/google-tag-manager
$ composer require artisanpack-ui/google-tag-manager
✓ GoogleTagManager facade auto-discovered
✓ artisanpack-ui/google pulled in automatically
GTM_CONTAINER_ID=GTM-XXXXXXX
@gtmSnippetHead / @gtmSnippetBody
What it does
Snippet on the page, containers in the admin
Set a container ID and the snippet is live. Connect a Google account through the base package and the same install reads containers, workspaces and tags.
Snippet installer
@gtmSnippetHead and @gtmSnippetBody put the container on every page from one config value.
Tag Manager API client
A server-side client for accounts, containers, workspaces and tags, authenticated through the base package's token manager.
Container overview
A component that shows a container's details for a given account and container ID.
Tag list
Every tag in a workspace, ready to drop into an admin screen.
Livewire, React and Vue
Blade and Livewire components ship ready to mount; React and Vue equivalents live in resources/js.
CMS framework widgets
With the CMS framework installed, the admin components register as dashboard widgets.
Get started
Install and drop in the snippet
Set GTM_CONTAINER_ID, then add @gtmSnippetHead to your layout head and @gtmSnippetBody just inside the body.
1 · Install
composer require artisanpack-ui/google-tag-manager
2 · Set your container ID
GTM_CONTAINER_ID=GTM-XXXXXXX
3 · Configure the base package
php artisan vendor:publish --tag=google-config
Requirements
What you need
| Requirement | Detail |
|---|---|
| Laravel | 10, 11, 12 or 13 |
| Base package | artisanpack-ui/google — pulled in automatically |
| Snippet only | GTM_CONTAINER_ID — no Google account connection needed |
| Admin components | A connected Google account, plus Livewire or the React / Vue sources |
| The client-side snippet works on its own. The container and tag components need the base package configured and the current user's Google account connected. | |
Manage your containers with Tag Manager
Snippet installer, API client and admin components for Livewire, React and Vue. Free and open source under the MIT license.
