Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Layanan Display & Video 360 (DV360) memungkinkan Anda menggunakan
DV360 API
di Apps Script. API ini menyediakan akses terprogram ke Display & Video API.
Referensi
Untuk mengetahui informasi mendetail tentang layanan ini, lihat
dokumentasi referensi untuk
DV360 API. Seperti semua layanan lanjutan di Apps Script, layanan DV360 menggunakan objek, metode, dan parameter yang sama dengan API publik. Untuk mengetahui informasi selengkapnya, lihat Cara menentukan tanda tangan metode.
/** * 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);}}
Mendapatkan daftar kampanye aktif
Contoh ini mencatat nama dan ID semua kampanye aktif. Perhatikan penggunaan token penomoran halaman untuk mengambil seluruh daftar.
/** * 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);}}
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-31 UTC."],[],[]]