On this page:
What are Custom Expressions?
In the Rule Engine, "Custom Expressions" allow you to incorporate metrics generated by your own formulae when creating custom strategies.
For instance, if you typically track monthly budgets using a specific formula, for example, "Daily Budget * 30.4," you can build this expression and name it "Monthly Budget" using this feature and create rules based on it. This expression will also be visible on the Rule Engine Results page.
This feature is available in Rule Engine for Google Ads, Microsoft Ads, Amazon Ads, and Meta.
Why use Custom Expressions?
Custom Expressions extend the power of Rule Engine by enabling you to build rules using metrics beyond those provided by the API. This flexibility allows you to track and optimize accounts based on specific company metrics, receive alerts about changes in these metrics, and generate automatic reports.
Custom Expressions enable you to:
Create complex expressions that are not feasible to create with standard API metrics
Replicate custom columns from ad platforms that aren't available in Rule Engine due to API restrictions
Analyze weekly or monthly trends in metric values
Use formulae to define the action – e.g. to increase or decrease Target ROAS or CPA using relative metrics
How to create a Custom Expression?
Click on “Add Condition” or "Add Another Action" and change the “Value Type” to “Expression” from the dropdown.
Build the formula using metrics and operators.
Set a name for the expression in the text field and check the “Include expression value in results” option.
Sample use cases for this feature (combined with other advanced Rule Engine features)
Checking if the campaign cost exceeds the monthly target within 10 days
Create a condition comparing the campaign cost in the last 10 days (a custom date range) to 75% of the Monthly Target (custom expression).
Also, check if the minimum impression threshold is hit (use a custom variable for this).
If exceeded, reduce the Daily Budget by 20% and/or generate a report.
Automate this strategy and "add it to Alerts" to get notified automatically when the campaigns are overspending.
Changing the ad group's Target ROAS based on the ROAS gap
Create conditions to identify when an ad group is capturing a good amount of impression share (Search Impr Share <= Target Impression share of 70%) and its ROAS is significantly above the Target ROAS (ROAS > Target ROAS *1.4).
Add conditions to only show ad groups that meet minimum conversion, cost, and conversion value thresholds.
While adding an action to update the Target ROAS, use the formula (ROAS-Target ROAS)/10 to ensure that any changes made to the target are relative to the ROAS gap and won't be too drastic to send campaigns back to the learning phrase.
Click 'View Suggestions' and automate the strategy to send an email when high-performing ad groups are found.
Monitoring weekly declines in ad CTR and conversions
Create a condition comparing the CTR and conversions of ads in the current week to 50% of the CTR and conversions of ads last week.
Add an action to “Include in a report” and set up alerts for drops in CTR and conversions by automating the strategy.