Marketing
Google Tag Manager in your product and your AI agents, through one API
The Google Tag Manager toolkit covers accounts, containers, workspaces, tags, triggers and container versions. Your customer authorizes Google once with OAuth, and your product or AI agent calls each operation through Connect, which stores and renews the credentials and logs every execution.
15 days to try it. No credit card.
POST https://connect.reportei.com/api/tools/google_tag_manager_create_tag/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"accountId": "<accountId>",
"containerId": "<containerId>",
"workspaceId": "<workspaceId>",
"name": "<name>",
"type": "<type>"
}
}How it works
From a connected customer to the first Google Tag Manager call.
- 1
Your customer connects the account
Your system opens a Connect session for the toolkit and your customer connects their Google Tag Manager account. You get the connection id.
- 2
Your product calls the tool
A POST to /api/tools/{tool}/execute with the connection id and arguments. On success, Connect preserves the app's response status and body.
- 3
Connect handles the rest
It stores the credential encrypted, renews tokens for OAuth connections that support renewal and records executions in an audit trail available through the API.
Use cases
What your product does with Google Tag Manager.
Install tracking for new clients
An agency tool creates a tag and a pageview trigger in the client's container workspace, then creates and publishes a version to put it live.
Pause a tag safely
Read a tag, set paused to true and publish a new version, so a product can switch off a misbehaving tag without deleting it.
Container audits by an agent
Let an AI agent list containers, tags, triggers and versions across accounts and flag tags that have no firing trigger.
Tools
13 Google Tag Manager tools
- List accountsGETLists the Tag Manager accounts the user can access, with accountId and name. Pass nextPageToken as pageToken to read the next page.
- List containersGETLists the containers of an account, with containerId, name, publicId (the GTM- code installed on the site) and usageContext, such as web. Pass nextPageToken as pageToken to read the next page.
- List workspacesGETLists the workspaces of a container, with workspaceId and name. Tags and triggers are edited in a workspace, usually Default Workspace, and reach the site only through Create version and Publish version.
- List tagsGETLists the tags of a workspace, with tagId, name, type, parameter, firingTriggerId and paused. Pass nextPageToken as pageToken to read the next page.
- Get tagGETReturns a tag with all its fields, including fingerprint. Update tag replaces the whole tag, so it starts from this response.
- Create tagPOSTCreates a tag in a workspace. It reaches the site only after Create version and Publish version. Without firingTriggerId the tag never fires.
- Update tagPUTReplaces a whole tag: send every field to keep, as Get tag returns it, with the changes, because a field left out is cleared. Set paused to true to stop a tag without deleting it. The change reaches the site only after Create version and Publish version.
- Delete tagDELETEDeletes a tag from a workspace. The site keeps firing it until a version without the tag is published.
- List triggersGETLists the triggers of a workspace, with triggerId, name, type and conditions. A triggerId goes in firingTriggerId or blockingTriggerId of a tag. Pass nextPageToken as pageToken to read the next page.
- Create triggerPOSTCreates a trigger in a workspace and returns its triggerId. A pageview trigger without filter fires on every page. A condition compares a variable, such as {{Page URL}}, with a value; the built-in variables of clicks and forms, such as {{Click ID}}, only work once enabled in the workspace, which this toolkit does not do.
OAuth with your product's app
You register your product's OAuth app once, with POST /api/merchants/credentials/google_tag_manager, and your customer authorizes the account on a consent screen. Connect renews the token when it is about to expire.
Questions about the Google Tag Manager toolkit
Do I need to build against the Google Tag Manager API?
No. Connect ships 13 Google Tag Manager tools, described and ready. Your customer connects the account and your system calls every tool through the same endpoint, with the same request format.
How does my customer connect their Google Tag Manager account?
With the mode the toolkit accepts: OAuth with your product's app. Connect stores the credential encrypted and never returns it to your system.
Does it work with AI agents?
Yes. Each tool's input is described in JSON Schema, which your agent uses directly as a tool definition. The agent picks the tool and the arguments, and your system makes the call to Connect.
Does my customer need a Reportei account?
No. Your customer connects the account on a Connect screen, or your system sends the credential through the API, and they keep using only your product.
Toolkits in the same category
See all 100 toolkitsSee Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.
