Set up auto-pause by ROAS
This scenario builds a Britva rule that automatically pauses ads with poor payback — for example, those that have spent a noticeable amount but delivered a ROAS below the target. First we will write the rule, then safely test it on live ads, and only after that turn it on.
A rule is a small JavaScript function: it receives one ad as input, inside it you check the ad's metrics, and when the condition is met you trigger a pause. For more on how this works — see How auto-rules work.
1. Create a new rule
Open the Britva section and on the Rules tab click + New rule. A separate editor page opens. For more — see Creating a rule.
Enter a Name (for example, «Pause on low ROAS») and pick a scope — user for your own ads, team or global if your role allows it.
2. Describe the condition for pausing by ROAS
In the editor in the center, write the code. The idea: if the spend over a day is already significant and the ROAS is below the target threshold — pause the ad. For example:
/** @param {Ad} ad */
function checkAd(ad) {
if (ad.spend_24h > 50 && ad.roas_24h < 0.8) {
pauseAd('24h', 'ROAS ниже 0.8 при расходе > 50');
}
}
Here ad.spend_24h is the spend over the last 24 hours, ad.roas_24h is the ROAS over the same period, and pauseAd('24h', '…') pauses the ad for a day with the given reason. Substitute your own thresholds. For more on the available fields — see Conditions and metrics, on actions — see Actions.
Describe the task in words to the AI assistant in the left column («Pause ads with a ROAS below 0.8 and spend over 50 per day») — it will suggest ready-made code that is inserted with a single click.
Add a spend condition (ad.spend_24h > …) to the ROAS check. Without it, the rule will fire on ads that have barely spent anything yet and simply haven't had time to pay back — and will close them prematurely.
3. Test on live data
On the right, switch to the Test tab and click Test on live data. The rule runs against the current ads right in the browser and shows which of them would fall under a pause. This is safe: during the test nothing is paused. For more — see Testing a rule.
Make sure the matches contain exactly the unprofitable ads you expected. If the list looks wrong — adjust the thresholds and run the test again.
4. Turn the rule on
When you are satisfied with the test result, make sure the Enabled toggle is on and click Create. The rule will appear in the list on the Rules tab and start working in the shared check cycle.
Done
Britva now pauses ads that don't pay back on its own. Next:
- Trigger logs — see which ads were paused and why.
- Paused — the list of ads the rule is keeping paused right now.
- Scheduling and pauses — what pause durations exist and how long they are set for.