{"id":46,"date":"2023-07-24T20:22:00","date_gmt":"2023-07-24T18:22:00","guid":{"rendered":"https:\/\/nilsrooijmans.com\/daily\/?p=46"},"modified":"2023-11-14T10:54:10","modified_gmt":"2023-11-14T09:54:10","slug":"enhanced-version-of-google-ads-script-negative-keywords-conflicts","status":"publish","type":"post","link":"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts","title":{"rendered":"Enhanced version of Google Ads Script: Negative Keywords Conflicts"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">One of my favorite use cases for scripts is managing negative keywords. I use scripts to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>suggest negative keywords candidates<\/li>\n\n\n\n<li>allow for easy management of negatives via Google Sheets<\/li>\n\n\n\n<li>do\u00a0<a href=\"https:\/\/nilsrooijmans.com\/updated-google-ads-script-brainlabs-search-query-mining-for-n-gram-analysis\/\">n-gram analyses<\/a>\u00a0to discover potential negative candidates<\/li>\n\n\n\n<li>keep exact match keywords exact (super handy for brand campaigns to prevent non-brand from matching your brand keyword)<\/li>\n\n\n\n<li>auto-negate converting search terms in HIGH prio Shopping campaigns, so that the queries get funneled into higher bid MED prio campaigns<\/li>\n\n\n\n<li>automatically add positive keywords to a negative keyword list that is attached to my DSA campaigns to prevent cannibalization<\/li>\n\n\n\n<li>\u2026and a ton of other things.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Occasionally, I or my team members make the unfortunate mistake of accidentally adding a negative keyword that blocks one or more positive keywords. Not good. So, I use another script to alert me when that happens: the Negative Keyword Conflicts script.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The original script is developed by Google, but it has a major drawback:<\/strong>&nbsp;it also looks at keywords in campaigns that have ended (i.e., ended experiment campaigns). This results in a lot of false alerts, making you want to ignore them altogether.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To fix this issue, I decide to change the script to only look at campaigns that are still serving. This fix was easy. The only thing I need to add was the condition to only look at campaigns with serving_status = \u2018SERVING\u2019.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the code, that means one extra condition in the GAQL query (extra condition emphasized):<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>WHERE campaign.status = \"ENABLED\"&nbsp;<em>AND campaign.serving_status = \"SERVING\"<\/em>&nbsp;AND ad_group.status = \"ENABLED\"&nbsp;<\/code>+<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Here\u2019s the enhanced version of the Google Ads Script for Negative Keywords Conflicts:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/nilsrooijmans.com\/negative-keyword-conflicts-alert-script-update\/\">https:\/\/nilsrooijmans.com\/negative-keyword-conflicts-alert-script-update\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What the script does:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It sends out an email alert if an account has positive keywords which are blocked by negative keywords. The script saves all such conflicts to a spreadsheet and sends out the email alert.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why this matters:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Negative keywords are intended to prevent ads from showing on irrelevant search queries, but they may inadvertently block normal keywords from matching relevant search queries, making your campaigns less effective.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Happy scripting!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">-Nils<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of my favorite use cases for scripts is managing negative keywords. I use scripts to: Occasionally, I or my team members make the unfortunate mistake of accidentally adding a negative keyword that blocks one or more positive keywords. Not good. So, I use another script to alert me when that happens: the Negative Keyword &hellip; <a href=\"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Enhanced version of Google Ads Script: Negative Keywords Conflicts&#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-46","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>Enhanced version of Google Ads Script: Negative Keywords Conflicts - 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\/enhanced-version-of-google-ads-script-negative-keywords-conflicts\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Enhanced version of Google Ads Script: Negative Keywords Conflicts - Nils Rooijmans\" \/>\n<meta property=\"og:description\" content=\"One of my favorite use cases for scripts is managing negative keywords. I use scripts to: Occasionally, I or my team members make the unfortunate mistake of accidentally adding a negative keyword that blocks one or more positive keywords. Not good. So, I use another script to alert me when that happens: the Negative Keyword &hellip; Continue reading &quot;Enhanced version of Google Ads Script: Negative Keywords Conflicts&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts\" \/>\n<meta property=\"og:site_name\" content=\"Nils Rooijmans\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-24T18:22:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-14T09:54:10+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\/enhanced-version-of-google-ads-script-negative-keywords-conflicts#article\",\"isPartOf\":{\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts\"},\"author\":{\"name\":\"Nils Rooijmans\",\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/645ba0bda90c1467f9d23d332d1f3aa0\"},\"headline\":\"Enhanced version of Google Ads Script: Negative Keywords Conflicts\",\"datePublished\":\"2023-07-24T18:22:00+00:00\",\"dateModified\":\"2023-11-14T09:54:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts\"},\"wordCount\":343,\"publisher\":{\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/645ba0bda90c1467f9d23d332d1f3aa0\"},\"articleSection\":[\"Google Ads\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts\",\"url\":\"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts\",\"name\":\"Enhanced version of Google Ads Script: Negative Keywords Conflicts - Nils Rooijmans\",\"isPartOf\":{\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/#website\"},\"datePublished\":\"2023-07-24T18:22:00+00:00\",\"dateModified\":\"2023-11-14T09:54:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/nilsrooijmans.com\/daily\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Enhanced version of Google Ads Script: Negative Keywords Conflicts\"}]},{\"@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":"Enhanced version of Google Ads Script: Negative Keywords Conflicts - 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\/enhanced-version-of-google-ads-script-negative-keywords-conflicts","og_locale":"en_US","og_type":"article","og_title":"Enhanced version of Google Ads Script: Negative Keywords Conflicts - Nils Rooijmans","og_description":"One of my favorite use cases for scripts is managing negative keywords. I use scripts to: Occasionally, I or my team members make the unfortunate mistake of accidentally adding a negative keyword that blocks one or more positive keywords. Not good. So, I use another script to alert me when that happens: the Negative Keyword &hellip; Continue reading \"Enhanced version of Google Ads Script: Negative Keywords Conflicts\"","og_url":"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts","og_site_name":"Nils Rooijmans","article_published_time":"2023-07-24T18:22:00+00:00","article_modified_time":"2023-11-14T09:54:10+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\/enhanced-version-of-google-ads-script-negative-keywords-conflicts#article","isPartOf":{"@id":"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts"},"author":{"name":"Nils Rooijmans","@id":"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/645ba0bda90c1467f9d23d332d1f3aa0"},"headline":"Enhanced version of Google Ads Script: Negative Keywords Conflicts","datePublished":"2023-07-24T18:22:00+00:00","dateModified":"2023-11-14T09:54:10+00:00","mainEntityOfPage":{"@id":"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts"},"wordCount":343,"publisher":{"@id":"https:\/\/nilsrooijmans.com\/daily\/#\/schema\/person\/645ba0bda90c1467f9d23d332d1f3aa0"},"articleSection":["Google Ads"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts","url":"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts","name":"Enhanced version of Google Ads Script: Negative Keywords Conflicts - Nils Rooijmans","isPartOf":{"@id":"https:\/\/nilsrooijmans.com\/daily\/#website"},"datePublished":"2023-07-24T18:22:00+00:00","dateModified":"2023-11-14T09:54:10+00:00","breadcrumb":{"@id":"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/nilsrooijmans.com\/daily\/enhanced-version-of-google-ads-script-negative-keywords-conflicts#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nilsrooijmans.com\/daily"},{"@type":"ListItem","position":2,"name":"Enhanced version of Google Ads Script: Negative Keywords Conflicts"}]},{"@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\/46","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=46"}],"version-history":[{"count":2,"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":79,"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/posts\/46\/revisions\/79"}],"wp:attachment":[{"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nilsrooijmans.com\/daily\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}