report: daily price A/B/C scoreboard to Telegram (silent on no-sale days)
Adds --telegram mode to coupon_ab_scoreboard.py + a daily cron (18:00 UTC). Pushes the per-arm clicks+conversions table to Telegram ONLY when there was at least one PAID sale in the window; stays silent otherwise (per request, no all-zero spam). Creds read from /opt/performancewest/.env like the other monitors. Verified live: silent at 0 sales (14d), sends at 5 sales (30d).
This commit is contained in:
parent
60d5d3b9d8
commit
9abd08c305
2 changed files with 82 additions and 11 deletions
6
infra/cron/pw-coupon-ab-report
Normal file
6
infra/cron/pw-coupon-ab-report
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Daily trucking price A/B/C scoreboard -> Telegram, but ONLY when there was at
|
||||
# least one PAID sale in the look-back window (silent on no-sale days, per
|
||||
# request). Combines HUMAN clicks (Umami, bot-filtered) + PAID orders per arm.
|
||||
# Runs as deploy (needs docker exec for psql + reads /opt/performancewest/.env).
|
||||
# 18:00 UTC (1pm CT) so the day's morning sends + any same-day orders are in.
|
||||
0 18 * * * deploy python3 /usr/local/bin/coupon_ab_scoreboard.py --days 14 --telegram --arms 20,30,40,0 >> /opt/performancewest/logs/pw-coupon-ab-report.log 2>&1
|
||||
Loading…
Add table
Add a link
Reference in a new issue