diff --git a/dashboards/telegram-ads.html b/dashboards/telegram-ads.html index 9bee8f8..54c433f 100644 --- a/dashboards/telegram-ads.html +++ b/dashboards/telegram-ads.html @@ -381,7 +381,7 @@
بودجه کل کمپین (TON): - 75 TON (~35 م.ت) + 75 TON (~۳۵ م.ت)
@@ -390,7 +390,7 @@
میانگین CPM (TON): - 0.85 TON + 0.85 TON
@@ -399,7 +399,7 @@
نرخ کلیک به پست کانال (CTR): - 1.8% + 1.8%
@@ -408,7 +408,7 @@
نرخ تبدیل کلیک به خرید (CVR): - 2.8% + 2.8%
@@ -452,7 +452,7 @@
بهای هر سفارش (CPO)
- ۱۶۵,۰۰۰ ت + ۱۵۹,۰۰۰ تومان هزینه جذب هر خریدار
@@ -1619,7 +1619,8 @@ ${t.post_draft} const aov = parseFloat(document.getElementById('simAov').value); // Labels update - document.getElementById('simBudgetVal').innerText = budgetTon + ' TON (~' + Math.round(budgetTon * 466000 / 1000000) + ' م.ت)'; + const budgetTomans = budgetTon * 466000; + document.getElementById('simBudgetVal').innerText = budgetTon + ' TON (~' + (Math.round(budgetTomans / 1000000)).toLocaleString('fa-IR') + ' م.ت)'; document.getElementById('simCpmVal').innerText = cpm + ' TON'; document.getElementById('simCtrVal').innerText = (ctr * 100).toFixed(1) + '%'; document.getElementById('simCvrVal').innerText = (cvr * 100).toFixed(1) + '%'; @@ -1629,18 +1630,17 @@ ${t.post_draft} const impressions = Math.round((budgetTon / cpm) * 1000); const clicks = Math.round(impressions * ctr); const orders = Math.round(clicks * cvr); - const budgetTomans = budgetTon * 466000; const gmv = orders * aov; const cpo = orders > 0 ? Math.round(budgetTomans / orders) : 0; const roas = budgetTomans > 0 ? (gmv / budgetTomans).toFixed(2) : '0'; - // Update DOM + // Update DOM with Persian formatting document.getElementById('resImpressions').innerText = impressions.toLocaleString('fa-IR'); document.getElementById('resClicks').innerText = clicks.toLocaleString('fa-IR'); document.getElementById('resOrders').innerText = orders.toLocaleString('fa-IR') + ' رزرو'; - document.getElementById('resCpo').innerText = (cpo / 1000).toLocaleString('fa-IR') + ' هزار ت'; + document.getElementById('resCpo').innerText = cpo.toLocaleString('fa-IR') + ' تومان'; document.getElementById('resGmv').innerText = gmv.toLocaleString('fa-IR') + ' تومان'; - document.getElementById('resRoas').innerText = roas + 'x'; + document.getElementById('resRoas').innerText = parseFloat(roas).toLocaleString('fa-IR') + 'x'; } function resetSimulator() { diff --git a/telegram-ads.html b/telegram-ads.html index 9bee8f8..54c433f 100644 --- a/telegram-ads.html +++ b/telegram-ads.html @@ -381,7 +381,7 @@
بودجه کل کمپین (TON): - 75 TON (~35 م.ت) + 75 TON (~۳۵ م.ت)
@@ -390,7 +390,7 @@
میانگین CPM (TON): - 0.85 TON + 0.85 TON
@@ -399,7 +399,7 @@
نرخ کلیک به پست کانال (CTR): - 1.8% + 1.8%
@@ -408,7 +408,7 @@
نرخ تبدیل کلیک به خرید (CVR): - 2.8% + 2.8%
@@ -452,7 +452,7 @@
بهای هر سفارش (CPO)
- ۱۶۵,۰۰۰ ت + ۱۵۹,۰۰۰ تومان هزینه جذب هر خریدار
@@ -1619,7 +1619,8 @@ ${t.post_draft} const aov = parseFloat(document.getElementById('simAov').value); // Labels update - document.getElementById('simBudgetVal').innerText = budgetTon + ' TON (~' + Math.round(budgetTon * 466000 / 1000000) + ' م.ت)'; + const budgetTomans = budgetTon * 466000; + document.getElementById('simBudgetVal').innerText = budgetTon + ' TON (~' + (Math.round(budgetTomans / 1000000)).toLocaleString('fa-IR') + ' م.ت)'; document.getElementById('simCpmVal').innerText = cpm + ' TON'; document.getElementById('simCtrVal').innerText = (ctr * 100).toFixed(1) + '%'; document.getElementById('simCvrVal').innerText = (cvr * 100).toFixed(1) + '%'; @@ -1629,18 +1630,17 @@ ${t.post_draft} const impressions = Math.round((budgetTon / cpm) * 1000); const clicks = Math.round(impressions * ctr); const orders = Math.round(clicks * cvr); - const budgetTomans = budgetTon * 466000; const gmv = orders * aov; const cpo = orders > 0 ? Math.round(budgetTomans / orders) : 0; const roas = budgetTomans > 0 ? (gmv / budgetTomans).toFixed(2) : '0'; - // Update DOM + // Update DOM with Persian formatting document.getElementById('resImpressions').innerText = impressions.toLocaleString('fa-IR'); document.getElementById('resClicks').innerText = clicks.toLocaleString('fa-IR'); document.getElementById('resOrders').innerText = orders.toLocaleString('fa-IR') + ' رزرو'; - document.getElementById('resCpo').innerText = (cpo / 1000).toLocaleString('fa-IR') + ' هزار ت'; + document.getElementById('resCpo').innerText = cpo.toLocaleString('fa-IR') + ' تومان'; document.getElementById('resGmv').innerText = gmv.toLocaleString('fa-IR') + ' تومان'; - document.getElementById('resRoas').innerText = roas + 'x'; + document.getElementById('resRoas').innerText = parseFloat(roas).toLocaleString('fa-IR') + 'x'; } function resetSimulator() {