To use it, you will need to create a new Google Spreadsheet and load it with the adgroup name, param 1 value, and param 2 value in columns A, B, and C respectively (with column headers). Then copy that url into the script and you should be good to go.
Thanks,
Russ
/************************************************ * Update Ad Params by Ad Groups * Version 1.1 * ChangeLog v1.1 * - Added the ability to enable param1 or 2 individually * - Looks for Keywords on all sheets * - Runs much faster * Created By: Russ Savage * FreeAdWordsScripts.com ************************************************/ var SPREADSHEET_URL = "PUT YOUR SPREADSHEET URL HERE"; var SET_PARAM1 = true; var SET_PARAM2 = false; var DATA_RANGE = 'A:D'; // A - CampaignName, B - AdGroupName, // C - Param1, D - Param2 function main() { var spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL); var allSheets = spreadsheet.getSheets(); var allData = []; for(var i in allSheets) { var sheet = allSheets[i]; var data = sheet.getRange(DATA_RANGE).getValues(); data.shift(); //get rid of headers allData = allData.concat(data); } var allDataHash = {}; for(var i in allData) { var row = allData[i]; if(row[0] === '') { continue; } var rowKey = [row[0],row[1]].join('~~!~~'); allDataHash[rowKey] = { param1 : row[2], param2: row[3] }; } var kwIter = AdWordsApp.keywords() .withCondition('CampaignStatus = ENABLED') .withCondition('AdGroupStatus = ENABLED') .withCondition('Status = ENABLED') .get(); while(kwIter.hasNext()) { var kw = kwIter.next(); var campName = kw.getCampaign().getName(); var adGroupName = kw.getAdGroup().getName(); var rowKey = [campName,adGroupName].join('~~!~~'); if(allDataHash[rowKey]) { if(SET_PARAM1) { kw.setAdParam(1, allDataHash[rowKey].param1); } if(SET_PARAM2) { kw.setAdParam(2, allDataHash[rowKey].param2); } } } }
Here is a thing https://resumecvwriter.com/blog/what-to-include-in-a-resume on what to include into a programmer resume!
ReplyDeleteدانلود آهنگ
ReplyDeleteماکان بند
بهنام بانی
شاهین بنان
The team was ready to begin the project quickly and did more work than expected. UX
ReplyDeletebrand agencies team but was ready to communicate professionally with the client about the timeline.
UX design has received regeneration from clients. UX app agency design manages the roof of the new website. UI/UX design appreciated how good the communication was and the way they kept they updated on the status of the project.
ReplyDeleteGreat article! We will be linking to this great article on our website. Keep up the good writing.
ReplyDeleteدانلود سریال قورباغه دانلود سریال قورباغه دانلود سریال قورباغه دانلود سریال قورباغه
The purpose of the Excel application is to allow users to collect like data in a specific location for current and/or future use. Excel spreadsheet expert
ReplyDelete