تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
اختَر النظام الأساسي:
لا يعرض Measurement Protocol في "إحصاءات Google" رموزاً لخطأ
HTTP، حتى إذا كان الحدث منسقًا بشكل غير صحيح أو يفتقر إلى
مَعلمات مطلوبة. لضمان أنّ الأحداث صالحة، يجب اختبارها باستخدام
خادم التحقّق من الصحة في Measurement Protocol قبل نشرها.
بعد التأكّد من أنّ الأحداث منظَّمة بشكلٍ صحيح، عليك
التحقّق من عملية التنفيذ للتأكّد من استخدام المفاتيح الصحيحة.
يمكنك الاتصال بخادم التحقّق مباشرةً أو استخدام أداة إنشاء
الأحداث في "إحصاءات Google". يتيح لك "أداة إنشاء الأحداث" في "إحصاءات Google"
إنشاء الأحداث بشكل تفاعلي، ويستخدم خادم التحقّق من Measurement Protocol للقيام
بإثبات صحتها.
يوضّح هذا الدليل كيفية إرسال الأحداث إلى خادم التحقّق من Measurement Protocol في "إحصاءات Google 4" وتفسير الردّ.
إرسال الأحداث للتحقّق منها
الفرق الوحيد في طلب الأحداث المُرسَل إلى Measurement Protocol
وخادم التحقّق من صحة Measurement Protocol هو عنوان URL.
يعرض الرمز التالي حدثًا غير صالح يتم إرساله إلى خادم التحقّق في Measurement Protocol:
ردّ التحقّق
في ما يلي استجابة خادم التحقّق من الصحة للحدث السابق:
{"validationMessages":[{"fieldPath":"events","description":"Event at index: [0] has invalid name [_badEventName]. Names must start with an alphabetic character.","validationCode":"NAME_INVALID"}]}
في ما يلي استجابة خادم التحقّق من طلب لا يتضمّن أي مشاكل في التحقّق:
تاريخ التعديل الأخير: 2025-05-28 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-05-28 (حسب التوقيت العالمي المتفَّق عليه)"],[[["The Measurement Protocol Validation Server helps ensure your Google Analytics 4 events are correctly formatted before deploying to production."],["The Validation Server uses a different URL endpoint (`/debug/mp/collect`) than the standard Measurement Protocol (`/mp/collect`)."],["Validation responses provide detailed error messages including the field path, description, and a validation code for easier debugging."],["Events sent to the Validation Server are not processed and will not appear in your Google Analytics reports."],["The Google Analytics Event Builder offers an interactive way to construct and validate events before sending them to the server."]]],["To ensure valid events, use the Measurement Protocol Validation Server by sending requests to `/debug/mp/collect` instead of `/mp/collect`. Validate events before deploying them. This server doesn't log events in reports. It returns a response with `validationMessages`, an array detailing any errors like `NAME_INVALID`, `VALUE_REQUIRED`, or `VALUE_OUT_OF_BOUNDS`, specifying the `fieldPath`, `description`, and `validationCode` of the issue. Use the Google Analytics Event Builder for interactive event construction.\n"]]