How to bulk upload search only campaign type? (using ads script)

95 views
Skip to first unread message

Sigurd

unread,
Jul 29, 2019, 8:03:44 AM7/29/19
to Google Ads Scripts Forum
Hi,

I'm having difficulties creating new search campaigns - without including display.

Can I use 'Campaign subtype' (btw: cannot find a list of values for this) or is there another way to go about it?


var columns = ["Campaign", "Budget", "Bid Strategy type", "Campaign type", "Campaign state"];
var campaignName = 'test campaign'; 
var upload = AdsApp.bulkUploads().newCsvUpload(columns);
upload.append({
   "Campaign": campaignName,
   "Budget": 1,
   "Bid Strategy type": "cpc",
   "Campaign type": "search", // This creates search & display. How can I create search only?
   "Campaign state": "paused",
});
upload.setFileName('add campaign: '+ campaignName)
upload.preview()
}


In the guide there's reference to a 'Search Only' campaign type - but this value throws an error.
Also, 'Search Only'  campaign type is not on the list here https://developers.google.com/google-ads/scripts/docs/features/bulk-upload-entities 


Thanks

 sigurd

Google Ads Scripts Forum Advisor Prod

unread,
Jul 29, 2019, 2:26:51 PM7/29/19
to adwords-scripts+apn2wqevinbbivog...@googlegroups.com, adwords-scripts+apn2wqevinbbivog...@googlegroups.co, adwords...@googlegroups.com
Hi Sigurd,

Please use the campaign type value, "Search Only" for search only campaigns. You can find more information on bulk uploads here.

Regards,
Matt
Google Ads Scripts Team

ref:_00D1U1174p._5001UEGyhR:ref

Sigurd

unread,
Jul 29, 2019, 3:23:46 PM7/29/19
to Google Ads Scripts Forum
Hi Matt,

Thanks for the reply. However, as I mentioned before, 'Search Only' throws an error.

Screen Shot 2019-07-29 at 21.19.16.png

Can you get my code to work using 'Search Only'?

function main() {
var columns = ["Campaign", "Budget", "Bid Strategy type", "Campaign type", "Campaign state"];
var campaignName = 'bulk test campaign'; 
var upload = AdsApp.bulkUploads().newCsvUpload(columns);
upload.append({
   "Campaign": campaignName,
   "Budget": 1,
   "Bid Strategy type": "cpc",
   "Campaign type": "Search Only", // This throws an error
   "Campaign state": "paused",
});
upload.setFileName('add campaign: '+ campaignName)
upload.preview()
}

Google Ads Scripts Forum Advisor Prod

unread,
Jul 29, 2019, 4:07:35 PM7/29/19
to adwords-scripts+apn2wqevinbbivog...@googlegroups.com, adwords-scripts+apn2wqevinbbivog...@googlegroups.co, adwords...@googlegroups.com
Hi Sigurd,

Thanks for following up on that -- it should be:

 "Campaign type": "Search Network Only", 

Sigurd

unread,
Jul 30, 2019, 2:33:53 AM7/30/19
to Google Ads Scripts Forum
Unfortunately, "Campaign type": "Search Network Only" also throws an error ''

Screen Shot 2019-07-30 at 08.25.31.png









In the documentation it seems there are only three valid campaign types (?)


Screen Shot 2019-07-30 at 08.29.58.png








function main() {
var columns = ["Campaign", "Budget", "Bid Strategy type", "Campaign type", "Campaign state"];
var campaignName = 'bulk test campaign'; 
var upload = AdsApp.bulkUploads().newCsvUpload(columns);
upload.append({
   "Campaign": campaignName,
   "Budget": 1,
   "Bid Strategy type": "cpc",
   "Campaign type": "Search Network Only", // Throws error: "The value 'Search Network Only' in column 'Campaign type' is invalid."
   "Campaign state": "paused",
});
upload.setFileName('add campaign: '+ campaignName)
upload.preview()
}

Sigurd

unread,
Jul 30, 2019, 8:07:54 AM7/30/19
to Google Ads Scripts Forum
[SOLVED]

To create a search only campaign via bulk upload it is necessary to include 'Networks'. It cannot be done using 'Campaign type' as specified in Google's documentation.
Also, the list of supported entities should be updated with 'Networks' https://developers.google.com/google-ads/scripts/docs/features/bulk-upload-entities

This code works - using the (secret) entity 'Networks'
function main() {
var columns = ['Campaign', 'Budget', 'Bid Strategy type', 'Campaign type', 'Campaign state', 'Networks'];
var campaignName = 'test campaign'; 
var upload = AdsApp.bulkUploads().newCsvUpload(columns);
upload.append({
   'Campaign': campaignName,
   'Budget': 1,
   'Bid Strategy type': 'cpc',
   'Campaign type': 'Search', // this create search & display campaigns
   'Campaign state': 'paused',
   'Networks': 'Google search; Search Partners', // this overrule campaign type
});
upload.setFileName('add campaign: '+ campaignName)
upload.preview()
}

Everybody learns something today :)


cheers
  sigurd

Google Ads Scripts Forum Advisor Prod

unread,
Jul 30, 2019, 2:21:34 PM7/30/19
to adwords-scripts+apn2wqevinbbivog...@googlegroups.com, adwords-scripts+apn2wqevinbbivog...@googlegroups.co, adwords...@googlegroups.com
Hi Sigurd,

Thank you for posting your solution to this issue. We will update the documentation accordingly.
Message has been deleted

Bastien Rabaute

unread,
Aug 20, 2019, 11:52:56 AM8/20/19
to Google Ads Scripts Forum
It seems magic but it doesn't work with my script. I do exactly what you do but the campaign is still created with the Display network activated.

Does it still work for you ?

How did you find the network parameters and the value of this parameter ? Is there a secret doc somewhere ? In the API doc maybe ?

Bastien Rabaute

unread,
Aug 20, 2019, 11:57:32 AM8/20/19
to Google Ads Scripts Forum
sorry, it works perfectly ! :) Thanks. I have forgotten to change the columns list.

Where did you find the "network" information and the values for this parameter ? 

Bastien Rabaute

unread,
Aug 20, 2019, 12:01:06 PM8/20/19
to Google Ads Scripts Forum
Reply all
Reply to author
Forward
0 new messages