{% extends 'base.html.twig' %}
{% block title %}Playground AI Dashboard - Admin{% endblock %}
{% block stylesheets %}
{{ parent() }}
{% endblock %}
{% block body %}
{% if stats.emergency_mode %}
⚠️
Emergency Mode Active
Daily budget exceeded. Starter tier users are temporarily restricted.
{% endif %}
${{ stats.budgets.daily.used|number_format(2) }}
of ${{ stats.budgets.daily.limit|number_format(2) }}
${{ stats.budgets.weekly.used|number_format(2) }}
of ${{ stats.budgets.weekly.limit|number_format(2) }}
${{ stats.budgets.monthly.used|number_format(2) }}
of ${{ stats.budgets.monthly.limit|number_format(2) }}
Overview
Usage Details
Engagement
🔍 Search CTR
Top Users
Trial Users
👥 All Users
Pricing & Tiers
💳 Manage Subscriptions
OCR
AI Detection
Welcome Email
💬 Welcome Chat
🔔 Notifications
📬 Follow Emails
⭐ CSAT
👎 Research Chat DSAT
Settings
Errors
📊 Overview
Usage
Engagement
Top Users
Trial
👥 Users
Pricing
💳 Subs
OCR
AI
Email
💬 Chat
🔍 CTR
🔔
⭐
👎 DSAT
📬
⚙️
⚠️
📧
📝
{{ stats.today.total_requests|default(0)|number_format }}
Requests Today
{{ ((stats.today.total_tokens|default(0)) / 1000)|number_format(1) }}K
Tokens Today
${{ stats.today.total_cost|default(0)|number_format(2) }}
Cost Today
{{ stats.today.unique_users|default(0)|number_format }}
Active Users Today
{{ (stats.today.avg_latency|default(0) / 1000)|number_format(2) }}s
Avg Latency
{{ stats.today.error_count|default(0)|number_format }}
Errors Today
${{ stats.mrr.total_mrr|default(0)|number_format(0) }}
Monthly Revenue (MRR)
{% set profit = (stats.mrr.total_mrr|default(0)) - (stats.month.total_cost|default(0)) %}
${{ profit|number_format(0) }}
Est. Monthly Profit
Usage Trend (Last 30 Days)
{{ stats.month.total_requests|default(0)|number_format }}
Requests This Month
{{ ((stats.month.total_tokens|default(0)) / 1000000)|number_format(2) }}M
Tokens This Month
${{ stats.month.total_cost|default(0)|number_format(2) }}
Cost This Month
{{ stats.month.unique_users|default(0)|number_format }}
Unique Users This Month
Operation
Count
Tokens
Cost
Avg Latency
{% for op in stats.by_operation %}
{{ op.operation_type }}
{{ op.count|number_format }}
{{ (op.tokens / 1000)|number_format(1) }}K
${{ op.cost|number_format(4) }}
{{ (op.avg_latency / 1000)|number_format(2) }}s
{% else %}
No data yet
{% endfor %}
Model
Requests
Input Tokens
Output Tokens
Cost
Avg Latency
{% for model in stats.by_model %}
{{ model.model_used }}
{{ model.count|number_format }}
{{ (model.tokens_input / 1000)|number_format(1) }}K
{{ (model.tokens_output / 1000)|number_format(1) }}K
${{ model.cost|number_format(4) }}
{{ (model.avg_latency / 1000)|number_format(2) }}s
{% else %}
No data yet
{% endfor %}
User
Email
Requests
Tokens
Cost
{% for user in stats.top_users %}
{{ user.username }}
{{ user.email }}
{{ user.request_count|number_format }}
{{ (user.total_tokens / 1000)|number_format(1) }}K
${{ user.total_cost|number_format(4) }}
{% else %}
No data yet
{% endfor %}
Tier
Users
Avg Credits Used
Total Credits Used
{% for tier in stats.subscription_stats %}
{{ tier.tier|capitalize }}
{{ tier.user_count|number_format }}
{{ tier.avg_used_credits|number_format(0) }}
{{ tier.total_used_credits|number_format }}
{% else %}
No subscriptions yet
{% endfor %}
{% set trial = stats.trial_stats %}
{{ trial.total_trials|default(0)|number_format }}
Total Trial Activations
{{ trial.active_trials|default(0)|number_format }}
Currently Active
{{ trial.expired_trials|default(0)|number_format }}
Expired
{{ trial.total_credits_used|default(0)|number_format }}
Total Credits Consumed
{{ trial.conversion_rate|default(0) }}%
Trial → Paid Conversion Rate
{{ trial.converted_users|default(0) }} out of {{ trial.total_trials|default(0) }} trial users upgraded to a paid plan
Avg credits used per trial: {{ trial.avg_credits_used|default(0)|number_format(1) }} / 100 |
Avg remaining: {{ trial.avg_credits_remaining|default(0)|number_format(1) }}
{{ trial.avg_credits_used|default(0)|number_format(1) }}
Avg Credits Used (of 100)
${{ (trial.total_credits_used|default(0) * 0.003)|number_format(2) }}
Est. Total Trial Cost
{{ trial.conversion_rate|default(0) }}%
Conversion Rate
📈 Trial Activations (Last 30 Days)
User
Email
Status
Credits Used
Usage
Requests
Cost
Activated
Expires
Last Active
Loading trial users...
Operation
Count
Tokens
Cost
Loading...
Subscriber Health Score
% of active subscribers who are Engaged or Power users
💤
—
Dormant
Signed up 24 h+ ago, zero usage
⚠️
—
At Risk
< 10 % credits used or 7+ days inactive
✅
—
Engaged
10–60 % credits used, active in 7 days
🚀
—
Power Users
> 60 % credits used, active in 3 days
📧
Welcome email sequence — Send a "Getting Started" guide with sample operations 24 h after sign-up if usage is still zero. This is the #1 lever for dormant users.
🎁
Bonus credits nudge — Award 20 bonus credits to dormant users with a personal message: "We noticed you haven't tried the playground yet — here are 20 extra credits on us!"
🔔
In-app prompt — Show a dismissible "Try it now" tooltip on the playground page for users with zero usage, highlighting the easiest operation (Ask AI).
📊
Weekly digest — Send at-risk users a usage report: "You used 5 of 500 credits this month. Here's what others are doing…" — social proof drives activation.
⏰
Expiry reminder — For trial users, send a "3 days left" reminder with their unused credit count to create urgency.
User
Tier
Risk
Credits Used
Utilization
Requests
Operations
Days Since Signup
Days Inactive
Last Activity
Loading engagement data...
Tier
Total
💤 Dormant
⚠️ At Risk
✅ Engaged
🚀 Power
Loading...
Loading...
📧 Template Editor
Available Placeholders
{{ '{{firstName}}' }}
{{ '{{lastName}}' }}
{{ '{{playgroundUrl}}' }}
Subject Line
Email Body (Visual Editor)
Save Template
Preview
👁️ Live Preview
📊 Email Engagement Analytics
Last 7 days
Last 30 days
Last 90 days
Last year
📬 Recent Sends
Recipient
User
Sent
Opened
Opens
Clicks
Status
Loading...
{% for tier in tier_configs %}
{{ tier.display_name }}
${{ tier.price_monthly_usd|number_format(0) }} /mo
{{ tier.monthly_credits|default(0)|number_format }} credits/month
{{ tier.daily_request_limit|default(50) }} requests/day
{{ tier.max_storage_mb|default(100) }} MB storage
{{ tier.max_projects|default(5) == -1 ? 'Unlimited' : tier.max_projects|default(5) }} projects
{% if tier.features is defined and tier.features %}
{% set features = tier.features is iterable ? tier.features : {} %}
{% if features.export_docx is defined and features.export_docx %}
DOCX Export
{% endif %}
{% if features.priority_support is defined and features.priority_support %}
Priority Support
{% endif %}
{% endif %}
{% endfor %}
💰 Profitability Analysis
Tier
Price
Credits
Est. Azure Cost*
Gross Margin
{% for tier in tier_configs %}
{% set est_cost = tier.monthly_credits * 0.003 %}
{% set margin = tier.price_monthly_usd - est_cost %}
{% set margin_pct = tier.price_monthly_usd > 0 ? (margin / tier.price_monthly_usd * 100) : 0 %}
{{ tier.display_name }}
${{ tier.price_monthly_usd|number_format(2) }}
{{ tier.monthly_credits|number_format }}
${{ est_cost|number_format(2) }}
${{ margin|number_format(2) }} ({{ margin_pct|number_format(0) }}%)
{% endfor %}
* Estimated cost assumes average 1.5 credits = 1 API call, using GPT-4o-mini pricing ($0.002/call avg)
📧 Test Subscription Email
Send test email to
Preview tier
Starter
Researcher
Professional
Institution
Send Test Email
Loading subscriptions...
User
Tier
Credits
Status
Valid Until
Actions
Loading AI Detection analytics...
7d
14d
30d
90d
📈 User Engagement (Daily)
User
Detections
Tokens
Cost
Last Detection
Loading...
💬 Customer Feedback (CSAT)
NPS Breakdown:
● Promoters (9-10): 0
● Passives (7-8): 0
● Detractors (1-6): 0
User
Rating
NPS
Comment
Date
Loading...
⚙️ Feature Settings
Toggle feature access for non-subscribed logged-in users. Subscribed users always have access.
Loading user statistics...
📈 Registration Trend (12 months)
🎮 Playground Subscription Tiers
📊 Profile Completion
↻ Refresh
Loading profile data...
👥 Users with >50% Profile (0 )
← Prev
Page 1
Next →
User
Score
Tier
Joined
Last Login
Profile
ID
Username
Email
Name
Country
Locale
Verified
Registered
Last Login
🔍 Search CTR Analytics
Last 7 days
Last 30 days
Last 90 days
↻ Refresh
Daily Search & Click Trend
Click Position Distribution
Top Queries
Without Clicks
Zero Results
Top Search Queries
#
Query
Searches
Avg Results
Clicks
CTR
Queries Without Any Clicks
#
Query
Searches
Avg Results
Last Searched
Load More
Queries With Zero Results
#
Query
Searches
Last Searched
Loading notification stats...
-
Users With Notifications
-
Push Devices (Firebase)
Notification Coverage
Users who received notifications
Notifications Per Day (Last 30 Days)
Top 10 Users by Notifications
#
User
Total
Seen
Clicked
Last Notification
Recent Notifications (Last 20)
User
Message
Seen
Clicked
Time
⭐ CSAT Feedback Dashboard
Period:
Last 7 days
Last 30 days
Last 90 days
Context:
All
Search
Rephrase
Proofread
Write with AI
Criticize
Ask AI
Translate
Summarize
Citation
Tashkeel
Keywords
OCR
AI Detection
ChatBot
Refresh
CSAT by Feature
Context
Responses
Avg Rating
CSAT %
CSAT Trend
Search CSAT vs Results Count
Result Bucket
Responses
Avg Rating
CSAT %
Recent Feedback
User
Context
Rating
Comment
Date
⚠ Low-Rated Feedback (1-2 stars)
User
Context
Rating
Comment
Date
👎 Research Chat Feedback (DSAT)
Period:
Last 7 days
Last 30 days
Last 90 days
Refresh
Feedback Trend
Like/Dislike Distribution
👎 Disliked Responses
User
Question
Comment
Date
Recent All Feedback
User
Question
Feedback
Comment
Date
📬 Follow Email Notifications
Last 7 days
Last 30 days
Last 90 days
Last year
↻ Refresh
🏆 Top Recipients
User
Emails
Opened
Clicked
🕒 Hourly Distribution (Sends)
📋 Recent Emails (Last 50)
Recipient
Follower
📬 Opened
🖱️ Clicked
Sent At
New users will receive a personalized chat message after registration.
Use {{ '{{' }}firstName}} as placeholder for the user's first name.
🇸🇦 رسالة الترحيب (العربية)
🇺🇸 Welcome Message (English)
{% endblock %}