问题
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