Skip to main content
Google Tag Manager logo

Overview

Add Google Tag Manager to any ModuleX agent or workflow. Manage tags, variables, and workspaces in Google Tag Manager containers via the Tag Manager API v2 (www.googleapis.com/tagmanager/v2).
Categories: Analytics & Data · Analytics · Marketing · Auth: OAuth2 · Actions: 6

Authentication

OAuth2 Authentication

Connect using Google OAuth (recommended)

Required Credentials

FieldDescriptionRequiredFormat
Client IDGoogle OAuth App Client IDYes-
Client SecretGoogle OAuth App Client SecretYes-

OAuth Configuration

  • Authorization URL: https://accounts.google.com/o/oauth2/v2/auth
  • Token URL: https://oauth2.googleapis.com/token
  • Scopes: https://www.googleapis.com/auth/tagmanager.edit.containers, https://www.googleapis.com/auth/tagmanager.readonly

Available Actions

Parameters

account_id
string
required
The Google Tag Manager account ID
container_id
string
required
The container ID
workspace_id
string
required
The workspace ID
name
string
required
The name of the tag
type
string
required
The type of the tag (see Tag Dictionary Reference)
parameter
string
required
JSON string representing the list of parameters for the tag
live_only
boolean
Whether the tag should only fire in the live environment
notes
string
Any notes or comments about the tag
JSON string representing consent settings for the tag
monitoring_metadata
string
JSON string representing monitoring metadata for the tag

Response

{
  "$defs": {
    "TagResource": {
      "additionalProperties": false,
      "description": "A Google Tag Manager tag resource.",
      "properties": {
        "tag_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tag Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Type"
        },
        "live_only": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Live Only"
        },
        "notes": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notes"
        },
        "parameter": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Parameter",
          "type": "array"
        },
        "fingerprint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Fingerprint"
        },
        "tag_manager_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tag Manager Url"
        },
        "path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Path"
        },
        "account_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Account Id"
        },
        "container_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Container Id"
        },
        "workspace_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Workspace Id"
        }
      },
      "title": "TagResource",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "tag": {
      "anyOf": [
        {
          "$ref": "#/$defs/TagResource"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "success"
  ],
  "title": "CreateTagOutput",
  "type": "object"
}

Parameters

account_id
string
required
The Google Tag Manager account ID
container_id
string
required
The container ID
workspace_id
string
required
The workspace ID
tag_id
string
required
The tag ID

Response

{
  "$defs": {
    "TagResource": {
      "additionalProperties": false,
      "description": "A Google Tag Manager tag resource.",
      "properties": {
        "tag_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tag Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Type"
        },
        "live_only": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Live Only"
        },
        "notes": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notes"
        },
        "parameter": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Parameter",
          "type": "array"
        },
        "fingerprint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Fingerprint"
        },
        "tag_manager_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tag Manager Url"
        },
        "path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Path"
        },
        "account_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Account Id"
        },
        "container_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Container Id"
        },
        "workspace_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Workspace Id"
        }
      },
      "title": "TagResource",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "tag": {
      "anyOf": [
        {
          "$ref": "#/$defs/TagResource"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "success"
  ],
  "title": "GetTagOutput",
  "type": "object"
}

Parameters

account_id
string
required
The Google Tag Manager account ID
container_id
string
required
The container ID
workspace_id
string
required
The workspace ID

Response

{
  "$defs": {
    "TagResource": {
      "additionalProperties": false,
      "description": "A Google Tag Manager tag resource.",
      "properties": {
        "tag_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tag Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Type"
        },
        "live_only": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Live Only"
        },
        "notes": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notes"
        },
        "parameter": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Parameter",
          "type": "array"
        },
        "fingerprint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Fingerprint"
        },
        "tag_manager_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tag Manager Url"
        },
        "path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Path"
        },
        "account_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Account Id"
        },
        "container_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Container Id"
        },
        "workspace_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Workspace Id"
        }
      },
      "title": "TagResource",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "tags": {
      "items": {
        "$ref": "#/$defs/TagResource"
      },
      "title": "Tags",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "GetTagsOutput",
  "type": "object"
}

Response

{
  "$defs": {
    "AccountItem": {
      "additionalProperties": false,
      "description": "A Google Tag Manager account.",
      "properties": {
        "account_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Account Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "share_data": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Share Data"
        },
        "fingerprint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Fingerprint"
        },
        "path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Path"
        },
        "tag_manager_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tag Manager Url"
        }
      },
      "title": "AccountItem",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "accounts": {
      "items": {
        "$ref": "#/$defs/AccountItem"
      },
      "title": "Accounts",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListAccountIdOptionsOutput",
  "type": "object"
}

Parameters

account_id
string
required
The Google Tag Manager account ID
container_id
string
required
The container ID
workspace_id
string
required
The workspace ID
tag_id
string
required
The tag ID
type
string
required
The type of the tag (see Tag Dictionary Reference)
parameter
string
required
JSON string representing the list of parameters for the tag
name
string
The name of the tag
live_only
boolean
Whether the tag should only fire in the live environment
notes
string
Any notes or comments about the tag
JSON string representing consent settings for the tag
monitoring_metadata
string
JSON string representing monitoring metadata for the tag

Response

{
  "$defs": {
    "TagResource": {
      "additionalProperties": false,
      "description": "A Google Tag Manager tag resource.",
      "properties": {
        "tag_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tag Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Type"
        },
        "live_only": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Live Only"
        },
        "notes": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notes"
        },
        "parameter": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Parameter",
          "type": "array"
        },
        "fingerprint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Fingerprint"
        },
        "tag_manager_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tag Manager Url"
        },
        "path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Path"
        },
        "account_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Account Id"
        },
        "container_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Container Id"
        },
        "workspace_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Workspace Id"
        }
      },
      "title": "TagResource",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "tag": {
      "anyOf": [
        {
          "$ref": "#/$defs/TagResource"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "success"
  ],
  "title": "UpdateTagOutput",
  "type": "object"
}

Parameters

account_id
string
required
The Google Tag Manager account ID
container_id
string
required
The container ID
workspace_id
string
required
The workspace ID
variable_id
string
required
The variable ID
name
string
required
The name of the variable
type
string
required
The type of the variable (e.g. ‘jsm’)
parameter
string
required
JSON string representing the list of parameters for the variable
format_value
string
JSON string representing the formatValue object for the variable

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "data": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Data"
    }
  },
  "required": [
    "success"
  ],
  "title": "UpdateVariableOutput",
  "type": "object"
}

Limits & Quotas

  • Google Tag Manager API uses per-project quotas managed via the Google Cloud Console.
  • Default quota: 10,000 requests per day per project (varies by endpoint).
  • Rate limit: approximately 5 requests per second per user.
  • Error model: non-2xx responses raise httpx.HTTPStatusError (Pattern A).

Amplitude

Databricks

Google Analytics