This commit is contained in:
huangguancheng 2025-01-10 17:41:19 +08:00
parent 19731fcae9
commit 55147b1c88

View File

@ -525,7 +525,7 @@ class AdsInsightService
// 计算 ROAS
$roas = $total_spend == 0 ? '-' : round($total_purchases_value / $total_spend, 2);
$cost_per_purchase = $total_purchases == 0? '-' : round($total_spend / $total_purchases, 2);
$cost_per_purchase = $total_purchases == 0? 0 : round($total_spend / $total_purchases, 2);
// 计算 CTR
$ctr = $total_impressions > 0 ? number_format(($total_clicks / $total_impressions) * 100, 2) . '%' : '-';