Wajib diisi. Nama tag situs yang akan dicari. Perhatikan bahwa tag situs adalah singleton dan tidak memiliki ID unik. Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag
Resource hanya baca dengan tag untuk mengirim data dari situs ke DataStream. Hanya ada untuk resource DataStream web.
Jika berhasil, isi respons memuat data dengan struktur berikut:
Representasi JSON
{"name": string,"snippet": string}
Kolom
name
string
Hanya output. Nama resource untuk resource GlobalSiteTag ini. Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Contoh: "properties/123/dataStreams/456/globalSiteTag"
snippet
string
Tidak dapat diubah. Cuplikan kode JavaScript yang akan ditempel sebagai item pertama ke tag head di setiap halaman web yang akan diukur.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2024-08-22 UTC."],[[["Retrieves the Site Tag, an immutable singleton, associated with a specific web stream."],["Utilizes an HTTP GET request with the format `GET https://analyticsadmin.googleapis.com/v1alpha/{name=properties/*/dataStreams/*/globalSiteTag}` to fetch the tag."],["Requires providing the web stream's name using the path parameter `name` in the format `properties/{property_id}/dataStreams/{stream_id}/globalSiteTag`."],["Returns a JSON response containing the site tag's name and the JavaScript snippet for website implementation."],["Needs authorization with either `https://www.googleapis.com/auth/analytics.readonly` or `https://www.googleapis.com/auth/analytics.edit` scope."]]],["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"]]