הגדרות של מודעות מוגבלות ומזהים מאינטראקציה ישירה (First-Party)
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אם מעדכנים את ההגדרות של Ad Manager מודעות מוגבלות פרוגרמטיות או קובצי cookie מאינטראקציה ישירה (First-Party) למודעות באינטרנט, צריך להשתמש בממשקי ה-API החדשים האלה כדי להתאים את ההגדרות ב-Ad Manager. אם לא משתמשים בממשקי ה-API, יכול להיות ש-PAL יכלול את המזהים במזהה החד-פעמי (nonce) שמשמש בבקשה להצגת מודעה לשרת. עם זאת, ייתכן שמערכת Ad Manager תסיר את האותות על סמך ההגדרות ב-Ad Manager.
ממשקי ה-API הם:
disableLimitedAdsStorage
– השבתת קובצי cookie לזיהוי תנועה לא חוקית בלבד והשימוש באחסון מקומי למודעות מוגבלות. אם עדכנתם את ההגדרה מודעות מוגבלות פרוגרמטיות ב-Ad Manager בקטע ניהול > הגדרות גלובליות, תוכלו להשתמש ב-API הזה כדי להשבית את השימוש באחסון המקומי של מודעות מוגבלות ב-PAL. חשוב לציין שההגדרה הזו לא חלה על מודעות ללא הגבלה.
disableFirstPartyIdentifiers
– משביתה מזהים מאינטראקציה ישירה שמשמשים לבחירת מודעות. אם עדכנתם את ההגדרה First-party cookies for ads on the web (קובצי cookie מאינטראקציה ישירה (First-party) למודעות באינטרנט) ב-Ad Manager בקטע ניהול > גלובלי, תוכלו להשתמש ב-API הזה כדי להשבית מזהים כאלה ב-PAL. חשוב לציין שההגדרה הזו לא חלה על השימוש בקובצי Cookie ובאחסון מקומי לצורך זיהוי תנועה לא חוקית.
בדוגמה הבאה מוגדרים הפרמטרים הבאים:
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 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-21 (שעון UTC)."],[],[],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);"]]