Method: properties.dataStreams.getGlobalSiteTag
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.
Bắt buộc. Tên của thẻ trang web cần tìm. Xin lưu ý rằng thẻ trang web là các singleton và không có mã nhận dạng duy nhất. Định dạng: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag
Tài nguyên chỉ đọc có thẻ để gửi dữ liệu từ một trang web đến một DataStream. Chỉ có trong tài nguyên DataStream web.
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON
{"name": string,"snippet": string}
Trường
name
string
Số nhận dạng. Tên tài nguyên cho tài nguyên GlobalSiteTag này. Định dạng: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Ví dụ: "properties/123/dataStreams/456/globalSiteTag"
snippet
string
Không thể thay đổi. Đoạn mã JavaScript cần dán làm mục đầu tiên vào thẻ head của mỗi trang web để đo lường.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2026-04-14 UTC."],[],["This outlines retrieving a web stream's Site Tag via a `GET` request to a specified URL. The required `name` parameter, formatted as `properties/{property_id}/dataStreams/{stream_id}/globalSiteTag`, identifies the Site Tag. The request body must be empty. The successful response, in JSON format, provides a `name` (resource identifier) and an immutable `snippet` (JavaScript code) for website data measurement. This can be achieved through authorization with either `analytics.readonly` or `analytics.edit` OAuth scopes.\n"]]