RcBuilder@walla.com
call centre: 054-5614020

Adwords scripts – demo script

Posted by: RcBuilder  /   Category: Adwords Scripts / EMAIL / ENTITIES / JAVASCRIPT / REPORTS / SELECTORS & ITERATORS / SEM / SPREADSHEET / UTILITIES   /   1 Comment
08
Jun
2014

Create Report as PDF and send via email var EMAIL = 'rcbuilder@walla.com'; function main() { var spreadsheet = SpreadsheetApp.create("My Report"); // create new spreadsheet var sheet = spreadsheet.getActiveSheet(); // get active sheet var report = AdWordsApp.report("SELECT AdGroupId, Impressions, Cost FROM SEARCH_QUERY_PERFORMANCE_REPORT DURING LAST_30_DAYS"); // execute report report.exportToSheet(sheet); // fill sheet with the report data var last_row = sheet.getLastRow(); var last_column = sheet.getLastColumn(); var range.

Read more

Adwords scripts – demo script

Posted by: RcBuilder  /   Category: Adwords Scripts / EMAIL / ENTITIES / JAVASCRIPT / REPORTS / SELECTORS & ITERATORS / SEM / SPREADSHEET / UTILITIES   /   No Comments
08
Jun
2014

create sheet from report and read specific fields function main() { var spreadsheet = SpreadsheetApp.create("My Report"); var sheet = spreadsheet.getActiveSheet(); var report = AdWordsApp.report( "SELECT AdGroupId, Impressions, Cost " + "FROM SEARCH_QUERY_PERFORMANCE_REPORT " + "DURING LAST_30_DAYS"); // execute report report.exportToSheet(sheet); var range = sheet.getRange(1, 3, 7, 3); var values = range.getValues(); for(r in values) for(c in.

Read more

Adwords scripts – demo script

Posted by: RcBuilder  /   Category: Adwords Scripts / ENTITIES / JAVASCRIPT / REPORTS / SELECTORS & ITERATORS / SEM / UTILITIES   /   No Comments
08
Jun
2014

Send PDF Report Based on HTML Content via email var EMAIL = 'rcbuilder@walla.com'; function main() { var html = "<h1>Report Header</h1>" + "<p>this report created via adsense script</p>" + "<p>" + new Date() + "</p>"+ "<p>word A : 300 clicks</p>"+ "<p>word B : 263 clicks</p>"+ "<p>word C : 109 clicks</p>"+ "<p>END OF THE REPORT</p>"; var blob = Utilities.newBlob(html, MimeType.HTML); var pdfBlob = blob.getAs(MimeType.PDF); MailApp.sendEmail(EMAIL, 'HELLO FROM ADWORDS.

Read more

Adwords scripts Examples

Posted by: RcBuilder  /   Category: Adwords Scripts / CHARTS / DriveApp / EMAIL / ENTITIES / JAVASCRIPT / REPORTS / SELECTORS & ITERATORS / SEM / SPREADSHEET / STATISTICS / UTILITIES / XML DOCUMENT   /   No Comments
08
Jun
2014

Adwords scripts Examples // get campaigns by ids + print their name and id var campaigns = AdWordsApp.campaigns().withIds().get(); while (campaigns.hasNext()) { var campaign = campaigns.next(); Logger.log(campaign.getId() + ' ' + campaign.getName()); } -------------------- // Get each campaign’s cost and clicks last month var campaigns = AdWordsApp.campaigns().forDateRange("LAST_MONTH").get(); while (campaigns.hasNext()) { var campaign = campaigns.next(); Logger.log(campaign.getName()); var stats = campaign.getStatsFor("LAST_MONTH"); Logger.log("cost " + stats.getCost() + " | clicks " + stats.getClicks()); } -------------------- //.

Read more

Adwords scripts URL FETCH

Posted by: RcBuilder  /   Category: Adwords Scripts / JAVASCRIPT / SEM / UTILITIES   /   No Comments
08
Jun
2014

Adwords scripts URL FETCH * use UrlFetchApp to fetch resources from url * use UrlFetchApp to create an http requests UrlFetchApp * HTTPResponse fetch(url) // get resource from url * HTTPResponse fetch(url, http_params) // get resource from url (advanced mode) * Object getRequest(url) * Object getRequest(url, http_params) * OAuthConfig addOAuthService(serviceName) * void removeOAuthService(serviceName) http_params * contentType - string // set request content type * headers - Object.

Read more

Adwords scripts CHARTS Example

Posted by: RcBuilder  /   Category: Adwords Scripts / CHARTS / ENTITIES / JAVASCRIPT / SEM / UTILITIES   /   No Comments
07
Jun
2014

Adwords scripts CHARTS Example USING var data = Charts.newDataTable() .addColumn(Charts.ColumnType.STRING, 'Name') .addColumn(Charts.ColumnType.NUMBER, 'Cost') .addColumn(Charts.ColumnType.NUMBER, 'Impressions') .addColumn(Charts.ColumnType.NUMBER, 'Clicks'); var date_range = 'ALL_TIME'; var chart_Title = 'TOP 10 Most Expensive Keywords'; var keywords = AdWordsApp.keywords().orderBy('Cost DESC').forDateRange(date_range).withLimit(10).get(); while (keywords.hasNext()) { var keyword = keywords.next(); var stat = keyword.getStatsFor(date_range); data.addRow(); //Logger.log(keyword.getText() + ',' + stat.getCost() + ',' + stat.getImpressions() + ',' + stat.getClicks()); } data.build(); var chart_area = Charts.newAreaChart() .setDataTable(data) .setStacked() .setRange(0, 1000) .setDimensions(1000, 400) .setTitle(chart_Title) .build(); var chart_bar = Charts.newBarChart() .setDataTable(data) .setStacked() .setRange(0, 1000) .setDimensions(1000, 400) .setTitle(chart_Title) .build(); var.

Read more

Adwords scripts Blob

Posted by: RcBuilder  /   Category: Adwords Scripts / ENTITIES / JAVASCRIPT / SEM / UTILITIES   /   No Comments
07
Jun
2014

Adwords scripts Blob Blob * Blob copyBlob(); * Blob getAs(); parameters : - string // convert to ('application/pdf', 'image/bmp', 'image/gif' etc.) * Byte); parameters : - string (see 'UTILITIES') * string getName(); * Blob setBytes(); parameters : - Byte); parameters : - string // determine the blob content type * Blob setDataFromString(); parameters : - string // the data to load * Blob setDataFromString(, ); parameters : - string.

Read more

Adwords scripts send CSV ATTACHMENT Email

Posted by: RcBuilder  /   Category: Adwords Scripts / EMAIL / JAVASCRIPT / SEM / UTILITIES   /   No Comments
07
Jun
2014

Adwords scripts send CSV ATTACHMENT Email CSV ATTACHMENT structure : var csvString = "..."; // use ',' for columns and '\n' for rows var blob = Utilities.newBlob(csvString, 'text/csv') blob.setName(); MailApp.sendEmail(, , , {attachments:}); example : var csvString = "a,b,c\nd,e,f\ng,h,i"; var blob = Utilities.newBlob(csvString, 'text/csv') blob.setName('Report.csv'); MailApp.sendEmail('rcbuilder@walla.com', 'HELLO FROM ADWORDS SCRIPTS', 'ATTACHED HTML FILE', {attachments:.

Read more

Adwords scripts send CHART ATTACHMENT Email

Posted by: RcBuilder  /   Category: Adwords Scripts / EMAIL / JAVASCRIPT / SEM / UTILITIES   /   1 Comment
07
Jun
2014

Adwords scripts send CHART ATTACHMENT Email CHART ATTACHMENT structure : var data = ... var chart = Charts.newAreaChart().setDataTable(data).build(); MailApp.sendEmail(, , , {attachments: chart.getBlob()}); example : var data = Charts.newDataTable() .addColumn(Charts.ColumnType.STRING, 'Name') .addColumn(Charts.ColumnType.NUMBER, 'Views') .addColumn(Charts.ColumnType.NUMBER, 'Clicks') .addRow() .addRow() .addRow() .addRow() .addRow() .addRow() .addRow() .addRow() .build(); var chart = Charts.newAreaChart() .setDataTable(data) .setStacked() .setRange(0, 1000) .setDimensions(1000, 400) .setTitle('Campaigns') .build(); var blob = chart.getBlob(); MailApp.sendEmail('rcbuilder@walla.com', 'HELLO FROM ADWORDS SCRIPTS', 'ATTACHED CHART FILE', {attachments:.

Read more
12
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים