{"id":2464,"date":"2025-07-21T14:26:49","date_gmt":"2025-07-21T14:26:49","guid":{"rendered":"https:\/\/theoptimizer.io\/help\/?post_type=ht_kb&#038;p=2464"},"modified":"2025-07-21T14:26:49","modified_gmt":"2025-07-21T14:26:49","slug":"how-to-use-name-conditions-in-rules","status":"publish","type":"ht_kb","link":"https:\/\/theoptimizer.io\/help\/knowledge-base\/how-to-use-name-conditions-in-rules\/","title":{"rendered":"How to use Name conditions in rules ?"},"content":{"rendered":"<p>With the help of automatic optimization rules on TheOptimizer platform, you can automatically pause campaigns or ad groups, change bids and budgets, or run other important optimization actions based on the <strong>Name<\/strong> of your campaign.<\/p>\n<h4 id=\"example-1-start-running-rule-3-days-after-campaign-has-started\" class=\"wp-block-heading\">Example 1: Block all sites\/widgets containing certain words or extensions<\/h4>\n<p data-start=\"84\" data-end=\"377\">If you want to block all placements whose names contain certain keywords (e.g., <em data-start=\"233\" data-end=\"239\">push<\/em>, <em data-start=\"241\" data-end=\"249\">search<\/em>) or end with specific domain extensions (e.g., <em data-start=\"297\" data-end=\"302\">.pk<\/em>, <em data-start=\"304\" data-end=\"309\">.in<\/em>), you no longer need to create separate rules for each condition.<\/p>\n<p data-start=\"379\" data-end=\"503\">You can now achieve this with a single rule using the &#8220;<strong>Name<\/strong> contains&#8221; condition:<br data-start=\"459\" data-end=\"462\" \/>\u2192 <code data-start=\"464\" data-end=\"503\">Name contains: push, search, .pk, .in<\/code><\/p>\n<p data-start=\"505\" data-end=\"573\">This simplifies your setup and makes rule management more efficient.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2465\" src=\"https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/image-1-1024x386.png\" alt=\"\" width=\"643\" height=\"242\" srcset=\"https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/image-1-1024x386.png 1024w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/image-1-300x113.png 300w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/image-1-768x290.png 768w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/image-1-50x19.png 50w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/image-1-1536x579.png 1536w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/image-1-60x23.png 60w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/image-1-100x38.png 100w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/image-1.png 1665w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/><\/p>\n<ol class=\"fa-ul\">\n<li>Go to Rules and click on\u00a0<strong>+New Rule.<\/strong><\/li>\n<li>Select the rule based on the desired rule action, in this case &#8221; Rule: Block Widgets.&#8221;<\/li>\n<li>Define a name for your rule and the maximum look-back interval.<\/li>\n<li>Add any standard rule conditions as needed.<\/li>\n<li>Add <strong>Name \u2013 contains<\/strong> as a condition<\/li>\n<li data-start=\"103\" data-end=\"184\">\n<p data-start=\"105\" data-end=\"184\">Apply the rule only to the campaigns that are relevant to your objective.<\/p>\n<\/li>\n<li data-start=\"185\" data-end=\"290\">\n<p data-start=\"187\" data-end=\"290\">Set a custom schedule for the rule to run based on your preferred time frame or optimization needs.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\ud83d\udca1Note:<\/strong> When adding a rule with a <strong>&#8220;Name&#8221;<\/strong> condition, just separate multiple values with <strong>commas.<\/strong><\/p>\n<h4 class=\"wp-block-heading\">Example 2: Increase campaign budget containing certain words, and has\u00a0Positive ROI<\/h4>\n<p data-start=\"80\" data-end=\"370\">If your campaign, ad set, or ad names include targeting details like for e.g: <em data-start=\"208\" data-end=\"212\">US<\/em>, <em data-start=\"214\" data-end=\"222\">Mobile<\/em>, <em>Test<\/em> \u00a0or purpose keywords like <em data-start=\"264\" data-end=\"273\">LeadGen<\/em>, <em data-start=\"275\" data-end=\"282\">Promo<\/em>, you can easily apply rules across all relevant items using a single condition:<\/p>\n<p data-start=\"372\" data-end=\"465\">\u2192 <strong data-start=\"374\" data-end=\"394\">Name starts with<\/strong>: US, Mobile, Test<br data-start=\"419\" data-end=\"422\" \/>\u2192 <strong data-start=\"424\" data-end=\"441\">Name contains<\/strong>: LeadGen, Promo<\/p>\n<p data-start=\"467\" data-end=\"584\">This allows you to target and optimize the right elements faster, without the need to create multiple separate rules.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-2466\" src=\"https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/Screenshot_1-1024x543.png\" alt=\"\" width=\"661\" height=\"351\" srcset=\"https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/Screenshot_1-1024x543.png 1024w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/Screenshot_1-300x159.png 300w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/Screenshot_1-768x407.png 768w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/Screenshot_1-50x27.png 50w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/Screenshot_1-1536x814.png 1536w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/Screenshot_1-60x32.png 60w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/Screenshot_1-100x53.png 100w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2025\/07\/Screenshot_1.png 1671w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/p>\n<ol class=\"fa-ul\">\n<li>Go to Rules and click on\u00a0<strong>+New Rule.<\/strong><\/li>\n<li>Select the rule based on the desired rule action, in this case &#8221; Rule: Change Campaign Budget.&#8221;<\/li>\n<li>Define a name for your rule and the maximum look-back interval.<\/li>\n<li>Add any standard rule conditions as needed.<\/li>\n<li>Add <strong>Name \u2013 contains<\/strong> as a condition \/ Add ROI as a condition<\/li>\n<li data-start=\"103\" data-end=\"184\">\n<p data-start=\"105\" data-end=\"184\">Apply the rule only to the campaigns that are relevant to your objective.<\/p>\n<\/li>\n<li data-start=\"185\" data-end=\"290\">\n<p data-start=\"187\" data-end=\"290\">Set a custom schedule for the rule to run based on your preferred time frame or optimization needs.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\ud83d\udca1Note(Again):<\/strong> When adding a rule with a <strong>&#8220;Name&#8221;<\/strong> condition, just separate multiple values with <strong>commas.<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With the help of automatic optimization rules on TheOptimizer platform, you can automatically pause campaigns or ad groups, change bids and budgets, or run other important optimization actions based on the Name of your campaign. Example 1: Block all sites\/widgets containing certain words or extensions If you want to block&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[14],"ht-kb-tag":[],"class_list":["post-2464","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-automation-optimization"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/ht-kb\/2464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/comments?post=2464"}],"version-history":[{"count":1,"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/ht-kb\/2464\/revisions"}],"predecessor-version":[{"id":2467,"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/ht-kb\/2464\/revisions\/2467"}],"wp:attachment":[{"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/media?parent=2464"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/ht-kb-category?post=2464"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/ht-kb-tag?post=2464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}