Google Tag Manager icon

Google Tag Manager

Use the Google Tag Manager API

Actions102

Overview

This node integrates with the Google Tag Manager (GTM) API, allowing users to manage various GTM resources programmatically. Specifically, for the Client resource and the List Clients operation, it lists all GTM clients within a specified container workspace. This is useful for scenarios where you want to retrieve and process client configurations or audit existing clients in your GTM setup.

Practical examples include:

  • Automating the retrieval of all clients in a workspace to synchronize with other systems.
  • Auditing client configurations for compliance or troubleshooting.
  • Feeding client data into reporting or monitoring workflows.

Properties

Name Meaning
Account ID The GTM Account ID under which the container and workspace exist.
Container ID The GTM Container ID that holds the workspace containing the clients.
Workspace ID The GTM Workspace ID within the container where clients are managed.
Optional Query Parameters Additional optional parameters to refine or control the API request.

The Optional Query Parameters collection includes many possible fields, but for the "List Clients" operation, typically no additional parameters are required or used.

Output

The output is a JSON array where each item represents a client object retrieved from the GTM API. Each client object contains details about a GTM client within the specified container workspace.

The structure corresponds directly to the Google Tag Manager API's client representation, including properties such as client ID, name, type, and configuration details.

No binary data output is involved in this operation.

Dependencies

  • Requires an OAuth2 credential configured for Google Tag Manager API access.
  • The node uses the base URL https://www.googleapis.com/tagmanager/v2 for API requests.
  • Proper permissions on the Google account to access the specified GTM account, container, and workspace.

Troubleshooting

  • Missing Required IDs: The node throws errors if any of the required IDs (Account ID, Container ID, Workspace ID) are missing. Ensure these are correctly provided.
  • Authentication Errors: If the OAuth2 credentials are missing or invalid, the node will fail. Verify that the Google Tag Manager API credentials are set up and authorized.
  • API Errors: Any error returned by the GTM API will be wrapped and reported. Common issues include insufficient permissions or invalid IDs.
  • Empty Results: If no clients exist in the specified workspace, the output will be an empty array.

Links and References


If you need further details on other operations or resources, feel free to ask!

Discussion