Google Tag Manager icon

Google Tag Manager

Use the Google Tag Manager API

Actions84

Overview

The node integrates with the Google Tag Manager (GTM) API, specifically enabling management of GTM Containers among many other resources. The "Get Container" operation retrieves detailed information about a specific GTM Container within a given GTM Account.

This node is beneficial when you want to programmatically access container configurations, metadata, or details for automation, reporting, or integration purposes. For example, you might use it to fetch container settings before deploying changes or to audit container properties across multiple accounts.

Properties

Name Meaning
Account ID The unique identifier of the GTM Account that owns the container.
Container ID The unique identifier of the GTM Container to retrieve.
Optional Query Parameters Additional optional parameters to customize the request. These include:
- Allow User Permission Feature Update (boolean): Allows updating user permission features.
- Built-In Variable Type (options): Various built-in variable types available in GTM.
- Container ID (string): ID of another container for operations like combine.
- Container Version ID (string): Specific container version to target.
- Copy Settings (boolean): Whether to copy tag settings during certain operations.
- Copy Terms Of Service (boolean): Acceptance of terms of service agreements.
- Copy Users (boolean): Whether to copy users during certain operations.
- Destination ID (string): Linked destination ID for container.
- Fingerprint (string): Used for concurrency control matching stored account fingerprint.
- Include Google Tags (boolean): Whether to include accounts associated with Google Tag.
- Page Token (string): Token for paginated results.
- Setting Source (options): Source of config setting after combining containers.
- Tag ID, Tag Name, Trigger ID, Variable ID (strings): IDs/names used in various container operations.

Output

The output is a JSON array where each element corresponds to the response from the GTM API for the requested container. For the "Get Container" operation, the JSON object includes detailed information about the container such as its name, usage context, container ID, account ID, and other metadata defined by the GTM API.

No binary data output is involved in this operation.

Dependencies

  • Requires an OAuth2 API credential configured for Google Tag Manager API access.
  • The node uses the base URL https://www.googleapis.com/tagmanager/v2 for all API requests.
  • Proper permissions on the Google Tag Manager account are necessary to perform the "Get Container" operation.

Troubleshooting

  • Missing Credentials Error: If the node throws an error about missing credentials, ensure that a valid OAuth2 credential for Google Tag Manager API is configured and connected.
  • Required Parameter Errors: The node validates required parameters such as Account ID and Container ID. Missing these will cause errors. Make sure these fields are correctly filled.
  • API Request Failures: Errors returned from the GTM API (e.g., permission denied, not found) will be surfaced with messages prefixed by "Error calling GTM API". Check the GTM account permissions and existence of the specified container.
  • Unknown Operation Error: This indicates an invalid operation parameter; verify that "Get Container" is selected under the Container resource.

Links and References

Discussion