Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tài liệu này cung cấp thông tin tổng quan cấp cao về API Trình quản lý thẻ của Google.
Giới thiệu
API Trình quản lý thẻ của Google cấp quyền truy cập vào dữ liệu cấu hình
Trình quản lý thẻ của Google cho người dùng được uỷ quyền. Với API này, bạn có thể quản lý:
Bạn muốn bắt đầu ngay? Đọc Hướng dẫn cho nhà phát triển. Mỗi ứng dụng sử dụng API sẽ phải trải qua một vài bước để đăng ký, uỷ quyền cho người dùng và làm việc với API. Hướng dẫn của nhà phát triển sẽ hướng dẫn bạn qua từng bước và cuối cùng, bạn sẽ có một ứng dụng đang hoạt động có thể tuỳ chỉnh.
Tổng quan về khái niệm
API này hiển thị nhiều thực thể cấu hình Trình quản lý thẻ của Google, được sắp xếp theo hệ thống phân cấp. Mỗi tài khoản của người dùng có thể có một hoặc nhiều Vùng chứa, mỗi Vùng chứa có thể có một hoặc nhiều Không gian làm việc. Workspace cho phép thực hiện nhiều nội dung sửa đổi đồng thời đối với các Biến, Biến tích hợp, Trình kích hoạt, Thư mục và Thẻ của một vùng chứa. Sau khi thực hiện các sửa đổi mong muốn đối với không gian làm việc, bạn có thể tạo, xem trước và xuất bản Phiên bản. Tài nguyên về Quyền cho phép bạn quản lý quyền của người dùng ở cấp Tài khoản. Sơ đồ dưới đây thể hiện mối quan hệ mẹ-con giữa các thực thể:
Hình 1: Mối quan hệ mẹ con trong tài nguyên Trình quản lý thẻ của Google.
API Trình quản lý thẻ của Google hiển thị mỗi thực thể dưới dạng một tài nguyên. Danh sách các tài nguyên thuộc một loại cụ thể sẽ tạo thành một bộ sưu tập. API hiển thị từng tập hợp
tại một URI có thể được truy vấn để trả về danh sách các thực thể trong đó.
API Trình quản lý thẻ của Google xử lý hàng triệu thao tác. Để ngăn hệ thống nhận nhiều hoạt động hơn khả năng xử lý và đảm bảo phân bổ tài nguyên hệ thống một cách công bằng, bạn cần sử dụng hệ thống hạn mức. Đọc hướng dẫn về Giới hạn và hạn mức để biết các giới hạn cụ thể.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eThe Google Tag Manager API grants authorized users access to Google Tag Manager configuration data, allowing management of accounts, containers, workspaces, tags, triggers, and other related entities.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the API, developers need to register their application, authorize the user, and understand the workflow as detailed in the Developer's Guide.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Tag Manager resources are organized hierarchically, with accounts containing containers, containers containing workspaces, and workspaces containing various elements like tags, triggers, and variables.\u003c/p\u003e\n"],["\u003cp\u003eThe API utilizes a quota system to ensure equitable resource distribution and protect the system from overload, with specific limits outlined in the Limits and Quotas guide.\u003c/p\u003e\n"],["\u003cp\u003eFurther information and guidance on working with the API can be found in the Developer's Guide and the Tag Manager API Reference.\u003c/p\u003e\n"]]],["The Google Tag Manager API allows authorized users to manage configuration data. Key actions include managing accounts, containers, destinations, workspaces, tags, triggers, folders, variables, versions, and user permissions. Users can modify variables, built-in variables, triggers, folders, and tags within workspaces. The API's resources are organized hierarchically, enabling the creation, preview, and publishing of versions, as well as the management of user permissions at the account level. Quotas are used to protect system resources.\n"],null,["# Google Tag Manager API - Overview\n\nThis document provides a high level overview of the Google Tag Manager API.\n\nIntroduction\n------------\n\nThe Google Tag Manager API provides access to Google Tag Manager\nconfiguration data for an authorized user. With this API you can manage:\n\n- [Accounts](/tag-platform/tag-manager/api/reference/rest/v2/accounts)\n- [Containers](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers)\n- [Destinations](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.destinations)\n- [Workspaces](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces)\n- [Google Tag Config](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.gtag_config)\n- [Tags](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.tags)\n- [Triggers](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.triggers)\n- [Folders](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.folders)\n- [Built-In Variables](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.built_in_variables)\n- [Clients](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.clients)\n- [Variables](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.variables)\n- [Container Versions](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions)\n- [Container Version Headers](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.version_headers)\n- [User\n Permissions](/tag-platform/tag-manager/api/reference/rest/v2/accounts.user_permissions)\n- [Environments](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.environments)\n\nGetting Started\n---------------\n\nWant to get started right away? Read the [Developer's Guide](/tag-platform/tag-manager/api/v2/devguide). Each application\nthat uses the API will have to go through a couple of steps\nto register, authorize the user, and work with the API. The developer's guide\nwill walk you through each step and in the end, you will have a working\napplication that you can customize.\n\nConceptual Overview\n-------------------\n\nThe API exposes multiple Google Tag Manager configuration\nentities, organized hierarchically. Each user's Account can have one\nor more Containers, each of which can have one or more Workspaces. A Workspace allows multiple\nconcurrent modifications to a container's Variables, Built-In Variables,\nTriggers, Folders, and Tags. Once you have made the desired modifications to your workspace, you can\ncreate, preview and publish a Version. A Permission resource allows you to\nmanage user permissions at the Accounts level. The following diagram represents\nthe parent-child relationships among the entities:\n**Figure 1**: The parent-child relationships of Google Tag Manager resources.\n\nThe Google Tag Manager API exposes each of the entities as a\nresource. A list of resources of a particular kind\nmake up a collection. The API exposes each collection\nat a URI that can be queried to return the list of entities in it.\n\nSee the [Tag Manager API\nReference](/tag-platform/tag-manager/api/v2/reference) to get a detailed description of the methods in the API and\nthe data they return.\n\nQuota Policies\n--------------\n\nThe Google Tag Manager API handles millions of operations. To protect the\nsystem from receiving more operations than it can handle, and to ensure an\nequitable distribution of system resources, it is necessary to employ a quota\nsystem. Read the [Limits and\nQuotas](/tag-platform/tag-manager/api/v2/limits-quotas) guide for specific limits.\n\nNext Steps\n----------\n\nResources to help you learn more about the API:\n\n- Read the [Developer's Guide](/tag-platform/tag-manager/api/v2/devguide) to learn how to work with the API.\n- Review the [Tag Manager API\n Reference](/tag-platform/tag-manager/api/v2/reference) to familiarize yourself with Tag Manager resources and available operations.\n\n\u003cbr /\u003e"]]