Google Tag Manager icon

Google Tag Manager

Use the Google Tag Manager API

Actions84

Overview

This node integrates with the Google Tag Manager (GTM) API, allowing users to manage various GTM resources programmatically. Specifically, for the Destination resource with the List Destinations operation, it lists all destinations linked to a specified GTM Container within a GTM Account.

This functionality is useful when you want to retrieve and work with the destinations configured in your GTM containers, such as for auditing, reporting, or automating container management workflows.

Example use cases:

  • Automatically fetching all destinations linked to a container to synchronize them with another system.
  • Auditing GTM container configurations by listing destinations and analyzing their properties.
  • Building dashboards that display GTM container destinations dynamically.

Properties

Name Meaning
Account ID The unique identifier of the Google Tag Manager Account where the container resides.
Container ID The unique identifier of the GTM Container whose destinations you want to list.
Optional Query Parameters Additional optional parameters to customize the request. For this operation, no specific options are required but can be provided if applicable.

Note: For the List Destinations operation, both Account ID and Container ID are required inputs.

Output

The output is a JSON array containing the list of destination objects linked to the specified GTM Container. Each destination object includes details as returned by the Google Tag Manager API, such as destination identifiers, names, and configuration details.

The node does not output binary data for this operation.

Dependencies

  • Requires an active connection to the Google Tag Manager API via OAuth2 authentication.
  • The user must provide valid credentials with appropriate permissions to access the GTM Account and Container.
  • No additional environment variables or external services are needed beyond the configured OAuth2 credential.

Troubleshooting

  • Missing Credentials Error: If the node throws an error about missing credentials, ensure that the Google Tag Manager API OAuth2 credentials are properly set up and connected in n8n.
  • Required Parameter Errors: The node validates the presence of required parameters like Account ID and Container ID. Missing these will cause errors. Double-check that these fields are correctly filled.
  • API Permission Issues: If the API returns permission errors, verify that the authenticated user has sufficient rights to access the specified GTM Account and Container.
  • Unknown Operation Error: This should not occur if the node is used as intended, but if it does, confirm that the operation selected is "List Destinations" under the Destination resource.

Links and References


This summary focuses on the Destination resource and the List Destinations operation as requested, based on static analysis of the provided source code and property definitions.

Discussion