Google Tag Manager - v1.0.0
API Reference
Every class, facade, directive, and route the package exposes.
Top-level
- GoogleTagManager facade —
googleTagManager()helper and static access - SnippetRenderer — the class behind
@gtmSnippet - TagManagerClient — the Tag Manager API v2 client
- Fetchers —
ContainerOverviewFetcherandTagListFetcher - Data Objects — the typed DTOs returned by the client and fetchers
- HTTP Routes — the endpoints backing the React and Vue components
- Blade Directives — every
@gtm*directive - CmsFramework wrappers — the
ContainerOverviewWidgetandTagListWidgetclasses - Exceptions —
ApiExceptionandBaseNotInstalledException
Package boot flow
The GoogleTagManagerServiceProvider boots in this order:
mergeConfigFromon the package config- Binds
SnippetRenderer,TagManagerClient,GoogleConnectionResolver, andGoogleTagManageras singletons - Publishes
config,views, andjsgroups - Loads the package's Blade views under the
google-tag-manager::namespace - Registers the
@gtmSnippet,@gtmSnippetHead,@gtmSnippetBody, and@gtmRoutesdirectives - When the base is installed and
routes.enabledis true, loads the HTTP routes - When the base is installed and the
hookshelpers exist, contributes scopes via theap.google.scopesfilter - When Livewire is installed, registers
google-tag-manager::container-overviewandgoogle-tag-manager::tag-list - When both
cms-frameworkand Livewire are installed, registers the CMS admin widget wrappers on the CMSAdminWidgetManager(deferred untilbooted)
Every "when X is installed" branch degrades silently — the package boots cleanly on hosts without the base package, Livewire, or the CMS framework.
Related
- Testing — writing tests against the API surface
- Configuration — the config keys these classes read