PlugsightDocs

Google Tag Manager tools

The Google Tag Manager tools in the developer API, with every argument: list containers, read tags, audit and version history.

Needs: A Google Tag Manager connection (Pro and Agency). 5 tools, all read-only.

Google is still reviewing the permission this connector needs. Until it approves it, Plugsight offers Google Tag Manager to Plugsight admins only, so for most people it isn't in the Connector catalog yet and these tools don't appear. See Google Tag Manager.

These tools appear in GET /v1/tools only when the API key's MCP server includes a connection of this kind. Call each one with POST /v1/tools/\<name>, sending its arguments as a JSON object. See Calling tools for the request and response format.

These tools need a plan that includes marketing connectors (Pro or Agency). On the Free plan they don't appear, even if the connection exists.

These tools don't take an account argument. Call tag_manager_list_containers for the containers this key reaches and pass a GTM id (like GTM-ABC123) as container; leave it out when there's only one. Containers you've hidden in Plugsight aren't listed and can't be read.

Tool What it does Kind
tag_manager_list_containers List Tag Manager containers Read
tag_manager_container Tag Manager container contents Read
tag_manager_get_tag Get a Tag Manager tag Read
tag_manager_audit Audit a Tag Manager container Read
tag_manager_versions Tag Manager version history Read

Every tool here only reads: none of them changes anything in Google Tag Manager, so none needs confirm.

The example requests fill in only the required arguments, with placeholder values.

tag_manager_list_containers

List Tag Manager containers · Read

Lists the Google Tag Manager containers this MCP reaches, with their GTM ids and accounts.

No arguments: send {}.

Example request:

curl -X POST https://app.plugsight.app/v1/tools/tag_manager_list_containers \
  -H "Authorization: Bearer $PLUGSIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

tag_manager_container

Tag Manager container contents · Read

Everything in a container's published (live) version: each tag with its type, the triggers it fires on and whether it's paused; every trigger and variable.

Argument Type Required What it is
container string No Container id like GTM-ABC123 (optional when there's only one)

Example request:

curl -X POST https://app.plugsight.app/v1/tools/tag_manager_container \
  -H "Authorization: Bearer $PLUGSIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

tag_manager_get_tag

Get a Tag Manager tag · Read

One tag in full from the published version: its settings (measurement or conversion ids, event names, parameters), triggers and blocking triggers.

Argument Type Required What it is
tag string Yes Tag name or id from tag_manager_container
container string No Container id like GTM-ABC123 (optional when there's only one)

Example request:

curl -X POST https://app.plugsight.app/v1/tools/tag_manager_get_tag \
  -H "Authorization: Bearer $PLUGSIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tag": "…"}'

tag_manager_audit

Audit a Tag Manager container · Read

Checks the published version for common tracking problems: tags that never fire, retired Universal Analytics tags, paused tags, possible duplicate tags (double counting), unused triggers and variables, Custom HTML tags; and lists changes waiting unpublished in workspaces.

Argument Type Required What it is
container string No Container id like GTM-ABC123 (optional when there's only one)

Example request:

curl -X POST https://app.plugsight.app/v1/tools/tag_manager_audit \
  -H "Authorization: Bearer $PLUGSIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

tag_manager_versions

Tag Manager version history · Read

Published versions of a container, newest first, with how many tags, triggers and variables each had.

Argument Type Required What it is
container string No Container id like GTM-ABC123 (optional when there's only one)
limit integer No Most results to return. From 1 to 100. Default 20.

Example request:

curl -X POST https://app.plugsight.app/v1/tools/tag_manager_versions \
  -H "Authorization: Bearer $PLUGSIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'