@model LittleShop.DTOs.BotMetricsSummaryDto @{ ViewData["Title"] = $"Bot Metrics - {Model.BotName}"; var bot = ViewData["Bot"] as LittleShop.DTOs.BotDto; var sessionSummary = ViewData["SessionSummary"] as LittleShop.DTOs.BotSessionSummaryDto; var startDate = (DateTime)ViewData["StartDate"]!; var endDate = (DateTime)ViewData["EndDate"]!; }

Bot Metrics

@Model.BotName

@Model.TotalSessions

Total Sessions

@Model.TotalOrders

Total Orders

$@Model.TotalRevenue.ToString("F2")

Total Revenue

@Model.TotalMessages

Total Messages

Performance Metrics
Average Response Time:
@Model.AverageResponseTime.ToString("F2") ms
Uptime Percentage:
@if (Model.UptimePercentage > 0) { @Model.UptimePercentage.ToString("F1")% } else { N/A }
Total Errors:
@if (Model.TotalErrors > 0) { @Model.TotalErrors } else { 0 }
Unique Sessions:
@Model.UniqueSessions
Session Statistics
@if (sessionSummary != null) {
Active Sessions:
@sessionSummary.ActiveSessions
Completed Sessions:
@sessionSummary.CompletedSessions
Avg Session Duration:
@sessionSummary.AverageSessionDuration.ToString("F1") min
Avg Orders/Session:
@sessionSummary.AverageOrdersPerSession.ToString("F2")
Avg Spend/Session:
$@sessionSummary.AverageSpendPerSession.ToString("F2")
} else {

No session data available

}
@if (Model.MetricsByType.Any()) {
Metrics by Type
@foreach (var metric in Model.MetricsByType.OrderByDescending(m => m.Value)) { }
Metric Type Total Value
@metric.Key @metric.Value.ToString("F0")
} @if (sessionSummary != null) {
@if (sessionSummary.SessionsByPlatform.Any()) {
Sessions by Platform
    @foreach (var platform in sessionSummary.SessionsByPlatform) {
  • @platform.Key: @platform.Value
  • }
} @if (sessionSummary.SessionsByCountry.Any()) {
Sessions by Country
    @foreach (var country in sessionSummary.SessionsByCountry.Take(5)) {
  • @country.Key: @country.Value
  • }
} @if (sessionSummary.SessionsByLanguage.Any()) {
Sessions by Language
    @foreach (var language in sessionSummary.SessionsByLanguage) {
  • @language.Key: @language.Value
  • }
}
} @if (Model.TimeSeries.Any()) {
Activity Timeline
}
Back to Details Back to List
@section Scripts { @if (Model.TimeSeries.Any()) { } }