Method: properties.dataStreams.getGlobalSiteTag
عرض علامة الموقع لمصدر بيانات الويب المحدّد. علامات المواقع الإلكترونية هي علامات مفردة غير قابلة للتغيير.
طلب HTTP
GET https://analyticsadmin.googleapis.com/v1alpha/{name=properties/*/dataStreams/*/globalSiteTag}
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات المسار
المعلمات |
name |
string
مطلوب. اسم علامة الموقع الإلكتروني المطلوب البحث عنها. تجدر الإشارة إلى أنّ علامات المواقع الإلكترونية هي علامات فردية وليس لها معرّفات فريدة. التنسيق: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag مثلاً: properties/123/dataStreams/456/globalSiteTag
|
نص الطلب
يجب أن يكون نص الطلب فارغًا.
نص الاستجابة
مورد للقراءة فقط مع علامة لإرسال البيانات من موقع إلكتروني إلى DataStream. لا تتوفّر هذه الميزة إلا لموارد DataStream على الويب.
إذا كانت الاستجابة ناجحة، سيحتوي نص الاستجابة على بيانات بالبنية التالية:
تمثيل JSON |
{
"name": string,
"snippet": string
} |
الحقول |
name |
string
النتائج فقط. اسم المورد لمورد GlobalSiteTag هذا. التنسيق: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag مثال: " properties/123/dataStreams/456/globalSiteTag"
|
snippet |
string
غير قابل للتغيير. مقتطف رمز JavaScript الذي سيتم لصقه كأول عنصر في علامة Head لكل صفحة ويب لقياسها.
|
نطاقات الأذونات
يتطلب هذا الإعداد أحد نطاقات OAuth التالية:
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-08-22 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-08-22 (حسب التوقيت العالمي المتفَّق عليه)"],[[["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"]]