getting-started-gtm8.13 KB
View saved version →
---
name: getting-started-gtm
description: Use on a first visit or setup recheck in the LoomaScale Google Tag Manager plugin. Show the published container’s tracking configuration and a next check.
---
# Getting started with Google Tag Manager in LoomaScale
## Check connection and access
On this plugin’s `loomascale-gtm` connection, call `loomascale_list_data_sources` with `{}`, then `loomascale_get_user` with `{}`, even when the provider is disconnected. Use the Google Tag Manager row with `tools_in_current_plugin: true`. A focused plugin normally returns `all_sources: false`. Keep reporting and in-chat tasks scoped to this source. Save the full catalog for the dashboard links below.
Proceed with an active trial, the Free plan, a paid plan or legacy access. The Free plan (`readOnly: true`) never expires and allows reads within a weekly task allowance, so run the snapshot without asking the user to pay first, and offer changes as recommendations only. For a pending trial, tell the user before the first metered read that it starts the trial. With no connection, leave it pending. If a plan is required, show the returned plan link. If a check fails, offer sign-in or retry. Only start account discovery after verifying the provider connection and access. For any other state, show setup or a preview.
For `not_connected`, offer **🏷️ Connect Google Tag Manager** to see which tracking tags are published. Use the [Google Tag Manager icon](https://loomascale.com/icons/google-tag-manager-icon.svg) inside the button, or the glyph in text chat. Use its returned `connect_url` verbatim, falling back to `connections_url` or the [LoomaScale connections dashboard](https://loomascale.com/dashboard/connections). Use **Reconnect** for `needs_attention` and **Recheck** for an unknown or unavailable status. Let the user open the link, then offer **Recheck setup** to refresh both checks.
## What tracking is published?
Discover containers with `gtm_list_containers`. Pass the intended container’s returned `path` as `container`. Use the sole result automatically only when `accountsStillDiscovering` is zero. With ambiguous or incomplete discovery, offer the visible choices or a recheck and resume on selection.
Read `gtm_get_container` once. Caption the snapshot **Published tracking setup**, with the container, as-of date and `liveVersionId`. Show returned `tagCount`, `triggerCount` and `pausedTagCount`. Describe what is configured. A paused tag may be intentional, and published configuration cannot establish whether a tag fired on the website.
If the service confirms there is no published version, say so and offer to inspect a named draft. If the live read fails without establishing publication state, report that limitation. Do not use empty counters as evidence of an unpublished container or invent weekly conversion metrics.
## Help the user choose a next step
Keep the reply within one to two desktop chat screens. Open with one sentence about Google Tag Manager and one quiet line for connection and plan status. Mention a limit only if it affects the next step. Give roughly a quarter of the reply to the snapshot. Use a compact table and one plain-language observation grounded in the figures. Preserve the distinction between a verified zero and missing data. If discovery finds no reachable target or no usable data, give the specific limitation and a recovery action in place of the table.
Place one recommended button directly beneath the finding. For paused tags, offer **Review paused tracking tags**. For a published container without a stronger signal, offer **Check for missing or duplicate tracking**. For an unpublished container, offer **Review a draft workspace**. When setup or access blocks the report, make the remedy primary.
Offer the other relevant questions as compact reply buttons. Bind each to its one-sentence prompt and carry the chosen container, dates and metric into the next turn.
- **Check for missed or duplicate conversions** Preview of the first 4,000 characters. Read full instructions →
Referenced files: 1 — file references are metadata, not package contents.
loomascale-gtm5.35 KB
View saved version →
---
name: loomascale-gtm
description: Audit the user's connected Google Tag Manager (GTM) conversion tracking with LoomaScale. Use for GA4 and Google Ads tag setup, paused tags, missing triggers, possible duplicate Google tags, data layer variables, workspace drafts, container versions and confirmed publishing. Checks configuration, not live website firing. Do not invoke for general Tag Manager definitions, analytics traffic reports, installing the container snippet or changing ad campaigns.
---
# Google Tag Manager: conversion tracking audits and drafts with LoomaScale
Use the user's connected Google Tag Manager (GTM) containers to answer conversion
tracking questions with configuration evidence: GA4 and Google Ads tags, paused
tags, missing triggers and possible duplicate Google tags. Draft fixes only when
the user asks. Configuration findings do not establish live website firing.
This package connects to `https://api.loomascale.com/mcp/gtm`. It reads
containers, edits a draft workspace the user names, saves versions, and
publishes only a version the user confirms. It cannot install the container
snippet on a website, resolve merge conflicts, change GA4 or ad accounts, or
delete containers.
## Resolve the container
Reuse a container already verified in the conversation. Otherwise call
`gtm_list_containers`. Pass `container` as the listed public `GTM-…` ID, name or
API path; it can be omitted when exactly one container is reachable. If several
fit and the task does not identify one, ask which to use. Never substitute a GA4
measurement ID (`G-…`) or a Google Ads customer ID.
Inspect available tool descriptions and input schemas. Names here are the
server's tool names; a client may add a namespace.
## Choose the tool that answers the question
| Question | Tool |
| --- | --- |
| Which accounts and containers can I access? | `gtm_list_containers`, `gtm_get_container` |
| Is conversion tracking set up correctly? | `gtm_audit_tracking` |
| Which tags exist and what firing triggers are configured? | `gtm_list_tags` |
| Which triggers and variables exist? | `gtm_list_triggers_variables` |
| Which workspaces exist, and what is waiting unpublished? | `gtm_list_workspaces`, `gtm_get_workspace_status` |
| Which version is live, and what came before? | `gtm_list_versions` |
Read [Tag Manager tools](references/tag-manager.md) for audit findings, the
draft → version → publish sequence, permissions and refusals.
## Change a container only on the user's word
Keep audits read-only. Never edit as a side effect of an analysis.
- Every edit needs `workspace`: an existing workspace the user chose. Call
`gtm_list_workspaces` and ask; create one with `gtm_create_workspace` only when
the user asks for a new one by name.
- Draft edits (`gtm_create_*`, `gtm_update_*`, `gtm_delete_entity`,
`gtm_enable_built_in_variables`) are NOT live. Say so after each one.
- When the workspace is behind the live version, run `gtm_sync_workspace`.
Merge conflicts it reports are resolved by the user in Tag Manager.
- `gtm_create_version` saves the workspace as a named version; nothing goes live.
- `gtm_publish_version` with `confirm:false` shows what would replace the live
version. Call it with `confirm:true` only after the user explicitly confirms
that version id. Report `liveVersionIdAfter` and `verified` from the answer and
keep the previous live id: a rollback is publishing it again.
## Handle access and helper tools accurately
- If authorization is missing, expired or lacks a permission, use the link the
tool returns or the [LoomaScale connections dashboard](https://loomascale.com/dashboard/connections)
and ask the user to reconnect Google Tag Manager with every box ticked. A
"role denied" refusal is the login's container permission in Tag Manager.
- For a plan or trial refusal, call `loomascale_get_user` once and explain the
plan, trial, task or account allowance it reports. That allowance is not an ad budget.
- On the Free plan
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 2 — file references are metadata, not package contents.