Sanjay Vamja
Sanjay Vamja

Reputation: 2255

How to create new Campaign using Adwords Script

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?

Upvotes: 0

Views: 2635

Answers (1)

fabrigm
fabrigm

Reputation: 658

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();
}

Upvotes: 8

Related Questions