{"id":425,"date":"2022-10-17T20:47:00","date_gmt":"2022-10-17T18:47:00","guid":{"rendered":"https:\/\/nilsrooijmans.com\/daily\/?p=425"},"modified":"2024-03-11T09:22:28","modified_gmt":"2024-03-11T08:22:28","slug":"whats-your-process-for-building-and-testing-a-script","status":"publish","type":"post","link":"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script","title":{"rendered":"&#8220;What\u2019s your process for building and testing a script?&#8221;"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Last week, a PPC Redditor asked a great question:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><em>&#8220;What\u2019s your process for building and testing a script?&#8221;<\/em><\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">The key word here is &#8216;process.&#8217; You need to have a process first before you can start automating the (sub)tasks. \u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, the first step would be to think deeply about the task you want to automate, and to document every step in the process. \u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s say you want to make sure all ad groups have live ads. In this case, ask yourself: \u00a0<br>1. Why do I want this? \u00a0<br>2. What do I need for this? \u00a0<br>3. How can I get the things I need? \u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Potential answers (simplified): \u00a0<br>1. I don&#8217;t want disapprovals or manual mistakes (e.g., accidentally pausing entities) to stop me from showing ads.<br>2. I need to continuously make sure all my ad groups have at least one enabled keyword and one enabled ad (that is eligible to run). \u00a0<br>3. For every enabled ad group, I need to check the status of my keywords and the status of my ads, and be in the know when an enabled ad group has zero enabled keywords or zero enabled ads. This check needs to happen all the time. \u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The second step would be to start writing functions to automate the parts of the process you have described. \u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In our example, you would create a function to check if an ad group has at least one enabled keyword. You would also create a function to check if an ad group has at least one enabled (eligible) ad running. \u00a0Then, you would write a function that goes over all enabled ad groups, and uses these functions to check keywords and ads. \u00a0You would also have another function to alert you (i.e., via email). That function would get called if one of your checks failed. \u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The third step would be to test the different functions and then preview the script. For the testing, I always recommend testing them individually first and then using the Logger.log function to see intermediate results. Then, previewing instead of &#8216;running&#8217; the script already will make sure the script does not make any changes in your account, so you are sure the script does not F things up. \u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After previewing, if you are happy with the results, you can then schedule the script to run hourly. \u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Google Ads Scripting all starts with your process.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Think hard about your current PPC tasks that take up most of your time or are error-prone. Write them down. Be very specific in your documentation. Divide tasks into subtasks. Then, start scripting.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8211; Nils<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last week, a PPC Redditor asked a great question: &#8220;What\u2019s your process for building and testing a script?&#8221; The key word here is &#8216;process.&#8217; You need to have a process first before you can start automating the (sub)tasks. \u00a0 So, the first step would be to think deeply about the task you want to automate, &hellip; <a href=\"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;&#8220;What\u2019s your process for building and testing a script?&#8221;&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-425","post","type-post","status-publish","format-standard","hentry","category-google-ads"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>&quot;What\u2019s your process for building and testing a script?&quot; - Nils Rooijmans<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"&quot;What\u2019s your process for building and testing a script?&quot; - Nils Rooijmans\" \/>\n<meta property=\"og:description\" content=\"Last week, a PPC Redditor asked a great question: &#8220;What\u2019s your process for building and testing a script?&#8221; The key word here is &#8216;process.&#8217; You need to have a process first before you can start automating the (sub)tasks. \u00a0 So, the first step would be to think deeply about the task you want to automate, &hellip; Continue reading &quot;&#8220;What\u2019s your process for building and testing a script?&#8221;&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script\" \/>\n<meta property=\"og:site_name\" content=\"Nils Rooijmans\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-17T18:47:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-11T08:22:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/nilsrooijmans.com\/daily\/wp-content\/uploads\/2024\/05\/NilsRooijmans_GreenBG_SQUARE_200x186.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"200\" \/>\n\t<meta property=\"og:image:height\" content=\"186\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Nils Rooijmans\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nils Rooijmans\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script#article\",\"isPartOf\":{\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script\"},\"author\":{\"name\":\"Nils Rooijmans\",\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/645ba0bda90c1467f9d23d332d1f3aa0\"},\"headline\":\"&#8220;What\u2019s your process for building and testing a script?&#8221;\",\"datePublished\":\"2022-10-17T18:47:00+00:00\",\"dateModified\":\"2024-03-11T08:22:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script\"},\"wordCount\":439,\"publisher\":{\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/645ba0bda90c1467f9d23d332d1f3aa0\"},\"articleSection\":[\"Google Ads\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script\",\"url\":\"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script\",\"name\":\"\\\"What\u2019s your process for building and testing a script?\\\" - Nils Rooijmans\",\"isPartOf\":{\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/#website\"},\"datePublished\":\"2022-10-17T18:47:00+00:00\",\"dateModified\":\"2024-03-11T08:22:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/nilsrooijmans.com\/daily\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"&#8220;What\u2019s your process for building and testing a script?&#8221;\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/#website\",\"url\":\"https:\/\/nilsrooijmans.com\/daily\/\",\"name\":\"Nils Rooijmans Daily Newsletter - Google Ads\",\"description\":\"Daily emails to boost your Google Ads Performance\",\"publisher\":{\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/645ba0bda90c1467f9d23d332d1f3aa0\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/nilsrooijmans.com\/daily\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/645ba0bda90c1467f9d23d332d1f3aa0\",\"name\":\"Nils Rooijmans\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/nilsrooijmans.com\/daily\/wp-content\/uploads\/2024\/05\/NilsRooijmans_Green_Background_300x300.jpg\",\"contentUrl\":\"https:\/\/nilsrooijmans.com\/daily\/wp-content\/uploads\/2024\/05\/NilsRooijmans_Green_Background_300x300.jpg\",\"width\":300,\"height\":300,\"caption\":\"Nils Rooijmans\"},\"logo\":{\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/image\/\"},\"description\":\"Google Ads Performance Architect with a passion for PPC Automation &amp; AI, in particular via Google Ads Scripts.\",\"sameAs\":[\"https:\/\/nilsrooijmans.com\/\",\"https:\/\/www.linkedin.com\/in\/nilsrooijmans\/\"],\"url\":\"https:\/\/nilsrooijmans.com\/daily\/author\/nils\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\"What\u2019s your process for building and testing a script?\" - Nils Rooijmans","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script","og_locale":"en_US","og_type":"article","og_title":"\"What\u2019s your process for building and testing a script?\" - Nils Rooijmans","og_description":"Last week, a PPC Redditor asked a great question: &#8220;What\u2019s your process for building and testing a script?&#8221; The key word here is &#8216;process.&#8217; You need to have a process first before you can start automating the (sub)tasks. \u00a0 So, the first step would be to think deeply about the task you want to automate, &hellip; Continue reading \"&#8220;What\u2019s your process for building and testing a script?&#8221;\"","og_url":"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script","og_site_name":"Nils Rooijmans","article_published_time":"2022-10-17T18:47:00+00:00","article_modified_time":"2024-03-11T08:22:28+00:00","og_image":[{"width":200,"height":186,"url":"https:\/\/nilsrooijmans.com\/daily\/wp-content\/uploads\/2024\/05\/NilsRooijmans_GreenBG_SQUARE_200x186.jpg","type":"image\/jpeg"}],"author":"Nils Rooijmans","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Nils Rooijmans","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script#article","isPartOf":{"@id":"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script"},"author":{"name":"Nils Rooijmans","@id":"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/645ba0bda90c1467f9d23d332d1f3aa0"},"headline":"&#8220;What\u2019s your process for building and testing a script?&#8221;","datePublished":"2022-10-17T18:47:00+00:00","dateModified":"2024-03-11T08:22:28+00:00","mainEntityOfPage":{"@id":"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script"},"wordCount":439,"publisher":{"@id":"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/645ba0bda90c1467f9d23d332d1f3aa0"},"articleSection":["Google Ads"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script","url":"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script","name":"\"What\u2019s your process for building and testing a script?\" - Nils Rooijmans","isPartOf":{"@id":"https:\/\/nilsrooijmans.com\/daily\/#website"},"datePublished":"2022-10-17T18:47:00+00:00","dateModified":"2024-03-11T08:22:28+00:00","breadcrumb":{"@id":"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/nilsrooijmans.com\/daily\/whats-your-process-for-building-and-testing-a-script#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nilsrooijmans.com\/daily"},{"@type":"ListItem","position":2,"name":"&#8220;What\u2019s your process for building and testing a script?&#8221;"}]},{"@type":"WebSite","@id":"https:\/\/nilsrooijmans.com\/daily\/#website","url":"https:\/\/nilsrooijmans.com\/daily\/","name":"Nils Rooijmans Daily Newsletter - Google Ads","description":"Daily emails to boost your Google Ads Performance","publisher":{"@id":"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/645ba0bda90c1467f9d23d332d1f3aa0"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nilsrooijmans.com\/daily\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/645ba0bda90c1467f9d23d332d1f3aa0","name":"Nils Rooijmans","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/image\/","url":"https:\/\/nilsrooijmans.com\/daily\/wp-content\/uploads\/2024\/05\/NilsRooijmans_Green_Background_300x300.jpg","contentUrl":"https:\/\/nilsrooijmans.com\/daily\/wp-content\/uploads\/2024\/05\/NilsRooijmans_Green_Background_300x300.jpg","width":300,"height":300,"caption":"Nils Rooijmans"},"logo":{"@id":"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/image\/"},"description":"Google Ads Performance Architect with a passion for PPC Automation &amp; AI, in particular via Google Ads Scripts.","sameAs":["https:\/\/nilsrooijmans.com\/","https:\/\/www.linkedin.com\/in\/nilsrooijmans\/"],"url":"https:\/\/nilsrooijmans.com\/daily\/author\/nils"}]}},"_links":{"self":[{"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/posts\/425","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/comments?post=425"}],"version-history":[{"count":1,"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/posts\/425\/revisions"}],"predecessor-version":[{"id":426,"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/posts\/425\/revisions\/426"}],"wp:attachment":[{"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/media?parent=425"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/categories?post=425"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/tags?post=425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}