function main() { var FinalURL = 'https://yejaasserhrgjashsa.click'; var FinalURLsuffix = ''; var CampName = 'Kampanya2'; var GroupName = 'ReklamGrubu2'; var Networks = 'Google search'; var Budjet = 2480; var Location = "Turkiye"; var StrategyType = ""; var AdType = "RESPONSIVE SEARCH AD"; var Headline1 = '{KeyWord:yeni} Yenilenen Girişi'; var Headline2 = 'Yenilenen Web Site Adresi'; var Headline3 = 'Sizlerin Hizmetinde'; var Headline4 = '{KeyWord:Al} Tıkla'; var Description1 = 'Yeni Giriş Adresine Buradan Kolaylıkla Giriş Yapabilir Üyelik Gerçekleştirebilirsiniz.'; var Description2 = '{KeyWord:al} Adresimiz İçin Sizlere Güncellenen Web Adresimizden Hızlı Erişim Sağlıyoruz.'; var keywords = [ '' ]; function removeTargetedLocations(campaignName) { var selectors = [AdsApp.campaigns(), AdsApp.videoCampaigns(), AdsApp.shoppingCampaigns()]; for(var i = 0; i < selectors.length; i++) { var campaignIter = selectors. withCondition('CampaignName = "' + campaignName + '"'). get(); if (campaignIter.hasNext()) { var campaign = campaignIter.next(); var locationIterator = campaign.targeting().targetedLocations().get(); while (locationIterator.hasNext()) { var loc = locationIterator.next(); loc.remove(); } } } } function getCampaign(campaignName) { var selectors = [AdsApp.campaigns(), AdsApp.videoCampaigns(), AdsApp.shoppingCampaigns()]; for(var i = 0; i < selectors.length; i++) { var campaignIter = selectors. withCondition('CampaignName = "' + campaignName + '"'). get(); if (campaignIter.hasNext()) { return campaignIter.next(); } } throw new Error('Could not find specified campaign: ' + campaignName); } var columns = ['Campaign', 'Networks', 'Final URL suffix', 'Budget', 'Bid Strategy type', 'Campaign type', 'Ad group', 'Location', 'Max CPC','Keyword', 'Headline 1', 'Headline 2', 'Headline 3', 'Headline 4', 'Headline 5', 'Headline 6', 'Description 1', 'Description 2', 'Description 3', 'Description 4', 'Final URL', 'Ad Type']; var upload = AdsApp.bulkUploads().newCsvUpload( columns, {moneyInMicros: false}); upload.append({ 'Campaign': CampName, 'Networks': Networks, 'Final URL suffix': FinalURLsuffix, 'Bid Strategy type': 'Maximize clicks', 'Campaign type': 'Search Only', 'Budget': Budjet, 'Location': Location, }); upload.append({ 'Campaign': CampName, 'Ad group': GroupName, 'Bid Strategy type': 'Maximize clicks', }); for (var i = 0; i < keywords.length; i++) { var keyword = keywords; upload.append({ 'Campaign': CampName, 'Ad group': GroupName, 'Keyword': keyword }); } upload.append({ 'Campaign': CampName, 'Ad group': GroupName, 'Headline 1': Headline1, 'Headline 2': Headline2, 'Headline 3': Headline3, 'Headline 4': Headline4, 'Description 1': Description1, 'Description 2': Description2, 'Final URL': FinalURL, 'Final URL suffix': FinalURLsuffix, 'Ad Type': AdType, }); upload.apply(); }