קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
שירות Display & Video 360 (DV360) מאפשר לכם להשתמש ב-DV360 API ב-Apps Script. ה-API הזה מספק גישה פרוגרמטית ל-Display & Video API.
חומרי עזר
מידע מפורט על השירות הזה זמין במאמרי העזרה של DV360 API. בדומה לכל השירותים המתקדמים ב-Apps Script, שירות DV360 משתמש באותם אובייקטים, שיטות ופרמטרים כמו ממשק ה-API הציבורי. מידע נוסף זמין במאמר איך נקבעות חתימות של שיטות.
/** * Logs all of the partners available in the account. */functionlistPartners(){// Retrieve the list of available partnerstry{constpartners=DisplayVideo.Partners.list();if(partners.partners){// Print out the ID and name of eachfor(leti=0;i < partners.partners.length;i++){constpartner=partners.partners[i];console.log('Found partner with ID %s and name "%s".',partner.partnerId,partner.displayName);}}}catch(e){// TODO (Developer) - Handle exceptionconsole.log('Failed with error: %s',e.error);}}
קבלת רשימה של קמפיינים פעילים
בדוגמה הזו מתועדים השמות והמזהים של כל הקמפיינים הפעילים. שימו לב לשימוש באסימוני החלפה כדי לאחזר את הרשימה כולה.
/** * Logs names and ID's of all active campaigns. * Note the use of paging tokens to retrieve the whole list. */functionlistActiveCampaigns(){constadvertiserId='1234567';// Replace with your advertiser ID.letresult;letpageToken;try{do{result=DisplayVideo.Advertisers.Campaigns.list(advertiserId,{'filter':'entityStatus="ENTITY_STATUS_ACTIVE"','pageToken':pageToken});if(result.campaigns){for(leti=0;i < result.campaigns.length;i++){constcampaign=result.campaigns[i];console.log('Found campaign with ID %s and name "%s".',campaign.campaignId,campaign.displayName);}}pageToken=result.nextPageToken;}while(pageToken);}catch(e){// TODO (Developer) - Handle exceptionconsole.log('Failed with error: %s',e.error);}}
/** * Updates the display name of a line item */functionupdateLineItemName(){constadvertiserId='1234567';// Replace with your advertiser ID.constlineItemId='123456789';//Replace with your line item ID.constupdateMask="displayName";constlineItemDef={displayName:'New Line Item Name (updated from Apps Script!)'};try{constlineItem=DisplayVideo.Advertisers.LineItems.patch(lineItemDef,advertiserId,lineItemId,{updateMask:updateMask});}catch(e){// TODO (Developer) - Handle exceptionconsole.log('Failed with error: %s',e.error);}}
[[["התוכן קל להבנה","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-08-31 (שעון UTC)."],[],[]]