feat: landing analytics goals, daily bar chart, referrer tracking, contact persistence

- Add per-landing analytics goals (view/click) with admin editor toggle
- Add sticky pay button option for mobile landing pages
- Add daily purchases bar chart (created vs paid) to landing stats
- Replace single purchase count with created/paid split in stats summary
- Add referrer tracking to purchases with hostname display in stats
- Add time display to purchase cards alongside date
- Pass user timezone to stats API for correct daily grouping
- Clamp referrer (500 chars) and subid (255 chars) to backend limits
- Persist contact value per-landing-slug in localStorage
- Fire buy_success analytics goal on successful delivery
- Export USER_TIMEZONE from format utils
- Add analytics/stats translations for fa.json and zh.json locales

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Fringg
2026-04-29 09:17:52 +03:00
parent a50bd39df2
commit 020f4c95e2
11 changed files with 482 additions and 79 deletions

View File

@@ -3380,7 +3380,70 @@
"loadingPeriods": "加载中...",
"periodDaySuffix": "天",
"localeTab": "语言",
"localeHint": "切换语言以编辑该语言的文本"
"localeHint": "切换语言以编辑该语言的文本",
"discount": "折扣",
"discountEnabled": "启用折扣",
"discountPercent": "折扣 %",
"discountStartsAt": "开始日期",
"discountEndsAt": "结束日期",
"discountBadge": "横幅文本(可选)",
"discountBadgePlaceholder": "例如 春季特卖!",
"discountOverrides": "各套餐独立折扣",
"discountOverridesHint": "留空则使用全局折扣",
"discountPreview": "预览",
"discountActive": "折扣",
"background": "动态背景",
"analytics": "分析",
"viewGoal": "浏览目标",
"clickGoal": "支付点击目标",
"statistics": "统计",
"stats": {
"title": "落地页统计",
"totalPurchases": "购买次数",
"revenue": "收入",
"giftPurchases": "礼物",
"regularPurchases": "普通",
"conversionRate": "转化率",
"avgPurchase": "平均客单价",
"dailyChart": "每日购买与收入",
"tariffChart": "套餐分布",
"giftBreakdown": "礼物 vs 普通",
"purchases": "购买",
"revenueLabel": "收入",
"gifts": "礼物",
"regular": "普通",
"created": "已创建",
"successful": "成功",
"funnel": "漏斗",
"loadError": "加载统计失败",
"noPurchases": "无购买记录",
"paid": "已支付"
},
"purchases": {
"title": "购买记录",
"contact": "联系方式",
"recipient": "收件人",
"tariff": "套餐",
"period": "周期",
"days": "天",
"price": "价格",
"method": "方式",
"date": "日期",
"gift": "礼物",
"forSelf": "自用",
"allStatuses": "全部状态",
"status_pending": "待处理",
"status_paid": "已支付",
"status_delivered": "已交付",
"status_pending_activation": "待激活",
"status_failed": "失败",
"status_expired": "已过期",
"noPurchases": "无购买记录",
"showing": "显示第 {{from}}{{to}} 条,共 {{total}} 条",
"page": "第 {{current}} 页,共 {{total}} 页",
"prev": "上一页",
"next": "下一页"
}
},
"infoPages": {
"title": "信息页面",