संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
DoubleClick Campaigns की सेवा की मदद से, Apps Script में DCM/DFA रिपोर्टिंग और ट्रैफ़िकिंग एपीआई का इस्तेमाल किया जा सकता है. यह एपीआई, DoubleClick Campaign
Manager (DCM) और DoubleClick Digital Marketing (DDM) रिपोर्टिंग को प्रोग्राम के हिसाब से, अपने-आप होने वाली प्रोसेस का ऐक्सेस देता है.
रेफ़रंस
इस सेवा के बारे में ज़्यादा जानकारी के लिए, DCM/DFA रिपोर्टिंग और ट्रैफ़िकिंग एपीआई का रेफ़रंस दस्तावेज़ देखें. Apps Script की सभी बेहतर सेवाओं की तरह, DoubleClick Campaigns की सेवा भी पब्लिक एपीआई के जैसे ही ऑब्जेक्ट, तरीकों, और पैरामीटर का इस्तेमाल करती है. ज़्यादा जानकारी के लिए, मेथड सिग्नेचर तय करने का तरीका लेख पढ़ें.
/** * Logs all of the user profiles available in the account. */functionlistUserProfiles(){// Retrieve the list of available user profilestry{constprofiles=DoubleClickCampaigns.UserProfiles.list();if(profiles.items){// Print out the user ID and name of eachfor(leti=0;i < profiles.items.length;i++){constprofile=profiles.items[i];console.log('FoundprofilewithID%sandname"%s".',profile.profileId,profile.userName);}}}catch(e){// TODO (Developer) - Handle exceptionconsole.log('Failedwitherror:%s',e.error);}}
चालू कैंपेन की सूची पाना
यह सैंपल, सभी चालू कैंपेन के नाम और आईडी को लॉग करता है. पूरी सूची पाने के लिए, पेजिंग टोकन का इस्तेमाल करने पर ध्यान दें.
/** * Logs names and ID's of all active campaigns. * Note the use of paging tokens to retrieve the whole list. */functionlistActiveCampaigns(){constprofileId='1234567';// Replace with your profile ID.constfields='nextPageToken,campaigns(id,name)';letresult;letpageToken;try{do{result=DoubleClickCampaigns.Campaigns.list(profileId,{'archived':false,'fields':fields,'pageToken':pageToken});if(result.campaigns){for(leti=0;i < result.campaigns.length;i++){constcampaign=result.campaigns[i];console.log('FoundcampaignwithID%sandname"%s".',campaign.id,campaign.name);}}pageToken=result.nextPageToken;}while(pageToken);}catch(e){// TODO (Developer) - Handle exceptionconsole.log('Failedwitherror:%s',e.error);}}
विज्ञापन देने वाला नया खाता और कैंपेन बनाना
इस सैंपल में, विज्ञापन देने वाला एक नया खाता बनाया जाता है और उस खाते के लिए नया कैंपेन बनाया जाता है. कैंपेन एक महीने तक चलेगा.
/** * Creates a new advertiser, and creates a new campaign with that advertiser. * The campaign is set to last for one month. */functioncreateAdvertiserAndCampaign(){constprofileId='1234567';// Replace with your profile ID.constadvertiser={name:'ExampleAdvertiser',status:'APPROVED'};try{constadvertiserId=DoubleClickCampaigns.Advertisers.insert(advertiser,profileId).id;constlandingPage={advertiserId:advertiserId,archived:false,name:'Examplelandingpage',url:'https://www.google.com'};constlandingPageId=DoubleClickCampaigns.AdvertiserLandingPages.insert(landingPage,profileId).id;constcampaignStart=newDate();// End campaign after 1 month.constcampaignEnd=newDate();campaignEnd.setMonth(campaignEnd.getMonth()+1);constcampaign={advertiserId:advertiserId,defaultLandingPageId:landingPageId,name:'Examplecampaign',startDate:Utilities.formatDate(campaignStart,'GMT','yyyy-MM-dd'),endDate:Utilities.formatDate(campaignEnd,'GMT','yyyy-MM-dd')};DoubleClickCampaigns.Campaigns.insert(campaign,profileId);}catch(e){// TODO (Developer) - Handle exceptionconsole.log('Failedwitherror:%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"]],["आखिरी बार 2024-12-21 (UTC) को अपडेट किया गया."],[[["The DoubleClick Campaigns service enables programmatic access to DoubleClick Campaign Manager (DCM) and DoubleClick Digital Marketing (DDM) Reporting within Apps Script."],["It's an advanced service that requires enabling before use and mirrors the functionality of the DCM/DFA Reporting and Trafficking API."],["Provided sample code demonstrates how to list user profiles, get active campaigns, and create advertisers and campaigns using the service."],["Developers can leverage the service to automate tasks, extract data, and manage DCM/DDM entities directly from their Apps Script projects."]]],[]]