Actions27
- Account Actions
- Built-In Variable Actions
- Client Actions
- Container Actions
- Destination Actions
- Environment Actions
Container → Create Container
AI-generatedOverview
This node operation creates a new Google Tag Manager (GTM) Container within a specified GTM Account. It is useful for users who want to programmatically manage their GTM containers, such as automating container creation for different projects or environments.
Use Case Examples
- Creating a new GTM Container in a specific account to organize tags, triggers, and variables for a website or app.
- Automating the setup of GTM containers for multiple client accounts in a marketing agency.
Properties
| Name | Meaning |
|---|---|
| Account ID | The GTM Account ID where the container will be created. |
| Request Body | The JSON object containing the details of the container to be created, such as container name, usage context, and other configuration settings. |
Output
JSON
containerId- The unique identifier of the newly created GTM Container.name- The name of the created GTM Container.usageContext- The usage context(s) of the container, e.g., web, AMP, Android, iOS.publicId- The public ID of the container used in GTM snippets.
Dependencies
- Google Tag Manager API OAuth2 credentials
Troubleshooting
- Ensure the Account ID is provided; otherwise, the operation will fail with a missing parameter error.
- Verify that the OAuth2 credentials for Google Tag Manager API are correctly configured and authorized.
- Check the request body JSON for required fields and correct formatting to avoid API errors.
- Common error messages include missing required parameters (e.g., Account ID) or authorization failures, which can be resolved by providing the necessary inputs and valid credentials.
Links
- Google Tag Manager API - Create Container - Official documentation for creating a container using the GTM API.