تفعيل ميزة "القياس المفتوح"
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تتضمّن حزمة تطوير البرامج (SDK) الخاصة بـ "إعلانات الوسائط التفاعلية" في HTML5
حزمة تطوير البرامج (SDK) الخاصة بـ Open Measurement (OM)،
وهي معيار متّبع في المجال تم تطويره من قِبل
مكتب الإعلانات التفاعلية (IAB) بهدف إتاحة قياس إمكانية العرض والتحقّق من صحة البيانات من جهات خارجية. عند استخدام حزمة تطوير البرامج للإعلانات التفاعلية من Google في HTML5، تحلّل حزمة تطوير البرامج (SDK) المضمّنة في Open Measurement تلقائيًا العلامة <AdVerifications>
ضمن علامات إعلانات VAST، وترسل بيانات إمكانية العرض إلى مورّدي القياس المحدّدين باستخدام واجهة برمجة التطبيقات OMID. يمكنك اختياريًا ضبط قواعد وضع الوصول لكل طلب للتحكّم في المحتوى الذي يمكن لبرنامج التحقّق الوصول إليه.
تتوافق حزمة تطوير البرامج لإعلانات الوسائط التفاعلية مع الإصدار 1.4 من حزمة OM SDK.
المتطلبات الأساسية
في حال استخدام الإصدار 4.1 أو الإصدارات الأحدث من VAST، يجب ضبط الإعلانات لتوفير عملية التحقّق باستخدام <AdVerifications>
. في حال استخدام إصدارات VAST السابقة، يجب أن تستخدم الإعلانات
<Extension type="AdVerifications">
.
إذا تمّ عرض إعلاناتك من خلال "مدير إعلانات Google"، عليك إعداد مقدّم خدمة قياس مدى الظهور لشبكتك على "مدير إعلانات Google" وتعيين مقدّم خدمة قياس مدى الظهور هذا لعنصر إعلانك. لمزيد من المعلومات، يُرجى الاطّلاع على ضبط موفّر قياس مدى ظهور الإعلان لشبكتك على "مدير إعلانات Google".
أوضاع الوصول
تتيح حزمة تطوير البرامج OM SDK تشغيل نصوص برمجية للتحقّق في أربعة أوضاع وصول مختلفة
تتحكّم في مقدار البيانات التي يمكن أن تصل إليها نصوص التحقّق البرمجية:
FULL
: يمكن لنص التحقّق البرمجي الوصول مباشرةً إلى تصميم الإعلان وصفحة الناشر.
CREATIVE
: يتم وضع نص التحقّق والإعلان في وضع الحماية بعيدًا عن صفحة الناشر. ومع ذلك، يمكن للنص البرمجي الوصول مباشرةً إلى تصميم الإعلان.
LIMITED
: يتم وضع نص التحقّق البرمجي في بيئة الاختبار المعزولة، ولا يمكنه الوصول إلى تصميم الإعلان أو صفحة الناشر، كما لا يمكنه التأكّد مباشرةً من نطاق الناشر الذي يظهر عليه.
قد لا يتيح بعض مقدّمي خدمات قياس مدى ظهور الإعلان جميع أوضاع الوصول. يُرجى التواصل مع مقدّمي خدمات قياس إمكانية العرض للتحقّق من الأوضاع المتوافقة. في السابق، كان IMA يتيح وضع الوصول DOMAIN
، والذي تم ضبطه تلقائيًا الآن على الوضع LIMITED
.
ضبط قواعد وضع الوصول لطلب
يجب ضبط قواعد وضع الوصول على مستوى
AdsRequest
. لضبط أوضاع وصول مختلفة لمقدّمي نصوص التحقّق المختلفة، مرِّر قاموسًا يربط كل
OmidVerificationVendor
بأحد أوضاع الوصول المذكورة أعلاه. يُستخدَم الحقل
OmidVerificationVendor.OTHER
لضبط وضع الوصول التلقائي لجميع المورّدين غير المضمّنين بشكل صريح في القاموس. في حال عدم تحديد أي قواعد لوضع الوصول، يتم تشغيل نصوص التحقّق في وضع الوصول
LIMITED
الخاص بالمورّدين.
انظر المثال التالي الذي يضبط GOOGLE
على google.ima.OmidAccessMode.FULL
. بالنسبة إلى جميع موفّري الخدمات الآخرين، بما في ذلك الموفّرون المدرَجون في OmidVerificationVendor
، يكون الإعداد التلقائي هو الإعداد الذي تم ضبطه في OmidVerificationVendor.OTHER
.
request.omidAccessModeRules = {};
request.omidAccessModeRules[google.ima.OmidVerificationVendor.GOOGLE]
= google.ima.OmidAccessMode.FULL;
request.omidAccessModeRules[google.ima.OmidVerificationVendor.OTHER]
= google.ima.OmidAccessMode.LIMITED;
لتنفيذ وضع الوصول CREATIVE
، يجب اتّباع الخطوتَين التاليتَين:
وضع مشغّل الفيديو في وضع الحماية ضمن إطار iframe آمن ومعزول عن بقية موقعك الإلكتروني
اضبط OmidAccessMode
لشريك إمكانية العرض على FULL
.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-09-05 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-09-05 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe IMA SDK for HTML5 utilizes the Open Measurement (OM) SDK for third-party viewability and verification measurement, automatically sending data to specified vendors.\u003c/p\u003e\n"],["\u003cp\u003eAds must be configured to supply verification using \u003ccode\u003e<AdVerifications>\u003c/code\u003e (VAST 4.1+) or \u003ccode\u003e<Extension type="AdVerifications">\u003c/code\u003e (previous VAST versions).\u003c/p\u003e\n"],["\u003cp\u003eFour access modes (FULL, CREATIVE, DOMAIN, LIMITED) control verification script access to the creative and publisher page, impacting the level of data access.\u003c/p\u003e\n"],["\u003cp\u003eAccess mode rules are set at the \u003ccode\u003eAdsRequest\u003c/code\u003e level, allowing customized access for different verification vendors, with \u003ccode\u003eLIMITED\u003c/code\u003e as the default.\u003c/p\u003e\n"],["\u003cp\u003eImplementing \u003ccode\u003eCREATIVE\u003c/code\u003e access mode requires sandboxing the video player in a secure iframe and setting the \u003ccode\u003eOmidAccessMode\u003c/code\u003e to \u003ccode\u003eFULL\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Enable Open Measurement\n\nThe IMA SDK for HTML5 includes the\n[Open Measurement (OM) SDK](//iabtechlab.com/standards/open-measurement-sdk/),\nan industry standard developed by the\n[Interactive Advertising Bureau (IAB)](//www.iab.com/) to enable third-party\nviewability and verification measurement. When using the IMA SDK for HTML5, the\nincluded OM SDK automatically parses the `\u003cAdVerifications\u003e` tag within VAST ad\ntags and sends viewability data to the specified measurement vendors using the\nOMID API. You can optionally set access mode rules for each request to control\nwhat content the verification script can access.\n\nThe IMA SDK supports OM SDK v1.4.\n\nPrerequisites\n-------------\n\n- If using VAST 4.1 or higher, ads must be configured to supply verification\n using `\u003cAdVerifications\u003e`. If using previous VAST versions, ads must use\n `\u003cExtension type=\"AdVerifications\"\u003e`.\n\n- If your ads are trafficked through Ad Manager, configure a viewability\n provider for your Ad Manager network and assign that viewability provider to\n your line item. For more information, see\n [Configure a viewability provider for your Ad Manager network](//support.google.com/admanager/answer/9025968#configure-a-viewability-provider).\n\nAccess modes\n------------\n\nThe OM SDK supports running verification scripts in four different access modes\nwhich controls how much the verification script can access:\n\n- `FULL`: The verification script has direct access to the creative and the\n publisher page.\n\n- `CREATIVE`: The verification script and creative are sandboxed from the\n publisher page. However, the script has direct access to the creative.\n\n- `LIMITED`: The verification script is sandboxed and cannot access the creative\n or publisher page, and cannot directly confirm what publisher domain it is on.\n\nSome viewability providers might not support all access modes. Contact your\nviewability providers to verify which modes are supported. Previously, IMA\nsupported a `DOMAIN` access mode, which now defaults to `LIMITED` mode.\n\nSet the access mode rules for a request\n---------------------------------------\n\nAccess mode rules must be set at the [`AdsRequest`](/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdsRequest#omidAccessModeRules) level. To set different access modes for different verification script providers, pass a dictionary that maps each [`OmidVerificationVendor`](/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima#.OmidVerificationVendor) to one of the access modes listed above. The `OmidVerificationVendor.OTHER` field is used to set the default access mode for all vendors not explicitly included in the dictionary. If no access mode rules are specified, verification scripts run in `LIMITED` access mode for vendors.\n\n\u003cbr /\u003e\n\nSee the following example which sets `GOOGLE` to\n`google.ima.OmidAccessMode.FULL`. All other providers, including those\nlisted in\n[`OmidVerificationVendor`](/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima#.OmidVerificationVendor),\ndefault to how `OmidVerificationVendor.OTHER` is set. \n\n request.omidAccessModeRules = {};\n request.omidAccessModeRules[google.ima.OmidVerificationVendor.GOOGLE]\n = google.ima.OmidAccessMode.FULL;\n request.omidAccessModeRules[google.ima.OmidVerificationVendor.OTHER]\n = google.ima.OmidAccessMode.LIMITED;\n\n\nTo implement `CREATIVE` access mode, you must follow both of the following\nsteps:\n\n1. Sandbox your video player in a secure iframe, isolated from the rest of your\n site.\n\n2. Set the `OmidAccessMode` for your viewability partner to `FULL`."]]