Features
Scales bid adjustments proportionally based on distance from target ACOS using adaptive timing controls.
✓ Accounts wanting intelligent bid optimization that adjusts more aggressively when performance is far from target and more cautiously when close
✓ Keywords and targets with varying data reliability where some have daily orders while others need weeks to generate meaningful signals
✓ Sellers who want proportional responses rather than binary "increase or decrease" logic that treats all performance gaps the same
✓ Accounts ready for sophisticated automation that adapts cooldown periods based on data freshness and volume
Daily | Automation: Change Bid: Set ($) using $target_bid
Scales bid adjustments proportionally based on distance from target ACOS using adaptive timing controls.
✓ Accounts wanting intelligent bid optimization that adjusts more aggressively when performance is far from target and more cautiously when close
✓ Keywords and targets with varying data reliability where some have daily orders while others need weeks to generate meaningful signals
✓ Sellers who want proportional responses rather than binary "increase or decrease" logic that treats all performance gaps the same
✓ Accounts ready for sophisticated automation that adapts cooldown periods based on data freshness and volume
Daily | Automation: Change Bid: Set ($) using $target_bid
The blueprint evaluates performance across four cascading time periods to find the freshest data with sufficient orders, then calculates how far current ACOS is from target ACOS. This distance determines both the magnitude of bid adjustment (closer = smaller changes, farther = larger changes) and the cooldown period before the next change (fresher data = shorter cooldowns). The proportional scaling system creates smooth, graduated responses rather than binary reactions, while buffer zones prevent adjustment churn on keywords performing near target.
Proportional Performance Gap Calculation
The blueprint doesn't treat a keyword at 15% ACOS the same as one at 25% when target is 30%. It calculates exactly how far performance is from the relevant threshold, then scales the adjustment percentage proportionally within your configured min/max range. A keyword barely outside the buffer zone gets close to $bid_min_change (3%), while a keyword at or beyond the max threshold gets the full $bid_max_change (10%). This creates nuanced responses that match the severity of the performance gap.
Four-Tier Data Cascade with Adaptive Cooldowns
The blueprint evaluates four periods in order: 7-day → 14-day → 30-day → 60-day, stopping at the first period with sufficient orders ($orders_min = 2). But it doesn't just use different data - it also adapts the cooldown period based on which tier is used. Fresh 7-day data gets a 2-day cooldown, while old 60-day data gets a 7-day cooldown. This prevents over-optimization when forced to use stale data due to low order volume.
Dual-Threshold Asymmetric System
The blueprint uses different threshold distances for increases vs decreases:
This asymmetry reflects different risk profiles - being very efficient (50% of target) justifies aggressive scaling, while being very inefficient (200% of target) requires aggressive cuts. The buffer zone (90-110% of target by default) sits in the middle, creating a stability zone where no changes occur.
Buffer Zone vs Threshold Logic
Understanding the three zones is critical:
This creates five distinct response regions: max increase, scaled increase, no change, scaled decrease, max decrease.
Buffer and Threshold Interaction
The buffer (tacosbufferminchange)andthresholds(t_acos_buffer_min_change) and thresholds (tacosbufferminchange)andthresholds(t_acos_threshold_max_increase, $t_acos_threshold_max_decrease) work together to create the adjustment curve. If you widen the buffer to 15%, you're creating a 85-115% no-change zone, which means adjustments only start when performance is more significantly different from target. This is paired with threshold distances - if your max increase threshold is 50%, the scaling region runs from 85% down to 50% of target ACOS. Narrower buffers + distant thresholds = more gradual scaling. Wider buffers + close thresholds = more aggressive scaling once outside the buffer.
Data Reliability vs Coverage Tradeoff
Setting $orders_min higher (3-4) means you'll rely on longer lookback periods more often, which increases cooldowns and reduces adjustment frequency but improves confidence in each decision. Setting it lower (2 or even 1) means you'll use fresher data more often, enabling more frequent adjustments but with higher risk of reacting to statistical noise. For accounts with high order volume, consider $orders_min = 3-4. For lower volume accounts where most keywords rarely hit 2 orders in 7 days, keeping it at 2 maximizes coverage.
Adjustment Range Philosophy
The min/max range creates bounds for the proportional scaling. A 3-10% range means:
Narrower ranges (2-7%) create more predictable, conservative automation. Wider ranges (5-15%) create more dramatic responses to performance extremes. Avoid ranges where min is too close to max (like 8-10%) as this eliminates the benefits of proportional scaling.
CPC Limit Period Selection
The $bid_limit_cpc_period = 90d uses a long period to smooth out CPC volatility and establish a stable benchmark. Shortening this to 30-60 days makes the limit more responsive to recent CPC changes (useful if your category sees seasonal CPC shifts), but also makes it more volatile. Lengthening to 180+ days creates extreme stability but may lag behind market changes. The 90-day default balances stability with reasonable responsiveness.
$data_quality Values:
These tags appear in the $reason diagnostic to show both why action is/isn't being taken AND which data quality tier is driving decisions.
$reason Patterns:
$result Magnitude Categories:
High-Volume Keywords with Short Lookback
Keywords consistently showing "High Volume: Short Lookback" are your most actively managed terms. They generate enough orders weekly to use fresh 7-day data with 2-day cooldowns, meaning they can be adjusted multiple times per week if performance shifts. These should show the most responsive bid optimization and are where the proportional scaling system shines most - small performance deviations get small adjustments, large deviations get large adjustments, all happening quickly.
Low-Volume Keywords Stuck on Extended Lookback
Keywords consistently showing "Very Low Volume: Extended Lookback" generate fewer than 2 orders in 30 days, forcing the system to use 60-day data with 7-day cooldowns. These will adjust infrequently (maximum once per week), and when they do adjust, the changes are based on very old data. This is working as designed - low-order keywords should change cautiously. If you're seeing too many keywords stuck here and want more frequent adjustments, lower $orders_min to 1 (but expect more noise).
Buffer Zone Stability vs Constant Adjustments
Keywords bouncing between "Within target buffer zone" and "ACOS below/above target threshold" indicate you're near the buffer boundaries. If you're seeing excessive adjustment churn (adjust up, then down, then up again), widen the buffer to 15% to create more stability. If you're seeing too many keywords sitting in "Within target buffer zone" while you think they should be adjusted, narrow the buffer to 5% to reduce the no-change zone.
CPC Limit Constraints
If many keywords show "Limited by CPC-based maximum" frequently, your bid calculations are trying to exceed 2× average CPC regularly. This suggests either: (1) Your ACOS targets are very aggressive relative to current CPC reality, requiring unrealistic bids to achieve them, or (2) The multiplier is too conservative for your category. Review actual performance of keywords hitting this limit - if they're delivering good ACOS even at the capped bid, consider increasing the multiplier to 2.5 or 3.0.
Cooldown Blocking High-Opportunity Keywords
Keywords showing "[High Volume: Short Lookback] Recently changed - cooldown active" with excellent ACOS (far below target) are in a scenario where you'd like to increase bids more aggressively but the adaptive cooldown is holding you back. This is intentional safety - even with fresh data, some cooldown prevents over-reaction to short-term spikes. However, if you're consistently seeing opportunities blocked by cooldowns, you can shorten the tier-specific cooldown periods ($cooldown_short, $cooldown_medium, etc.) to enable more frequent adjustments.
/*
=== Core: Dynamic Bid Management ===
Purpose: Intelligent bid optimization that adjusts more aggressively when further from target ACOS, with adaptive timing controls.
Recommended: Change Bid: Set ($) using $target_bid | Daily
*/
// === Core Settings ===
let $orders_min = 2; // CORE: Minimum orders required for reliable ACOS evaluation
let $bid_min_change = 3%; // CORE: Minimum bid adjustment when change is warranted
let $bid_max_change = 10%; // CORE: Maximum bid adjustment when ACOS is at or beyond target ACOS thresholds
// === Target ACOS Thresholds ===
// Between buffer and thresholds: bid adjustments scale linearly from min to max change percent
let $t_acos_buffer_min_change = 10%; // STRATEGY: No-change buffer around target ACOS - min changes start outside this zone (Target ACOS ± 10%) [e.g., 30% target = 27-33% no-change zone]
let $t_acos_threshold_max_increase = 50%; // STRATEGY: Max increase when ACOS ≤ (Target ACOS × 50%) [e.g., 30% target = 15% max increase threshold]
let $t_acos_threshold_max_decrease = 200%; // STRATEGY: Max decrease when ACOS ≥ (Target ACOS × 200%) [e.g., 30% target = 60% max decrease threshold]
// === Time Periods ===
let $period_short = 0d..7d; // TIME: Primary evaluation period (7 days including today)
let $cooldown_short = 2d; // TIME: Wait period after bid change for short data periods
let $period_medium = 0d..14d; // TIME: Secondary evaluation period (14 days including today)
let $cooldown_medium = 3d; // TIME: Wait period after bid change for medium data periods
let $period_long = 0d..30d; // TIME: Tertiary evaluation period (30 days including today)
let $cooldown_long = 5d; // TIME: Wait period after bid change for long data periods
let $period_extended = 0d..60d; // TIME: Final fallback evaluation period (60 days including today)
let $cooldown_extended = 7d; // TIME: Wait period after bid change for extended data periods
// === Advanced Settings ===
let $bid_limit_cpc_multiplier = 2.0; // SAFEGUARD: Max bid = Avg CPC × 2.0 [e.g., $0.50 CPC = $1.00 max]
let $bid_limit_cpc_period = 90d; // SAFEGUARD: Period for calculating CPC-based bid limits
// === Segment Filters ===
let $include_campaigns = [""]; // FILTER: Apply to all campaigns, or specify terms like ["SP-", "Auto", "Research"]
let $exclude_campaigns = ["NEVER_MATCH"]; // FILTER: Exclude campaigns containing these terms, e.g., ["Brand", "Test", "Archive"]
// ============================================================================
// === Blueprint Logic ===
// ============================================================================
// Advanced logic below - modify carefully
// Multi-period data selection with extended coverage
let $orders_short = orders($period_short);
let $orders_medium = orders($period_medium);
let $orders_long = orders($period_long);
let $orders_extended = orders($period_extended);
let $evaluation_acos = case(
$orders_short >= $orders_min => acos($period_short),
$orders_medium >= $orders_min => acos($period_medium),
$orders_long >= $orders_min => acos($period_long),
$orders_extended >= $orders_min => acos($period_extended),
else 99999 // No reliable data
);
// Track which period was used for diagnostics
let $data_quality = case(
$orders_short >= $orders_min => "High Volume: Short Lookback",
$orders_medium >= $orders_min => "Med Volume: Medium Lookback",
$orders_long >= $orders_min => "Low Volume: Long Lookback",
$orders_extended >= $orders_min => "Very Low Volume: Extended Lookback",
else "insufficient"
);
// Adaptive cooldown periods based on data source
let $cooldown_cutoff = case(
$orders_short >= $orders_min => now() - interval($cooldown_short),
$orders_medium >= $orders_min => now() - interval($cooldown_medium),
$orders_long >= $orders_min => now() - interval($cooldown_long),
else now() - interval($cooldown_extended)
);
// Calculate performance ratio with Target ACOS validation
let $acos_ratio = case(
$evaluation_acos = 99999 => -1, // No reliable data
target acos <= 0 => -1, // Invalid target ACOS
else $evaluation_acos / target acos // Performance ratio
);
// Check if within no-change buffer zone
let $within_buffer = case(
$acos_ratio < 0 => 1, // No change if no data or invalid target
$acos_ratio >= (1 - $t_acos_buffer_min_change) and $acos_ratio <= (1 + $t_acos_buffer_min_change) => 1,
else 0
);
// Proportional scaling for bid adjustments
let $performance_gap = case(
$acos_ratio < 0 => 0, // No gap if no data
// Max increase region: ACOS at 50% of target or better
$acos_ratio <= $t_acos_threshold_max_increase => 1,
// Scaled increase region: ACOS between 50% and buffer zone (90% of target)
$acos_ratio < (1 - $t_acos_buffer_min_change) =>
((1 - $t_acos_buffer_min_change) - $acos_ratio) /
((1 - $t_acos_buffer_min_change) - $t_acos_threshold_max_increase),
// Max decrease region: ACOS at 200% of target or worse
$acos_ratio >= $t_acos_threshold_max_decrease => 1,
// Scaled decrease region: ACOS between buffer zone (110%) and 200% of target
$acos_ratio > (1 + $t_acos_buffer_min_change) =>
($acos_ratio - (1 + $t_acos_buffer_min_change)) /
($t_acos_threshold_max_decrease - (1 + $t_acos_buffer_min_change)),
else 0 // Within buffer zone - no adjustment
);
let $adjustment_percent = case(
$within_buffer = 1 => 0%, // No change within buffer zone
// Increase adjustments for ACOS below target
$acos_ratio <= $t_acos_threshold_max_increase =>
$bid_min_change + ($performance_gap * ($bid_max_change - $bid_min_change)),
$acos_ratio < (1 - $t_acos_buffer_min_change) =>
$bid_min_change + ($performance_gap * ($bid_max_change - $bid_min_change)),
// Decrease adjustments for ACOS above target
$acos_ratio > (1 + $t_acos_buffer_min_change) =>
-1 * ($bid_min_change + ($performance_gap * ($bid_max_change - $bid_min_change))),
else 0%
);
// Calculate target bid with CPC-based limits
let $initial_target_bid = bid * (1 + $adjustment_percent);
let $avg_cpc = cpc($bid_limit_cpc_period);
let $dynamic_max = case(
$avg_cpc > 0 => $avg_cpc * $bid_limit_cpc_multiplier,
else 999 // No CPC data = no dynamic limit
);
let $target_bid = case(
$avg_cpc > 0 and $initial_target_bid > $dynamic_max => $dynamic_max,
else $initial_target_bid
);
// Cooldown validation
let $cooldown_ready = case(
is_null(last bid change) => 1,
last bid change < $cooldown_cutoff => 1,
else 0
);
// Diagnostic properties
let $reason = case(
target acos <= 0 => "No target ACOS set",
$evaluation_acos = 99999 => "Insufficient order data across all lookback periods",
$within_buffer = 1 => case(
$data_quality = "High Volume: Short Lookback" => "[High Volume: Short Lookback] Within target buffer zone",
$data_quality = "Med Volume: Medium Lookback" => "[Med Volume: Medium Lookback] Within target buffer zone",
$data_quality = "Low Volume: Long Lookback" => "[Low Volume: Long Lookback] Within target buffer zone",
$data_quality = "Very Low Volume: Extended Lookback" => "[Very Low Volume: Extended Lookback] Within target buffer zone",
else "Performance within target buffer zone"
),
$cooldown_ready = 0 => case(
$data_quality = "High Volume: Short Lookback" => "[High Volume: Short Lookback] Recently changed - cooldown active",
$data_quality = "Med Volume: Medium Lookback" => "[Med Volume: Medium Lookback] Recently changed - cooldown active",
$data_quality = "Low Volume: Long Lookback" => "[Low Volume: Long Lookback] Recently changed - cooldown active",
$data_quality = "Very Low Volume: Extended Lookback" => "[Very Low Volume: Extended Lookback] Recently changed - cooldown active",
else "Recently changed - cooldown active"
),
$target_bid = bid => "No bid change calculated",
$avg_cpc > 0 and $initial_target_bid > $dynamic_max => "Limited by CPC-based maximum",
$adjustment_percent > 0 => case(
$data_quality = "High Volume: Short Lookback" => "[High Volume: Short Lookback] ACOS below target threshold",
$data_quality = "Med Volume: Medium Lookback" => "[Med Volume: Medium Lookback] ACOS below target threshold",
$data_quality = "Low Volume: Long Lookback" => "[Low Volume: Long Lookback] ACOS below target threshold",
$data_quality = "Very Low Volume: Extended Lookback" => "[Very Low Volume: Extended Lookback] ACOS below target threshold",
else "ACOS below target threshold"
),
$adjustment_percent < 0 => case(
$data_quality = "High Volume: Short Lookback" => "[High Volume: Short Lookback] ACOS above target threshold",
$data_quality = "Med Volume: Medium Lookback" => "[Med Volume: Medium Lookback] ACOS above target threshold",
$data_quality = "Low Volume: Long Lookback" => "[Low Volume: Long Lookback] ACOS above target threshold",
$data_quality = "Very Low Volume: Extended Lookback" => "[Very Low Volume: Extended Lookback] ACOS above target threshold",
else "ACOS above target threshold"
),
else "Performance at target"
);
let $result = case(
$within_buffer = 0 and $cooldown_ready = 1 and $target_bid != bid => case(
$adjustment_percent >= $bid_max_change => "Bid Increase: Max",
$adjustment_percent >= $bid_max_change * 0.5 => "Bid Increase: Upper Range",
$adjustment_percent > 0 => "Bid Increase: Lower Range",
$adjustment_percent <= -1 * $bid_max_change => "Bid Decrease: Max",
$adjustment_percent <= -1 * $bid_max_change * 0.5 => "Bid Decrease: Upper Range",
$adjustment_percent < 0 => "Bid Decrease: Lower Range",
else "No action needed"
),
else "No action needed"
);
// === Final Filter ===
state = "effectively enabled"
and (campaign name contains any $include_campaigns)
and (campaign name does not contain any $exclude_campaigns)
and $within_buffer = 0
and $target_bid != bid
and $cooldown_ready = 1
/*
=== Core: Dynamic Bid Management ===
Purpose: Intelligent bid optimization that adjusts more aggressively when further from target ACOS, with adaptive timing controls.
Recommended: Change Bid: Set ($) using $target_bid | Daily
*/
// === Core Settings ===
let $orders_min = 2; // CORE: Minimum orders required for reliable ACOS evaluation
let $bid_min_change = 3%; // CORE: Minimum bid adjustment when change is warranted
let $bid_max_change = 10%; // CORE: Maximum bid adjustment when ACOS is at or beyond target ACOS thresholds
// === Target ACOS Thresholds ===
// Between buffer and thresholds: bid adjustments scale linearly from min to max change percent
let $t_acos_buffer_min_change = 10%; // STRATEGY: No-change buffer around target ACOS - min changes start outside this zone (Target ACOS ± 10%) [e.g., 30% target = 27-33% no-change zone]
let $t_acos_threshold_max_increase = 50%; // STRATEGY: Max increase when ACOS ≤ (Target ACOS × 50%) [e.g., 30% target = 15% max increase threshold]
let $t_acos_threshold_max_decrease = 200%; // STRATEGY: Max decrease when ACOS ≥ (Target ACOS × 200%) [e.g., 30% target = 60% max decrease threshold]
// === Time Periods ===
let $period_short = 0d..7d; // TIME: Primary evaluation period (7 days including today)
let $cooldown_short = 2d; // TIME: Wait period after bid change for short data periods
let $period_medium = 0d..14d; // TIME: Secondary evaluation period (14 days including today)
let $cooldown_medium = 3d; // TIME: Wait period after bid change for medium data periods
let $period_long = 0d..30d; // TIME: Tertiary evaluation period (30 days including today)
let $cooldown_long = 5d; // TIME: Wait period after bid change for long data periods
let $period_extended = 0d..60d; // TIME: Final fallback evaluation period (60 days including today)
let $cooldown_extended = 7d; // TIME: Wait period after bid change for extended data periods
// === Advanced Settings ===
let $bid_limit_cpc_multiplier = 2.0; // SAFEGUARD: Max bid = Avg CPC × 2.0 [e.g., $0.50 CPC = $1.00 max]
let $bid_limit_cpc_period = 90d; // SAFEGUARD: Period for calculating CPC-based bid limits
// === Segment Filters ===
let $include_campaigns = [""]; // FILTER: Apply to all campaigns, or specify terms like ["SP-", "Auto", "Research"]
let $exclude_campaigns = ["NEVER_MATCH"]; // FILTER: Exclude campaigns containing these terms, e.g., ["Brand", "Test", "Archive"]
// ============================================================================
// === Blueprint Logic ===
// ============================================================================
// Advanced logic below - modify carefully
// Multi-period data selection with extended coverage
let $orders_short = orders($period_short);
let $orders_medium = orders($period_medium);
let $orders_long = orders($period_long);
let $orders_extended = orders($period_extended);
let $evaluation_acos = case(
$orders_short >= $orders_min => acos($period_short),
$orders_medium >= $orders_min => acos($period_medium),
$orders_long >= $orders_min => acos($period_long),
$orders_extended >= $orders_min => acos($period_extended),
else 99999 // No reliable data
);
// Track which period was used for diagnostics
let $data_quality = case(
$orders_short >= $orders_min => "High Volume: Short Lookback",
$orders_medium >= $orders_min => "Med Volume: Medium Lookback",
$orders_long >= $orders_min => "Low Volume: Long Lookback",
$orders_extended >= $orders_min => "Very Low Volume: Extended Lookback",
else "insufficient"
);
// Adaptive cooldown periods based on data source
let $cooldown_cutoff = case(
$orders_short >= $orders_min => now() - interval($cooldown_short),
$orders_medium >= $orders_min => now() - interval($cooldown_medium),
$orders_long >= $orders_min => now() - interval($cooldown_long),
else now() - interval($cooldown_extended)
);
// Calculate performance ratio with Target ACOS validation
let $acos_ratio = case(
$evaluation_acos = 99999 => -1, // No reliable data
target acos <= 0 => -1, // Invalid target ACOS
else $evaluation_acos / target acos // Performance ratio
);
// Check if within no-change buffer zone
let $within_buffer = case(
$acos_ratio < 0 => 1, // No change if no data or invalid target
$acos_ratio >= (1 - $t_acos_buffer_min_change) and $acos_ratio <= (1 + $t_acos_buffer_min_change) => 1,
else 0
);
// Proportional scaling for bid adjustments
let $performance_gap = case(
$acos_ratio < 0 => 0, // No gap if no data
// Max increase region: ACOS at 50% of target or better
$acos_ratio <= $t_acos_threshold_max_increase => 1,
// Scaled increase region: ACOS between 50% and buffer zone (90% of target)
$acos_ratio < (1 - $t_acos_buffer_min_change) =>
((1 - $t_acos_buffer_min_change) - $acos_ratio) /
((1 - $t_acos_buffer_min_change) - $t_acos_threshold_max_increase),
// Max decrease region: ACOS at 200% of target or worse
$acos_ratio >= $t_acos_threshold_max_decrease => 1,
// Scaled decrease region: ACOS between buffer zone (110%) and 200% of target
$acos_ratio > (1 + $t_acos_buffer_min_change) =>
($acos_ratio - (1 + $t_acos_buffer_min_change)) /
($t_acos_threshold_max_decrease - (1 + $t_acos_buffer_min_change)),
else 0 // Within buffer zone - no adjustment
);
let $adjustment_percent = case(
$within_buffer = 1 => 0%, // No change within buffer zone
// Increase adjustments for ACOS below target
$acos_ratio <= $t_acos_threshold_max_increase =>
$bid_min_change + ($performance_gap * ($bid_max_change - $bid_min_change)),
$acos_ratio < (1 - $t_acos_buffer_min_change) =>
$bid_min_change + ($performance_gap * ($bid_max_change - $bid_min_change)),
// Decrease adjustments for ACOS above target
$acos_ratio > (1 + $t_acos_buffer_min_change) =>
-1 * ($bid_min_change + ($performance_gap * ($bid_max_change - $bid_min_change))),
else 0%
);
// Calculate target bid with CPC-based limits
let $initial_target_bid = bid * (1 + $adjustment_percent);
let $avg_cpc = cpc($bid_limit_cpc_period);
let $dynamic_max = case(
$avg_cpc > 0 => $avg_cpc * $bid_limit_cpc_multiplier,
else 999 // No CPC data = no dynamic limit
);
let $target_bid = case(
$avg_cpc > 0 and $initial_target_bid > $dynamic_max => $dynamic_max,
else $initial_target_bid
);
// Cooldown validation
let $cooldown_ready = case(
is_null(last bid change) => 1,
last bid change < $cooldown_cutoff => 1,
else 0
);
// Diagnostic properties
let $reason = case(
target acos <= 0 => "No target ACOS set",
$evaluation_acos = 99999 => "Insufficient order data across all lookback periods",
$within_buffer = 1 => case(
$data_quality = "High Volume: Short Lookback" => "[High Volume: Short Lookback] Within target buffer zone",
$data_quality = "Med Volume: Medium Lookback" => "[Med Volume: Medium Lookback] Within target buffer zone",
$data_quality = "Low Volume: Long Lookback" => "[Low Volume: Long Lookback] Within target buffer zone",
$data_quality = "Very Low Volume: Extended Lookback" => "[Very Low Volume: Extended Lookback] Within target buffer zone",
else "Performance within target buffer zone"
),
$cooldown_ready = 0 => case(
$data_quality = "High Volume: Short Lookback" => "[High Volume: Short Lookback] Recently changed - cooldown active",
$data_quality = "Med Volume: Medium Lookback" => "[Med Volume: Medium Lookback] Recently changed - cooldown active",
$data_quality = "Low Volume: Long Lookback" => "[Low Volume: Long Lookback] Recently changed - cooldown active",
$data_quality = "Very Low Volume: Extended Lookback" => "[Very Low Volume: Extended Lookback] Recently changed - cooldown active",
else "Recently changed - cooldown active"
),
$target_bid = bid => "No bid change calculated",
$avg_cpc > 0 and $initial_target_bid > $dynamic_max => "Limited by CPC-based maximum",
$adjustment_percent > 0 => case(
$data_quality = "High Volume: Short Lookback" => "[High Volume: Short Lookback] ACOS below target threshold",
$data_quality = "Med Volume: Medium Lookback" => "[Med Volume: Medium Lookback] ACOS below target threshold",
$data_quality = "Low Volume: Long Lookback" => "[Low Volume: Long Lookback] ACOS below target threshold",
$data_quality = "Very Low Volume: Extended Lookback" => "[Very Low Volume: Extended Lookback] ACOS below target threshold",
else "ACOS below target threshold"
),
$adjustment_percent < 0 => case(
$data_quality = "High Volume: Short Lookback" => "[High Volume: Short Lookback] ACOS above target threshold",
$data_quality = "Med Volume: Medium Lookback" => "[Med Volume: Medium Lookback] ACOS above target threshold",
$data_quality = "Low Volume: Long Lookback" => "[Low Volume: Long Lookback] ACOS above target threshold",
$data_quality = "Very Low Volume: Extended Lookback" => "[Very Low Volume: Extended Lookback] ACOS above target threshold",
else "ACOS above target threshold"
),
else "Performance at target"
);
let $result = case(
$within_buffer = 0 and $cooldown_ready = 1 and $target_bid != bid => case(
$adjustment_percent >= $bid_max_change => "Bid Increase: Max",
$adjustment_percent >= $bid_max_change * 0.5 => "Bid Increase: Upper Range",
$adjustment_percent > 0 => "Bid Increase: Lower Range",
$adjustment_percent <= -1 * $bid_max_change => "Bid Decrease: Max",
$adjustment_percent <= -1 * $bid_max_change * 0.5 => "Bid Decrease: Upper Range",
$adjustment_percent < 0 => "Bid Decrease: Lower Range",
else "No action needed"
),
else "No action needed"
);
// === Final Filter ===
state = "effectively enabled"
and (campaign name contains any $include_campaigns)
and (campaign name does not contain any $exclude_campaigns)
and $within_buffer = 0
and $target_bid != bid
and $cooldown_ready = 1
© Merch Jar LLC