Location Target Setting for Bulk Upload Campaign

40 views
Skip to first unread message

Ryan Au

unread,
Jun 7, 2024, 10:16:55 AM (14 days ago) Jun 7
to Google Ads Scripts Forum
Hello, I've written a function to create a new campaign. By default, all newly created campaigns are set to 'Presence or interest'. I need assistance with creating and uploading a campaign with the 'Presence' setting. I tried the following method, but it didn't work. Thanks for your time!

-----------------
function queueCampaignForCreation(upload, name, city, state) {
  var locationSetting = generateLocationSetting(city, state);
  var budget = 1; // Default budget for all campaigns

  upload.append({
    'Campaign': name,
    'Budget': budget,
    'Bid Strategy type': 'Maximize Conversions',
    'Campaign type': 'Search Only',
    'Networks': 'Google Search', // Only Google Search, exclude Search Partners and Display Network
    'Location': locationSetting,
    'Location Options': 'Presence' // Location option setting
  });
  Logger.log('Campaign queued for creation with location setting: ' + locationSetting + ' and budget: ' + budget);
}

function generateLocationSetting(city, state) {
  return '10 | mi | ' + city + ', ' + state;
}


--------------

Google Ads Scripts Forum Advisor

unread,
Jun 7, 2024, 2:44:51 PM (14 days ago) Jun 7
to adwords...@googlegroups.com

Hi,

Thank you for contacting the Google Ads Scripts team. 

Upon checking your concern, I Understand that you're facing an issue with the script. Please provide us with the following information to further investigate this issue:

  • Google Ads account ID, or CID.
  • Name of the script.
  • Error details or a screenshot of the issue (if any).

You can send the details via Reply privately to the author option, or direct private reply to this email.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJFWP:ref" (ADR-00238969)

Thanks,
 
Google Logo Google Ads Scripts Team


Ryan Au

unread,
Jun 10, 2024, 5:01:49 AM (11 days ago) Jun 10
to Google Ads Scripts Forum

Hello, thanks for your reply. I just want to know if it's possible to switch the location option when I do the bulk upload, or do I have to do it after the campaign is created? I'm not sure if App Script can update the location option.

If it can, could you provide me with some references on the coding?
Reply all
Reply to author
Forward
0 new messages