How to create new Campaign using Adwords Script

无人久伴 提交于 2019-12-12 03:42:51

问题


Using Google Adwords Script, you can create a Ad Group like given here - https://developers.google.com/adwords/scripts/docs/examples/ad-groups. But there is no reference on how to create a Campaign.

How to create a new campaign using Google Adwords Script?


回答1:


You can not create it the same way.

But you can create it by bulk upload:

function createOrUpdateCampaigns() {
  // See https://developers.google.com/adwords/scripts/docs/features/bulk-upload
  // for the list of supported bulk upload templates and their column names.
  var columns = [
    'Campaign', 'Budget', 'Bid Strategy type', 'Campaign type'
  ];

  var upload = AdWordsApp.bulkUploads().newCsvUpload(
      columns, {moneyInMicros: false});

  // AdWords identify existing campaigns using its name. To create a new
  // campaign, use a campaign name that doesn't exist in your account.
  upload.append({
    'Campaign': 'Test Campaign 1',
    'Budget': 234,
    'Bid Strategy type': 'cpc',
    'Campaign type': 'Search Only'
  });
  // Use upload.apply() to make changes without previewing.
  upload.preview();
}


来源:https://stackoverflow.com/questions/40257078/how-to-create-new-campaign-using-adwords-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!