إعدادات الإعلانات المحدودة ومعرّف الطرف الأول
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
في حال تعديل إعدادات "مدير إعلانات Google" الإعلانات المحدودة الآلية أو
ملفّات تعريف الارتباط
التابعة للطرف الأول
للإعلانات على
الويب،
استخدِم واجهات برمجة التطبيقات الجديدة هذه لمطابقة الإعدادات في "مدير إعلانات Google". في حال عدم استخدام واجهة برمجة التطبيقات، قد يُدرِج PAL المعرّفات في الرمز المؤقت الذي يتم استخدامه في طلب الإعلان المُرسَل إلى الخادم. ومع ذلك، قد يتخلّص "مدير إعلانات Google" من الإشارات استنادًا إلى
الإعدادات في "مدير إعلانات Google".
في ما يلي واجهات برمجة التطبيقات:
-
disableLimitedAdsStorage
-
يؤدي هذا الخيار إلى إيقاف ملفّات تعريف الارتباط
المخصّصة فقط لرصد الزيارات غير الصالحة
واستخدام مساحة التخزين المحلية للإعلانات المحدودة. إذا عدّلت إعداد
الإعلانات المحدودة الآلية في "مدير إعلانات Google" ضمن
المشرف > الإعدادات الشاملة، استخدِم واجهة برمجة التطبيقات هذه لإيقاف استخدام مساحة التخزين المحلية
للإعلانات المحدودة في PAL. يُرجى العِلم أنّ هذا الإعداد لا ينطبق على الإعلانات غير المحدود
ة.
-
disableFirstPartyIdentifiers
-
يؤدي هذا الخيار إلى إيقاف معرّفات الطرف الأول المستخدَمة لاختيار الإعلانات. إذا عدّلت إعدادات
ملفّات تعريف الارتباط الخاصة بالطرف الأول
للإعلانات على
الويب
في "مدير إعلانات Google" ضمن الإعدادات المشرف > الإعدادات العامة، استخدِم واجهة برمجة التطبيقات هذه لإيقاف هذه المعرّفات في PAL. يُرجى العلم أنّ هذا الإعداد لا ينطبق على
استخدام ملفات تعريف الارتباط و
مساحة التخزين على الجهاز لرصد الزيارات غير الصالحة.
يحدِّد المثال التالي هذه المَعلمات:
const consentSettings = new goog.pal.ConsentSettings();
consentSettings.allowStorage = getConsentToStorage();
const adManagerSettings = new goog.pal.GoogleAdManagerSettings();
// Add this line if the "Programmatic limited ads" toggle is turned off in
// Ad Manager.
adManagerSettings.disableLimitedAdsStorage = true;
// Add this line if the "First party cookies for ads on web" toggle
// is turned off in Ad Manager.
adManagerSettings.disableFirstPartyIdentifiers = true;
const nonceLoader = new goog.pal.NonceLoader(consentSettings, adManagerSettings);
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-21 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-21 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Limited ads and first party identifier settings\n\nIf you update the Ad Manager settings **Programmatic limited ads** or\n**First party\ncookies\nfor ads on\nweb**,\nuse these new APIs to match the settings in Ad Manager. If you don't use the\nAPIs PAL might include the identifiers in the nonce that is used in the ad\nrequest to the server. However, Ad Manager might drop the signals based on the\nsettings in Ad Manager.\n\nThe APIs are as follows:\n\n- [`disableLimitedAdsStorage`](/ad-manager/pal/html5/reference/js/GoogleAdManagerSettings#disableLimitedAdsStorage) - disables invalid traffic detection-only cookies and use of local storage for limited ads. If you updated the **Programmatic limited ads** setting in Ad Manager within **Admin \\\u003e Global settings**, use this API to disable usage of local storage for limited ads in PAL. Note that this setting does not apply to non-limited ads.\n- [`disableFirstPartyIdentifiers`](/ad-manager/pal/html5/reference/js/GoogleAdManagerSettings#disableFirstPartyIdentifiers) - disables first-party identifiers used for ad selection. If you updated the **First party\n cookies\n for ads on\n web** setting in Ad Manager within **Admin \\\u003e Global** settings, use this API to disable such identifiers in PAL. Note that this setting does not apply to the use of cookies and local storage for invalid traffic detection.\n\nThe following example sets these parameters: \n\n const consentSettings = new goog.pal.ConsentSettings();\n consentSettings.allowStorage = getConsentToStorage();\n\n const adManagerSettings = new goog.pal.GoogleAdManagerSettings();\n // Add this line if the \"Programmatic limited ads\" toggle is turned off in\n // Ad Manager.\n adManagerSettings.disableLimitedAdsStorage = true;\n // Add this line if the \"First party cookies for ads on web\" toggle\n // is turned off in Ad Manager.\n adManagerSettings.disableFirstPartyIdentifiers = true;\n\n const nonceLoader = new goog.pal.NonceLoader(consentSettings, adManagerSettings);"]]