google-tag-manager

Community node for n8n to interact with the Google Tag Manager API v2

Package Information

Downloads: 54 weekly / 54 monthly
Latest Version: 1.0.0
Author: Measurement Matter

Documentation

n8n-nodes-google-tag-manager

npm version
License: MIT

A community node for n8n that enables full interaction with the Google Tag Manager API v2 directly from your automation workflows.

Developed and maintained by Measurement Matter.

n8n is a fair-code licensed workflow automation platform.


Table of Contents


Installation

Install via the n8n interface by following the community nodes installation guide.

Or manually:

git clone https://github.com/measurementmatter/n8n-nodes-google-tag-manager.git
cd n8n-nodes-google-tag-manager
npm install

Then place the node in your ~/.n8n/custom-nodes directory (or follow instructions specific to your n8n installation).


Credentials

This node uses OAuth 2.0 authentication via Google Cloud.

Steps to obtain API credentials

  1. Go to the Google Cloud Console
  2. Create a new project or use an existing one
  3. Enable the Google Tag Manager API
  4. Create API credentials (OAuth 2.0)
  5. Add them to the authentication settings in n8n

Supported Resources & Operations

Resource Operations
Account Get, List, Update
Built-In Variable Create, Delete, List, Revert
Client Create, Delete, Get, List, Revert, Update
Container Combine, Create, Delete, Get, List, Lookup, Move tag ID, Get tagging snippet, Update
Destination Add, Get, List
Environment Create, Delete, Get, List, Regenerate authorization code, Update
Folder Create, Delete, List entities, Get, List, Move entities, Revert, Update
Google Tag Configuration Create, Delete, Get, List, Update
Tag Create, Delete, Get, List, Revert, Update
Template Create, Delete, Get, Import from gallery, List, Revert, Update
Transformation Create, Delete, Get, List, Revert, Update
Trigger Create, Delete, Get, List, Revert, Update
User Permission Create, Delete, Get, List, Update
Variable Create, Delete, Get, List, Revert, Update
Version Header Get latest, List
Version Delete, Get, Get live, Publish, Set latest, Undelete, Update
Workspace Create, Create container version, Delete, Find conflicts, Get, List, Quick preview, Resolve merge conflict, Sync, Update
Zone Create, Delete, Get, List, Revert, Update

Retrieve information from the GTM API.


Using as a Tool

This node can be used as a tool in n8n AI Agents. To enable community nodes as tools, you need to set the N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE environment variable to true.

Environment How to set
bash/zsh export N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true then n8n start
Docker Add - N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true under environment: in your docker-compose.yml
Desktop app Create a .env file in the n8n directory with N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
Permanent (Mac/Linux) Add export N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true to your ~/.zshrc or ~/.bash_profile

Compatibility

Tested with n8n v1.80.5 (Success)


Resources


License

Distributed under the MIT License.

Discussion