Tag Archives: functions

Function myLog

Instead of Logger.log you can use in test mode custom help function myLog(). After test Google Ads Script you need to only change value of variable writeLog.

/* 
 * Function myLog
 * Source: https://gscripts.eu/mylog/
 */

var writeLog = 1; // if not test mode, use 0 or something else
function main() { 
  myLog("Lorem Ipsum", writeLog);
}
function myLog(text, number){
   if (number == 1) {
    Logger.log(text);
   }
}