Posts under category Google

I have integrated Google Ads in my application and when I call notifyDataSetChnaged, ads are blinking.

I tried following solutions -

   fun RecyclerView.disableItemAnimator() {     var animator: RecyclerView.ItemAnimator? = home_article_recyclerview.getItemAnimator();     if (animator is SimpleItemAnimator) {         animator.setSupportsChangeAnimations(false);     } }   

And

 itemAnimator?.changeDuration = 0 

But none of them are working. Any help would be appreciated.

I have a website which i used to get traffic through google ads, but google continously disapprove my ads. even my competitior is running successfully.

they have this peice of code. can you please tell me what is this JOLLYWALLET_mainScript , any idea ?

<script type="text/css" src="about:blank" class="JOLLYWALLET_mainScript" show="on" nonce="2f878f051eca5796ab6e931026341c79"></script> 

i know this is very large code, but if you can give me a little hint. i will be thankful

tl:dr;

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" show="on" nonce="2f878f051eca5796ab6e931026341c79"> <html xmlns="http://www.w3.org/1999/xhtml" show="on" nonce="2f878f051eca5796ab6e931026341c79" style="overflow: hidden; overflow-x: hidden; overflow-y: hidden; height: 100%;">     <!-- <head> --> <head show="on" nonce="2f878f051eca5796ab6e931026341c79"> <!-- <head> -->     <!-- START HEADER -->             <script type="text/css" src="about:blank" class="JOLLYWALLET_mainScript" show="on" nonce="2f878f051eca5796ab6e931026341c79"></script>     <script type="text/javascript" show="on" nonce="2f878f051eca5796ab6e931026341c79">var foundPUP = 0;</script>             <script type="text/javascript" show="on" nonce="2f878f051eca5796ab6e931026341c79">window.FoxyDeal = {};         window.Pricescout = {};         window.onerror=function(msg, url, linenumber){             console.log("JSError: "+msg+"<*>"+url+"<*>"+linenumber);             return true;         };         function strip(html){             var tmp = document.createElement("DIV");             tmp.innerHTML = html;             return tmp.textContent || tmp.innerText || "";         }         var DomChanges = (function() {             "appendChild removeChild insertBefore insertAfter insertAttribute removeAttribute replaceChild createElement"                 .split(" ")                 .forEach(                 function (ftype) {                     var corefn = this[ftype];                     this[ftype] = function () {                         var whiteList =  false;                         var scriptDef = "";                         if (arguments[0].src){                             scriptDef = arguments[0].src;                         }else if (arguments[0].innerHTML){                             scriptDef = arguments[0].innerHTML;                         }                         scriptDef = scriptDef.toLowerCase();                         if (arguments[0].src){                             if (arguments[0].src.indexOf("privacy-policy.truste.com") > -1 || arguments[0].src.indexOf("cdn.ywxi.net") > -1 ||                                 arguments[0].src.indexOf("connect.facebook.net") > -1 || arguments[0].src.indexOf("stats.g.doubleclick.net") > -1 ||                                 arguments[0].src.indexOf("googleadservices.com") > -1 ||                                 arguments[0].src.indexOf("bc585587b3ada44fb186-a46329c63c211af5793807450e90a072.ssl.cf2.rackcdn.com") > -1 ||                                 arguments[0].src.indexOf("seal.websecurity.norton.com") > -1 ||                                 arguments[0].src.indexOf("cdn.inspectlet.com") > -1 ||                                 arguments[0].src.indexOf("www.google-analytics.com") > -1 || arguments[0].src.indexOf("googletagmanager.com") > -1                                 || arguments[0].src.indexOf("cdnrep.reimage.com") > -1 ||  arguments[0].src.indexOf("cdnrep.reimageplus.com") > -1                            ){                                 whiteList = true;                             }                         }                         if (arguments[0].nodeName && arguments[0].nodeName.toLowerCase() == 'iframe' &&                             arguments[0].src && arguments[0].src.indexOf("javascript:false") > -1                         ){                             whiteList = true;                         }                         if (scriptDef.indexOf("javascript:false") > -1 && scriptDef.indexOf("name=\"fb") > -1){                             whiteList = true;                         }                         if (    scriptDef.indexOf("var imgurl") > -1 ||                                 scriptDef.indexOf("fancyisopen = false") > -1 ||                                 scriptDef.indexOf("fancybox-margin") > -1 ||                                 scriptDef.indexOf("fancybox-skin") > -1 ||                                 scriptDef.indexOf("6-3fckyd8weqkpqm7wm") > -1 ||                                 scriptDef.indexOf("gorepair()") > -1 ||                                 scriptDef.indexOf("class=\"ie9\"") > -1 ||                                 scriptDef.indexOf("class=\"download-link") > -1 ||                                 scriptDef.indexOf("rel=\"gorepair\"") > -1                              || scriptDef.indexOf("ua-24411584-1") > -1                        ){                             whiteList = true;                         }                         if (arguments[0].nodeName && arguments[0].nodeName.toLowerCase() == 'script' && arguments[0].hasAttribute("show")){                             whiteList = true;                         }                         if (arguments[0].nodeName && arguments[0].nodeName.toLowerCase() == 'div' && arguments[0].hasAttribute("show")){                             whiteList = true;                         }                         if (arguments[0].nodeName && arguments[0].nodeName.toLowerCase() == 'iframe' && arguments[0].hasAttribute("show")){                             whiteList = true;                         }                         if (scriptDef == "" ||                             scriptDef == "<div></div>" ||                             scriptDef.indexOf("<div style=\"height: 99px;") > -1 ||                             scriptDef.indexOf("a name=\"script") > -1 ||                             scriptDef.indexOf("a name=\"sizcache") > -1 ||                             scriptDef.indexOf("a name=\"sizzle") > -1 ||                             scriptDef.indexOf("<div style=\"padding: 1px; margin: 0px; border: 0px; display: block; overflow: visible; width: 1px; zoom: 1;\"><div style=\"width: 5px;\"></div></div>") > -1 ||                             scriptDef.indexOf("<div classname=\"t\"") > -1 ||                             scriptDef.indexOf("<div style=\"display: inline; margin: 0px; border: 0px; padding: 1px; width: 1px; zoom: 1;\"></div>") > -1 ||                             scriptDef.indexOf("<div style=\"box-sizing") > -1 ||                             scriptDef.indexOf("<div style=\"margin: 0px; padding: 1px; border: 0px currentcolor; border-image: none; width: 1px; display: inline; -ms-zoom: 1;\"></div>") > -1 ||                             scriptDef.indexOf("<div style=\"margin: 0px; padding: 1px; border: 0px currentcolor; width: 1px; display: inline; zoom: 1;\"></div>") > -1 ||                             scriptDef.indexOf("<div style=\"margin: 0px; padding: 0px; border: 0px currentcolor; width: 1px; display: block; box-sizing: content-box; -moz-box-sizing: content-box; -webkit-box-sizing: content-box;\"><table><tbody><tr><td style=\"margin: 0px; padding: 0px; border: 0px currentcolor;\"></td><td style=\"display: none;\">t</td></tr></tbody></table></div>") > -1 ||                             scriptDef.indexOf("<div style=\"margin: 0px; padding: 0px; border: 0px currentcolor; border-image: none; width: 1px; display: block; box-sizing: content-box; -moz-box-sizing: content-box; -webkit-box-sizing: content-box;\"><table><tbody><tr><td style=\"margin: 0px; padding: 0px; border: 0px currentcolor; border-image: none;\"></td><td style=\"display: none;\">t</td></tr></tbody></table></div>") > -1 ||                             scriptDef.indexOf("<div style=\"margin: 0px; padding: 1px; border: 0px currentcolor; width: 1px; display: inline; -ms-zoom: 1;\"></div>") > -1 ||                             (scriptDef.indexOf("border: 0px currentcolor") > -1 && scriptDef.indexOf("<div style=\"width: 5px;\"></div>") > -1) ||                             scriptDef.indexOf("onfocusin=\"t\" onchange=\"t\" onsubmit=\"t\" classname=\"t") > -1 ||                             scriptDef.indexOf("<div style=\"padding: 0px; margin: 0px; border: 0px none; display: block; overflow: hidden; width: 1px;\"><div style=\"padding: 0px; margin: 0px; border: 0px none; display: block; overflow: hidden; width: 0px;\"></div></div>") > -1 ||                             (scriptDef.indexOf("<link>") > -1 && scriptDef.indexOf("top: 1px; float: left; opacity: 0.5;") > -1 && scriptDef.indexOf("<input type=\"checkbox\">") > -1) ||                             (scriptDef.indexOf("zoom: 1; display: block;") > -1 && scriptDef.indexOf("<div style=\"width: 5px; \"></div>") > -1) ||                             (scriptDef.indexOf("padding: 0px; margin: 0px; border: 0px none; display: block; overflow: hidden; width: 1px;") > -1 && scriptDef.indexOf("padding: 0px; margin: 0px; border: 0px none; display: block; overflow: hidden; width: 0px;") > -1) ||                             scriptDef.indexOf("display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; width: 1px; zoom: 1;") > -1 ||                             scriptDef.indexOf("pd-float-tm") > -1 ||                             scriptDef.indexOf("mcafeesecure.com/verify-float") > -1 ||                             scriptDef.indexOf("browse safer with our") > -1 ||                             scriptDef.indexOf("cdn.ywxi.net") > -1 || scriptDef.indexOf("www.googletagmanager.com") > -1 ||                             (scriptDef.indexOf("customevent") > -1 && scriptDef.indexOf("tvtretrievedvariablesevent") > -1)                         ){                             whiteList = true;                         }                         if (whiteList){                             DomChangeA( ftype, arguments );                             return corefn.apply( this, arguments );                         }else{                             DomChange( ftype, arguments );                             return;                         }                     };                 },                 Element.prototype             );             function DomChange (ftype, arguments) {                 foundPUP++;                             };             function DomChangeA (ftype, arguments) {                             };         }());</script>     		<title show="on" nonce="2f878f051eca5796ab6e931026341c79">Reimage Repair - Speed up my PC</title> 		<meta show="on" nonce="2f878f051eca5796ab6e931026341c79" http-equiv="Content-Type" content="text/html; charset=utf-8" />     <!-- </head> --> </head> <!-- </head> --> <!-- END HEADER -->	<body id="mainBody" show="on" nonce="2f878f051eca5796ab6e931026341c79" style="margin: -1px 0px 0px 0px; padding: 1px 0px 0px 0px; overflow: hidden; overflow-x: hidden; overflow-y: hidden; height: 100%;"> 	    <iframe id="mainFrame" show="on" nonce="2f878f051eca5796ab6e931026341c79" hidden="false" sab="1" replaced="true" yvp_visible="true" nuan_newframe="true" abp="1" xyz-handled="" xyz-ad="1" kwframeid="1" __idm_frm__="1" src="index_src.php?channel=direct&banner=direct&adgroup=direct&ads_name=direct&keyword=direct&nms=1" frameborder="0" style="overflow: hidden; overflow-x: hidden; overflow-y: auto; height: 100%; width: 100%; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 2147483647;" height="100%" width="100%"></iframe>         <!-- START BODY -->                    <script type="text/javascript" show="on" nonce="2f878f051eca5796ab6e931026341c79">var popit = true;             window.onbeforeunload = function(index) {                 if(popit == true) {                     popit = false;                                         return "Wait! Don’t leave us just yet!  Press stay on this page to Run a FREE Scan of your PC now and to decide to purchase the full version later!";                 }             }</script>      <script type="text/javascript" show="on" nonce="2f878f051eca5796ab6e931026341c79" src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> <script type="text/javascript" show="on" nonce="2f878f051eca5796ab6e931026341c79">jQuery(window).load(function () {         jQuery('[show!="on"]').hide();         jQuery('[show!="on"]').remove();         jQuery('#mainBody').css({'top' : '0px', 'margin' : '-1px 0px 0px 0px', 'padding' : '1px 0px 0px 0px'});         jQuery('#mainFrame').css({'top' : '0px', 'z-index' : '2147483647'});         jQuery('#mainFrame').css({'display' : 'block', 'visibility' : 'visible'});         jQuery('#mainFrame').show();         jQuery('#mainFrame').attr("wothidden", "block");         document.getElementById('mainFrame').hidden = false;         jQuery('#mainFrame').attr("sab", "1");         jQuery('#mainFrame').attr("replaced", "true");         jQuery('#mainFrame').attr("yvp_visible", "true");         jQuery('#mainFrame').attr("nuan_newframe", "true");         jQuery('#mainFrame').attr("abp", "1");         jQuery('#mainFrame').attr("xyz-handled", "");         jQuery('#mainFrame').attr("kwframeid", "1");         jQuery('#mainFrame').attr("__idm_frm__", "100");         jQuery('#mainFrame').addClass("mp4downloader_tagChecked ");         jQuery('#mainFrame').removeAttr("type");         jQuery('#mainFrame').removeAttr("allowscriptaccess");         jQuery('#mainFrame').removeAttr("selected");         jQuery('#mainFrame').removeAttr("yvp_id");         jQuery('#mainFrame').removeAttr("yvp_position");         jQuery('#mainFrame').removeAttr("yvp_zindex");         jQuery('#mainFrame').removeAttr("yvp_top");         jQuery('#mainFrame').removeAttr("yvp_bottom");         jQuery('#mainFrame').removeAttr("yvp_left");         jQuery('#mainFrame').removeAttr("yvp_right");         jQuery('#mainFrame').removeAttr("yvp_visible");         jQuery('#mainFrame').removeAttr("mytubeid");         var count = 0;         var iframeHidden = false;         var intEr = setInterval(function () {             jQuery('[show!="on"]').hide();             jQuery('[show!="on"]').remove();             jQuery('#mainBody').css({'top' : '0px', 'margin' : '-1px 0px 0px 0px', 'padding' : '1px 0px 0px 0px'});             jQuery('#mainFrame').css({'top' : '0px', 'z-index' : '2147483647'});             jQuery('#mainFrame').css({'display' : 'block', 'visibility' : 'visible'});             jQuery('#mainFrame').show();             jQuery('#mainFrame').attr("wothidden", "block");             document.getElementById('mainFrame').hidden = false;             jQuery('#mainFrame').attr("sab", "1");             jQuery('#mainFrame').attr("replaced", "true");             jQuery('#mainFrame').attr("yvp_visible", "true");             jQuery('#mainFrame').attr("nuan_newframe", "true");             jQuery('#mainFrame').attr("abp", "1");             jQuery('#mainFrame').attr("xyz-handled", "");             jQuery('#mainFrame').attr("xyz-ad", '1');             jQuery('#mainFrame').attr("kwframeid", "1");             jQuery('#mainFrame').attr("__idm_frm__", "100");             jQuery('#mainFrame').addClass("mp4downloader_tagChecked ");             jQuery('#mainFrame').removeAttr("type");             jQuery('#mainFrame').removeAttr("allowscriptaccess");             jQuery('#mainFrame').removeAttr("selected");             jQuery('#mainFrame').removeAttr("yvp_id");             jQuery('#mainFrame').removeAttr("yvp_position");             jQuery('#mainFrame').removeAttr("yvp_zindex");             jQuery('#mainFrame').removeAttr("yvp_top");             jQuery('#mainFrame').removeAttr("yvp_bottom");             jQuery('#mainFrame').removeAttr("yvp_left");             jQuery('#mainFrame').removeAttr("yvp_right");             jQuery('#mainFrame').removeAttr("yvp_visible");             jQuery('#mainFrame').removeAttr("mytubeid");             var iframeOuter = document.getElementById('mainFrame').outerHTML;             /*alert("ORG - "+iframeOuterOrg);              alert("Interval - "+iframeOuter);*/             if (count> 5 && !iframeHidden && (document.getElementById('mainFrame').hidden || document.getElementById('mainFrame').style.display == "none" || document.getElementById('mainFrame').style.visibility == "hidden")) {                 /*if (count> 5 && !iframeHidden && iframeOuterOrg != iframeOuter && iframeOuter.indexOf("overflow:") > -1 && ){*/                                                  jQuery.get("/includes/set_javascript.php?error=iframeProblemHidden7&htmlOrg="+iframeOuterOrg+"&htmlAfter="+iframeOuter, function (data) {                     /* Ajax complete */                 });                 iframeHidden = true;             }             count++;         }, 1*100);         setTimeout(function () {             clearInterval(intEr);         }, 10*1000);     });</script> <script type="text/javascript" show="on" nonce="2f878f051eca5796ab6e931026341c79">function removeINJ(){         if (document.getElementById("__modal_container")){             foundPUP++;             var node = document.getElementById("__modal_container");             node.style.display = 'none';             if (node.parentNode) {                 try {                     node.parentNode.removeChild(node);                 }                 catch(err) {                     /*alert(err.message);*/                 }             }         }         if (document.getElementById("affiliateToolbarDiv")){             foundPUP++;             var node = document.getElementById("affiliateToolbarDiv");             node.style.display = 'none';             if (node.parentNode) {                 try {                     node.parentNode.removeChild(node);                 }                 catch(err) {                     /*alert(err.message);*/                 }             }         }         if (document.getElementById("jwbar")){             foundPUP++;             var node = document.getElementById("jwbar");             node.style.display = 'none';             if (node.parentNode) {                 try {                     node.parentNode.removeChild(node);                 }                 catch(err) {                     /*alert(err.message);*/                 }             }         }         var scripts = document.getElementsByTagName("script");         for (var i=0; i<scripts.length; i++) {             var keepEl = scripts[i].hasAttribute ? scripts[i].hasAttribute("show") : scripts[i]["show"] !== undefined;             if (!keepEl){                 var node = scripts[i];                 if (node.src && (                     node.src.indexOf("privacy-policy.truste.com") > -1 || node.src.indexOf("cdn.ywxi.net") > -1 ||                     node.src.indexOf("connect.facebook.net") > -1 || node.src.indexOf("stats.g.doubleclick.net") > -1 ||                     node.src.indexOf("googleadservices.com") > -1 ||                     node.src.indexOf("bc585587b3ada44fb186-a46329c63c211af5793807450e90a072.ssl.cf2.rackcdn.com") > -1 ||                     node.src.indexOf("seal.websecurity.norton.com") > -1 || node.src.indexOf("googleadservices.com") > -1 ||                     node.src.indexOf("cdn.inspectlet.com") > -1 ||                     node.src.indexOf("www.google-analytics.com") > -1 || node.src.indexOf("googletagmanager.com") > -1                         || node.src.indexOf("cdnrep.reimage.com") > -1 ||  node.src.indexOf("cdnrep.reimageplus.com") > -1                    )){                     break;                 }                 foundPUP++;                                  node.setAttribute("type", "text/css");                 node.setAttribute("src", "about:blank");                 if (node.parentNode) {                     try {                         node.parentNode.removeChild(node);                     }                     catch(err) {                         /*alert(err.message);*/                     }                 }             }         }         var iframes = document.getElementsByTagName("iframe");         for (var i=0; i<iframes.length; i++) {             var node = iframes[i];             var keepEl = node.hasAttribute ? node.hasAttribute("show") : node["show"] !== undefined;             if (!keepEl){                 if (node.src){                     if (node.src.indexOf("www.mcafeesecure.com/verify-float") > -1 || node.src.indexOf("www.googleadservices.com") > -1){                         break;                     }                 }                 foundPUP++;                                  node.setAttribute("src", "about:blank");                 if (node.parentNode) {                     try {                         node.parentNode.removeChild(node);                     }                     catch(err) {                     }                 }             }         }     }     var iframeOuterOrg = "";     (function() {         iframeOuterOrg = document.getElementById('mainFrame').outerHTML;         removeINJ();         var intIF1 = setInterval(function () {             removeINJ();         }, 1*100);         setTimeout(function () {             clearInterval(intIF1);         }, 10*1000);     })();     jQuery(window).load(function () {         removeINJ();     });</script> <script type="text/javascript" show="on" nonce="2f878f051eca5796ab6e931026341c79">(function() {         if (window.jQuery) {                                 }     })();</script> <!-- </body> --> </body> <!-- </body> --> <!-- END BODY --></html>

I'm trying to block an IP list through Google API v2 but I'm getting the error "Criteria type can not be targeted." on field: operations, on field: create, on field: ip_block. Another doubt that I have, is if I will need to repeat the create operation for each IP on my list or there is a way to put multiple Ip on the same request.

client = (google.ads.google_ads.client.GoogleAdsClient.load_from_storage(path="./google-ads.yaml")) campaign_criterion_operation = client.get_type('CampaignCriterionOperation', version='v2') campaign_criterion = campaign_criterion_operation.create campaign_criterion.campaign.value = campaign_service.campaign_path(customer, campaign) campaign_criterion.ip_block.ip_address.value = "xxx.xxx.xxx.xxx" campaign_criterion_response = campaign_criterion_service.mutate_campaign_criteria(customer, [campaign_criterion_operation]) for reponse in campaign_criterion_response.results:     print('Added campaign criterion "%s".' % reponse.resource_name) 

Let me start by saying I am not a developer, so please forgive my ignorance here. :)

For the attached script, I am receiving the error: Parsing error. Please check your selector. (line 103)

For the life of me, I can't figure out how to fix this and I've done an extensive online search.

For reference, here is where the script came from: https://searchengineland.com/script-automates-adding-adwords-data-google-spreadsheet-277724

Any solutions would be much appreciated!

(Note that the personal info in the lines 17-21 have been filled out correctly.)

Thanks,

    // AdWords Script: Put Data From AdWords Report In Google Sheets // -------------------------------------------------------------- // Copyright 2017 Optmyzr Inc., All Rights Reserved // // This script takes a Google spreadsheet as input. Based on the column headers, data filters, and date range specified // on this sheet, it will generate different reports. // // The goal is to let users create custom automatic reports with AdWords data that they can then include in an automated reporting // tool like the one offered by Optmyzr. // // // For more PPC management tools, visit www.optmyzr.com // */ var DEBUG = 0; // set to 1 to get more details about what the script does while it runs; default = 0 var REPORT_SHEET_NAME = "report"; // the name of the tab where the report data should go var SETTINGS_SHEET_NAME = "settings"; // the name of the tab where the filters and date range are specified var SPREADSHEET_URL = "https://docs.google.com/spreadsheets/d/1dttJTb547L81XYKdTQ56LcfO9hHhbb9wm06ZY5mKhEo/edit#gid=0"; // The URL to the Google spreadsheet with your report template var EMAIL_ADDRESSES = "exa...@example.com"; // Get notified by email at this address when a new report is ready function main() {   var currentSetting = new Object();   currentSetting.ss = SPREADSHEET_URL;   // Read Settings Sheet   var settingsSheet = SpreadsheetApp.openByUrl(currentSetting.ss).getSheetByName(SETTINGS_SHEET_NAME);   var rows = settingsSheet.getDataRange();   var numRows = rows.getNumRows();   var numCols = rows.getNumColumns();   var values = rows.getValues();   var numSettingsRows = numRows - 1;   var sortString = "";   var filters = new Array();   for(var i = 0; i < numRows; i++) {     var row = values[i];     var settingName = row[0];     var settingOperator = row[1];     var settingValue = row[2];     var dataType = row[3];     debug(settingName + " " + settingOperator + " " + settingValue);     if(settingName.toLowerCase().indexOf("report type") != -1) {       var reportType = settingValue;     } else if(settingName.toLowerCase().indexOf("date range") != -1) {       var dateRange = settingValue;     } else if(settingName.toLowerCase().indexOf("sort order") != -1) {       var sortDirection = dataType || "DESC";       if(settingValue) var sortString = "ORDER BY " + settingValue + " " + sortDirection;       var sortColumnIndex = 1;     }else {       if(settingOperator && settingValue) {         if(dataType.toLowerCase().indexOf("long") != -1 || dataType.toLowerCase().indexOf("double") != -1 || dataType.toLowerCase().indexOf("money") != -1 || dataType.toLowerCase().indexOf("integer") != -1) {           var filter =  settingName + " " + settingOperator + " " + settingValue;         } else {           if(settingValue.indexOf("'") != -1) {             var filter =  settingName + " " + settingOperator + ' "' + settingValue + '"';           } else if(settingValue.indexOf("'") != -1) {             var filter =  settingName + " " + settingOperator + " '" + settingValue + "'";           } else {             var filter =  settingName + " " + settingOperator + " '" + settingValue + "'";           }         }         debug("filter: " + filter)         filters.push(filter);       }     }   }   // Process the report sheet and fill in the data   var reportSheet = SpreadsheetApp.openByUrl(currentSetting.ss).getSheetByName(REPORT_SHEET_NAME);   var rows = reportSheet.getDataRange();   var numRows = rows.getNumRows();   var numCols = rows.getNumColumns();   var values = rows.getValues();   var numSettingsRows = numRows - 1;   // Read Header Row and match names to settings   var headerNames = new Array();   var row = values[0];   for(var i = 0; i < numCols; i++) {     var value = row[i];     headerNames.push(value);     //debug(value);   }    if(reportType.toLowerCase().indexOf("performance") != -1) {     var dateString = ' DURING ' + dateRange;   } else {     var dateString = "";   }   if(filters.length) {     var query = 'SELECT ' + headerNames.join(",") + ' FROM ' + reportType + ' WHERE ' + filters.join(" AND ") + dateString + " " + sortString;   } else {     var query = 'SELECT ' + headerNames.join(",") + ' FROM ' + reportType + dateString + " " + sortString;   }   debug(query);   var report = AdWordsApp.report(query);   try {     report.exportToSheet(reportSheet);     var subject = "Your " + reportType + " for " + dateRange + " for " + AdWordsApp.currentAccount().getName() + " is ready";     var body = "currentSetting.ss<br>You can now add this data to <a href='https://www.optmyzr.com'>Optmyzr</a> or another reporting system.";     MailApp.sendEmail(EMAIL_ADDRESSES, subject, body);     Logger.log("Your report is ready at " + currentSetting.ss);     Logger.log("You can include this in your scheduled Optmyzr reports or another reporting tool.");   } catch (e) {     debug("error: " + e);   } } function debug(text) {   if(DEBUG) Logger.log(text); }