Actions84
- Account Actions
- Built-In Variable Actions
- Client Actions
- Container Actions
- Destination Actions
- Environment Actions
- Folder Actions
- Google Tag Configuration Actions
- Tag Actions
- Template Actions
- Transformation Actions
- Trigger Actions
- User Permission Actions
- Variable Actions
- Version Actions
Overview
This node integrates with the Google Tag Manager (GTM) API, specifically enabling management of Google Tag Configurations among many other GTM resources. The "Create Google Tag Configuration" operation allows users to create a new Google Tag configuration within a specified GTM workspace. This is useful for automating the setup and management of tags that collect data for analytics and marketing purposes.
Common scenarios include:
- Automating the deployment of Google Tags across multiple containers or workspaces.
- Managing tag configurations programmatically as part of CI/CD pipelines.
- Integrating GTM tag creation into broader workflows that involve website or app analytics setup.
For example, a marketing team could use this node to automatically create and configure Google Tags when launching new campaigns, ensuring consistent tracking without manual intervention.
Properties
| Name | Meaning |
|---|---|
| Account ID | The Google Tag Manager Account ID where the tag configuration will be created. |
| Container ID | The GTM Container ID within the account where the tag configuration belongs. |
| Workspace ID | The GTM Workspace ID inside the container where the tag configuration will be created. |
| Optional Query Parameters | Additional optional parameters for the API request, such as flags controlling user permission updates, specifying built-in variable types, copying settings/users/terms of service, destination or tag IDs, fingerprints, etc. |
| Request Body | JSON object representing the body of the request to create the Google Tag Configuration. This contains the actual configuration details for the tag being created. |
The Optional Query Parameters collection includes various boolean flags and string options that control specific behaviors of the API call, such as whether to copy users or settings from an existing tag, accept terms of service, or specify particular IDs related to destinations or tags.
Output
The output is a JSON array containing the response(s) from the Google Tag Manager API after creating the Google Tag Configuration. The structure corresponds to the Google Tag Configuration resource as returned by the GTM API, typically including fields like the configuration's unique ID, name, parameters, and metadata.
No binary data output is involved in this operation.
Dependencies
- Requires valid Google Tag Manager API credentials configured in n8n using OAuth2 authentication.
- The node uses the Google Tag Manager v2 REST API endpoint:
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the GTM account, container, and workspace are necessary to create tag configurations.
Troubleshooting
- Missing Credentials Error: If the node throws an error about missing credentials, ensure that the Google Tag Manager OAuth2 API credentials are properly set up in n8n.
- Required Parameter Errors: The node validates required parameters such as Account ID, Container ID, and Workspace ID. Missing any of these will cause an error. Double-check that all required IDs are provided.
- API Errors: Errors returned from the GTM API (e.g., permission denied, invalid request body) will be surfaced with messages prefixed by "Error calling GTM API". Review the message and stack trace for details.
- Invalid JSON in Request Body: Ensure the JSON provided in the Request Body property is well-formed and matches the expected schema for a Google Tag Configuration.
Links and References
This summary focuses on the "Create Google Tag Configuration" operation within the Google Tag Configuration resource, describing its inputs, outputs, dependencies, and common troubleshooting points based on static analysis of the node's source code and provided properties.