{"id":623,"date":"2016-12-24T14:14:22","date_gmt":"2016-12-24T10:14:22","guid":{"rendered":"https:\/\/optimizationup.com\/?p=623"},"modified":"2021-03-03T18:13:33","modified_gmt":"2021-03-03T14:13:33","slug":"adwords-script-exclude-location-dynamically","status":"publish","type":"post","link":"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/","title":{"rendered":"Google Ads Script to Exclude Locations Automatically"},"content":{"rendered":"<p>Recently, \u00a0we had an interesting case with one of our clients where he always needed to exclude different locations from his <a href=\"https:\/\/optimizationup.com\/tag\/adwords\/\">Google Ads<\/a> campaigns based on the business availability. This used to happen very often and the client used to come back to us every couple of days asking to exclude and include different certain locations.<\/p>\n<p>Excluding dozen locations actually takes time and mistakes can happen, so we had to think of a way to automate this process. We developed a simple <a href=\"https:\/\/optimizationup.com\/tag\/adwords-scripts\">Google Ads script<\/a> linked to a Google spreadsheet where the client can just change the status of his locations to &#8220;Excluded&#8221; or &#8221; Targeted&#8221;\u00a0and changes\u00a0will be applied to the campaigns.<\/p>\n<h5>How&#8217;s the script work?<\/h5>\n<p>The script fetches its data from a spreadsheet which consists of two sheets:<\/p>\n<p>#1 <a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1pB22uvAZICUIWpJ3ulP3LPffVd5B2mreKXc9g14SXP0\/edit#gid=2136453441\">The Locations Sheet<\/a> where we list all of the available locations\u00a0supported by the client business along with their IDs.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1459\" src=\"https:\/\/optimizationup.com\/wp-content\/uploads\/2016\/12\/adwords-script-location-1-300x286.jpg\" alt=\"\" width=\"408\" height=\"389\" srcset=\"https:\/\/optimizationup.com\/wp-content\/uploads\/2016\/12\/adwords-script-location-1-300x286.jpg 300w, https:\/\/optimizationup.com\/wp-content\/uploads\/2016\/12\/adwords-script-location-1.jpg 656w\" sizes=\"auto, (max-width: 408px) 100vw, 408px\" \/><\/p>\n<p>#2 The Master Sheet where we only pull the excluded locations from the location sheet (using an array formula) and feed them into the script.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1460\" src=\"https:\/\/optimizationup.com\/wp-content\/uploads\/2016\/12\/adwords-location-script-1-300x179.jpg\" alt=\"\" width=\"488\" height=\"291\" srcset=\"https:\/\/optimizationup.com\/wp-content\/uploads\/2016\/12\/adwords-location-script-1-300x179.jpg 300w, https:\/\/optimizationup.com\/wp-content\/uploads\/2016\/12\/adwords-location-script-1-1024x610.jpg 1024w, https:\/\/optimizationup.com\/wp-content\/uploads\/2016\/12\/adwords-location-script-1-768x458.jpg 768w, https:\/\/optimizationup.com\/wp-content\/uploads\/2016\/12\/adwords-location-script-1.jpg 1047w\" sizes=\"auto, (max-width: 488px) 100vw, 488px\" \/><\/p>\n<p>The source code to link the spreadsheet to your AdWords script\u00a0as follows:<\/p>\n<pre>function main() {\n\n var SPREADSHEET_URL = \"https:\/\/docs.google.com\/spreadsheets\/d\/1xxxxxhtN8ub6mS8Nn7CktFcajBw8iGfTI0Ns7KGLulNgcMY\/edit#gid=0\";\n var SHEET_NAME = 'Master';\n var spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);\n var sheet = spreadsheet.getSheetByName(SHEET_NAME);\n var data = sheet.getRange(\"A:C\").getValues();\n<\/pre>\n<p>The first thing the AdWords script does, it removes all the excluded locations from the specified campaigns. So, if the client does change the status of any of the locations from &#8220;Excluded&#8221; to &#8220;Targeted&#8221;. We make sure this is also applied through our script\u00a0and we target the location back again.<\/p>\n<pre>\/\/ REMOVING EXCLUDED LOCATIONS\n \n var campaignIterator = AdWordsApp.campaigns()\n .withCondition(\"Status = ENABLED\")\n .get();\n \n while (campaignIterator.hasNext()) {\n var campaign = campaignIterator.next();\n var excludedLocations = campaign.targeting().excludedLocations().get();\n while(excludedLocations.hasNext()){\n var excludedLocation = excludedLocations.next();\n excludedLocation.remove();\n }\n }\n<\/pre>\n<p>The script then starts iterating over the data in your spreadsheet and if the location column is empty it stops executing at this point. \u00a0Otherwise, the script will finish its job and exclude all the locations added in your sheet from your <a href=\"https:\/\/optimizationup.com\/tag\/adwords\/\">AdWords<\/a> campaigns.<\/p>\n<pre>for (i in data) {\n \/\/ SKIP HEADER ROW\n if (i == 0) {\n continue;\n }\n var [location, locationId] = data[i];\n\n \/\/ BREAK IF LOCATION IS EMPTY\n if (location == \"\") {\n break;\n } else {\n \n \/\/ ADDING EXCLUDED LOCATIONS\n\n var campaignIterator = AdWordsApp.campaigns()\n .get();\n while (campaignIterator.hasNext()) {\n var campaign = campaignIterator.next();\n\n campaign.excludeLocation(parseInt(locationId));\n   }\n  }\n }\n<\/pre>\n<p>Finally, the <a href=\"https:\/\/optimizationup.com\/tag\/adwords-scripts\">AdWords script <\/a>gives you a report\u00a0of all the excluded locations in your campaigns or across your account. You can find the report in your sheet in columns &#8220;E&#8221; and &#8220;F&#8221; in the master sheet.<\/p>\n<p>Also, don&#8217;t forget to schedule your script to run every 24 hours or the time period that suits you. So, whenever a change happens in the spreadsheet, it applies to your <a href=\"https:\/\/optimizationup.com\/tag\/adwords\/\">AdWords<\/a> campaigns.<\/p>\n<pre>\/\/ GETTING EXCLUDED LOCATIONS\n var locationIterator = campaign.targeting().excludedLocations().get(); \n sheet.getRange(\"E:F\").clearContent();\n sheet.getRange(\"E1\").setValue(\"Current Excluded Location ID\");\n sheet.getRange(\"F1\").setValue(\"Current Excluded Location Name\");\n for (var row = 2; locationIterator.hasNext(); row ++) {\n var excludedLocation = locationIterator.next();\n sheet.getRange(\"E\" + row).setValue(excludedLocation.getId());\n sheet.getRange(\"F\" + row).setValue(excludedLocation.getName());\n }\n}<\/pre>\n<p>Here&#8217;s the source code of the full AdWords script. You can <a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1pB22uvAZICUIWpJ3ulP3LPffVd5B2mreKXc9g14SXP0\/edit#gid=2136453441\">make a copy of the spreadsheet<\/a> and start testing it out\u00a0on your account and let us know how it goes.<\/p>\n<pre>\/* Copy Right 2016, Ahmed Ali, https:\/\/optimizationup.com *\/\nfunction main() {\n var SPREADSHEET_URL = \"https:\/\/docs.google.com\/spreadsheets\/d\/1pB22uvAZICUIWpJ3ulP3LPffVd5B2mreKXc9g14SXP0\/edit#gid=2136453441\";\n var SHEET_NAME = 'Master';\n var spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);\n var sheet = spreadsheet.getSheetByName(SHEET_NAME);\n var data = sheet.getRange(\"A:C\").getValues();\n\n \n \/\/ REMOVING EXCLUDED LOCATIONS\n \n var campaignIterator = AdWordsApp.campaigns()\n .withCondition(\"Status = ENABLED\")\n .get();\n \n while (campaignIterator.hasNext()) {\n var campaign = campaignIterator.next();\n var excludedLocations = campaign.targeting().excludedLocations().get();\n while(excludedLocations.hasNext()){\n var excludedLocation = excludedLocations.next();\n excludedLocation.remove();\n }\n }\n\n for (i in data) {\n\n \/\/ SKIP HEADER ROW\n if (i == 0) {\n continue;\n }\n var [location, locationId] = data[i];\n\n \/\/ BREAK IF LOCATION IS EMPTY\n if (location == \"\") {\n break;\n } else {\n \/\/ ADDING EXCLUDED LOCATIONS\n\n var campaignIterator = AdWordsApp.campaigns()\n .get();\n while (campaignIterator.hasNext()) {\n var campaign = campaignIterator.next();\n\n campaign.excludeLocation(parseInt(locationId));\n }\n }\n }\n \n \/\/ GETTING EXCLUDED LOCATIONS\n var locationIterator = campaign.targeting().excludedLocations().get(); \n sheet.getRange(\"E:F\").clearContent();\n sheet.getRange(\"E1\").setValue(\"Current Excluded Location ID\");\n sheet.getRange(\"F1\").setValue(\"Current Excluded Location Name\");\n for (var row = 2; locationIterator.hasNext(); row ++) {\n var excludedLocation = locationIterator.next();\n sheet.getRange(\"E\" + row).setValue(excludedLocation.getId());\n sheet.getRange(\"F\" + row).setValue(excludedLocation.getName());\n }\n}\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Recently, \u00a0we had an interesting case with one of our clients where he always needed to exclude different locations from his Google Ads campaigns based on the business availability. This used to happen very often and the client used to come back to us every couple of days asking to exclude and include different certain&#8230;<\/p>\n<p><a class=\"read-more\" href=\"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":1446,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[33,44],"class_list":["post-623","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-optimize","tag-google-ads","tag-google-ads-scripts"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Google Ads Script to Exclude Locations Automatically | Optimization Up<\/title>\n<meta name=\"description\" content=\"Save time with AdWords Script and learn how to exclude locations automatically through Google Spreadsheets via our step by step guide.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Google Ads Script to Exclude Locations Automatically | Optimization Up\" \/>\n<meta property=\"og:description\" content=\"Save time with AdWords Script and learn how to exclude locations automatically through Google Spreadsheets via our step by step guide.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/\" \/>\n<meta property=\"og:site_name\" content=\"Optimization Up\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/A7med.3lii\" \/>\n<meta property=\"article:published_time\" content=\"2016-12-24T10:14:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-03T14:13:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/optimizationup.com\/wp-content\/uploads\/2017\/03\/PPC-4.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"460\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ahmed Ali\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@A7med_3ly\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ahmed Ali\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/optimizationup.com\\\/adwords-script-exclude-location-dynamically\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/optimizationup.com\\\/adwords-script-exclude-location-dynamically\\\/\"},\"author\":{\"name\":\"Ahmed Ali\",\"@id\":\"https:\\\/\\\/optimizationup.com\\\/#\\\/schema\\\/person\\\/75b8aaa058bc4d0630cc7e138840f768\"},\"headline\":\"Google Ads Script to Exclude Locations Automatically\",\"datePublished\":\"2016-12-24T10:14:22+00:00\",\"dateModified\":\"2021-03-03T14:13:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/optimizationup.com\\\/adwords-script-exclude-location-dynamically\\\/\"},\"wordCount\":393,\"commentCount\":8,\"image\":{\"@id\":\"https:\\\/\\\/optimizationup.com\\\/adwords-script-exclude-location-dynamically\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/optimizationup.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/PPC-4.png\",\"keywords\":[\"Google Ads\",\"Google Ads Scripts\"],\"articleSection\":[\"Optimize\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/optimizationup.com\\\/adwords-script-exclude-location-dynamically\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/optimizationup.com\\\/adwords-script-exclude-location-dynamically\\\/\",\"url\":\"https:\\\/\\\/optimizationup.com\\\/adwords-script-exclude-location-dynamically\\\/\",\"name\":\"Google Ads Script to Exclude Locations Automatically | Optimization Up\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/optimizationup.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/optimizationup.com\\\/adwords-script-exclude-location-dynamically\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/optimizationup.com\\\/adwords-script-exclude-location-dynamically\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/optimizationup.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/PPC-4.png\",\"datePublished\":\"2016-12-24T10:14:22+00:00\",\"dateModified\":\"2021-03-03T14:13:33+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/optimizationup.com\\\/#\\\/schema\\\/person\\\/75b8aaa058bc4d0630cc7e138840f768\"},\"description\":\"Save time with AdWords Script and learn how to exclude locations automatically through Google Spreadsheets via our step by step guide.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/optimizationup.com\\\/adwords-script-exclude-location-dynamically\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/optimizationup.com\\\/adwords-script-exclude-location-dynamically\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/optimizationup.com\\\/adwords-script-exclude-location-dynamically\\\/#primaryimage\",\"url\":\"https:\\\/\\\/optimizationup.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/PPC-4.png\",\"contentUrl\":\"https:\\\/\\\/optimizationup.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/PPC-4.png\",\"width\":1200,\"height\":460},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/optimizationup.com\\\/adwords-script-exclude-location-dynamically\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/optimizationup.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Google Ads Script to Exclude Locations Automatically\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/optimizationup.com\\\/#website\",\"url\":\"https:\\\/\\\/optimizationup.com\\\/\",\"name\":\"Optimization Up\",\"description\":\"Advanced Optimization &amp; Analytics Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/optimizationup.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/optimizationup.com\\\/#\\\/schema\\\/person\\\/75b8aaa058bc4d0630cc7e138840f768\",\"name\":\"Ahmed Ali\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/68727300a58d1891a3dda2e17e66e7ebd42c80226d3006db77b4814bc14d4d43?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/68727300a58d1891a3dda2e17e66e7ebd42c80226d3006db77b4814bc14d4d43?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/68727300a58d1891a3dda2e17e66e7ebd42c80226d3006db77b4814bc14d4d43?s=96&d=mm&r=g\",\"caption\":\"Ahmed Ali\"},\"description\":\"Entrepreneur focused on building MarTech products that bridge the gap between marketing and technology. Check out my latest products Markifact,\u00a0 Marketing Auditor &amp; GA4 Auditor - discover all my products here.\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/A7med.3lii\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/a7med-ali\\\/\",\"https:\\\/\\\/x.com\\\/A7med_3ly\"],\"url\":\"https:\\\/\\\/optimizationup.com\\\/author\\\/a7med\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Google Ads Script to Exclude Locations Automatically | Optimization Up","description":"Save time with AdWords Script and learn how to exclude locations automatically through Google Spreadsheets via our step by step guide.","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:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/","og_locale":"en_US","og_type":"article","og_title":"Google Ads Script to Exclude Locations Automatically | Optimization Up","og_description":"Save time with AdWords Script and learn how to exclude locations automatically through Google Spreadsheets via our step by step guide.","og_url":"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/","og_site_name":"Optimization Up","article_author":"https:\/\/www.facebook.com\/A7med.3lii","article_published_time":"2016-12-24T10:14:22+00:00","article_modified_time":"2021-03-03T14:13:33+00:00","og_image":[{"width":1200,"height":460,"url":"https:\/\/optimizationup.com\/wp-content\/uploads\/2017\/03\/PPC-4.png","type":"image\/png"}],"author":"Ahmed Ali","twitter_card":"summary_large_image","twitter_creator":"@A7med_3ly","twitter_misc":{"Written by":"Ahmed Ali","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/#article","isPartOf":{"@id":"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/"},"author":{"name":"Ahmed Ali","@id":"https:\/\/optimizationup.com\/#\/schema\/person\/75b8aaa058bc4d0630cc7e138840f768"},"headline":"Google Ads Script to Exclude Locations Automatically","datePublished":"2016-12-24T10:14:22+00:00","dateModified":"2021-03-03T14:13:33+00:00","mainEntityOfPage":{"@id":"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/"},"wordCount":393,"commentCount":8,"image":{"@id":"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/#primaryimage"},"thumbnailUrl":"https:\/\/optimizationup.com\/wp-content\/uploads\/2017\/03\/PPC-4.png","keywords":["Google Ads","Google Ads Scripts"],"articleSection":["Optimize"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/","url":"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/","name":"Google Ads Script to Exclude Locations Automatically | Optimization Up","isPartOf":{"@id":"https:\/\/optimizationup.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/#primaryimage"},"image":{"@id":"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/#primaryimage"},"thumbnailUrl":"https:\/\/optimizationup.com\/wp-content\/uploads\/2017\/03\/PPC-4.png","datePublished":"2016-12-24T10:14:22+00:00","dateModified":"2021-03-03T14:13:33+00:00","author":{"@id":"https:\/\/optimizationup.com\/#\/schema\/person\/75b8aaa058bc4d0630cc7e138840f768"},"description":"Save time with AdWords Script and learn how to exclude locations automatically through Google Spreadsheets via our step by step guide.","breadcrumb":{"@id":"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/#primaryimage","url":"https:\/\/optimizationup.com\/wp-content\/uploads\/2017\/03\/PPC-4.png","contentUrl":"https:\/\/optimizationup.com\/wp-content\/uploads\/2017\/03\/PPC-4.png","width":1200,"height":460},{"@type":"BreadcrumbList","@id":"https:\/\/optimizationup.com\/adwords-script-exclude-location-dynamically\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/optimizationup.com\/"},{"@type":"ListItem","position":2,"name":"Google Ads Script to Exclude Locations Automatically"}]},{"@type":"WebSite","@id":"https:\/\/optimizationup.com\/#website","url":"https:\/\/optimizationup.com\/","name":"Optimization Up","description":"Advanced Optimization &amp; Analytics Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/optimizationup.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/optimizationup.com\/#\/schema\/person\/75b8aaa058bc4d0630cc7e138840f768","name":"Ahmed Ali","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/68727300a58d1891a3dda2e17e66e7ebd42c80226d3006db77b4814bc14d4d43?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/68727300a58d1891a3dda2e17e66e7ebd42c80226d3006db77b4814bc14d4d43?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/68727300a58d1891a3dda2e17e66e7ebd42c80226d3006db77b4814bc14d4d43?s=96&d=mm&r=g","caption":"Ahmed Ali"},"description":"Entrepreneur focused on building MarTech products that bridge the gap between marketing and technology. Check out my latest products Markifact,\u00a0 Marketing Auditor &amp; GA4 Auditor - discover all my products here.","sameAs":["https:\/\/www.facebook.com\/A7med.3lii","https:\/\/www.linkedin.com\/in\/a7med-ali\/","https:\/\/x.com\/A7med_3ly"],"url":"https:\/\/optimizationup.com\/author\/a7med\/"}]}},"_links":{"self":[{"href":"https:\/\/optimizationup.com\/wp-json\/wp\/v2\/posts\/623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/optimizationup.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/optimizationup.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/optimizationup.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/optimizationup.com\/wp-json\/wp\/v2\/comments?post=623"}],"version-history":[{"count":1,"href":"https:\/\/optimizationup.com\/wp-json\/wp\/v2\/posts\/623\/revisions"}],"predecessor-version":[{"id":1461,"href":"https:\/\/optimizationup.com\/wp-json\/wp\/v2\/posts\/623\/revisions\/1461"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/optimizationup.com\/wp-json\/wp\/v2\/media\/1446"}],"wp:attachment":[{"href":"https:\/\/optimizationup.com\/wp-json\/wp\/v2\/media?parent=623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/optimizationup.com\/wp-json\/wp\/v2\/categories?post=623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/optimizationup.com\/wp-json\/wp\/v2\/tags?post=623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}