Hi,
I am writing a Google script to upload location bid modifiers for each
campaign, specified in a Google sheet.
The campaign names are specified in a column in a Google sheet and I am
using the following script:
var spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);
var sheet = spreadsheet.getActiveSheet();
var data = sheet.getRange("A:D").getValues();
var campaign = data[i][0] -- campaign names
var locationId = data[i][2]; -- location IDs
var bidModifier = data[i][3]; -- bid modifiers
if(campaign == "") { break; }
else {
var campaignIterator = campaignSelector.get();
while (campaignIterator.hasNext()) {
var campaign = campaignIterator.next()
var campaignName = campaign.getName();
var campaignId = campaign.getId();
campaignIds.push(campaignId);
if(locationId == "") { continue; }
else {
campaign.addLocation(locationId, bidModifier)
Logger.log(campaign + ' has added' + locationId)
However, this script is unable to read the campaign names. Can someone help
me with this?
Thanks!
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/fd481244-0896-45a2-a7fb-3c99d1adcb53o%40googlegroups.com.