Skip to main content

Overview

GatePass provides a powerful analytics dashboard for event organizers to track sales performance, attendee demographics, check-in patterns, and revenue metrics in real-time.

Accessing Analytics

Navigate to the analytics dashboard:
API Endpoint
GET /api/analytics/organizer/stats      # Overall organizer stats
GET /api/analytics/:eventId             # Specific event analytics
Access analytics from your organizer dashboard:
  1. Click Analytics in the main navigation
  2. Select an event from the dropdown
  3. Choose a time range (24h, 7d, 30d, 90d)
  4. Explore different analytics tabs

Key Metrics

Revenue Metrics

totalRevenue
float
required
Total revenue generated from ticket sales (including platform fees)
ticketsSold
integer
required
Total number of tickets sold across all tiers
averageOrderValue
float
Average revenue per order (totalRevenue / number of orders)
revenueGrowth
float
Percentage growth compared to previous period

Example Response

Analytics Response
{
  "totalRevenue": 4500000.00,
  "ticketsSold": 487,
  "totalTickets": 550,
  "salesByDay": [
    { "date": "2026-03-01", "sales": 45 },
    { "date": "2026-03-02", "sales": 67 },
    { "date": "2026-03-03", "sales": 89 }
  ],
  "salesByTier": [
    { "name": "Early Bird", "sold": 100, "total": 100 },
    { "name": "General Admission", "sold": 337, "total": 400 },
    { "name": "VIP Pass", "sold": 50, "total": 50 }
  ],
  "attendance": {
    "checkIns": 412,
    "noShows": 75,
    "checkInRate": 84.6,
    "hourlyBreakdown": [
      { "hour": "09:00", "checkIns": 45 },
      { "hour": "10:00", "checkIns": 89 },
      { "hour": "11:00", "checkIns": 123 }
    ],
    "peakHours": [
      { "hour": "11:00", "count": 123 },
      { "hour": "10:00", "count": 89 }
    ]
  },
  "geography": {
    "cities": [
      { "city": "Lagos", "count": 287, "percentage": 58.9 },
      { "city": "Abuja", "count": 103, "percentage": 21.1 },
      { "city": "Ibadan", "count": 45, "percentage": 9.2 }
    ],
    "countries": [
      { "country": "Nigeria", "count": 452, "percentage": 92.8 },
      { "country": "Ghana", "count": 25, "percentage": 5.1 },
      { "country": "Kenya", "count": 10, "percentage": 2.1 }
    ]
  }
}

Analytics Tabs

Sales Analytics

Track ticket sales performance:
Visualizations:
  • Area chart showing daily ticket sales
  • Line chart for revenue trends
  • Cumulative sales progress
Insights:
  • Identify peak sales periods
  • Track early bird effectiveness
  • Monitor sales velocity
Visualizations:
  • Pie chart of sales by tier
  • Bar chart comparing tier performance
Metrics:
  • Sold vs. available per tier
  • Revenue contribution by tier
  • Popular tier identification
Tier Performance
{
  "name": "VIP Pass",
  "sold": 50,
  "total": 50,
  "revenue": 1250000,  // 50 × ₦25,000
  "percentageSold": 100,
  "revenueContribution": 27.8
}
Breakdown:
  • Crypto vs. Fiat payment distribution
  • Payment gateway performance (Paystack, Flutterwave, M-Pesa)
  • Currency distribution (NGN, GHS, KES, etc.)
Example:
Payment Distribution
{
  "cryptocurrency": 35.2,  // 35.2% of payments
  "creditCard": 64.8,      // 64.8% via fiat
  "gateways": {
    "paystack": 342,
    "flutterwave": 89,
    "mpesa": 12
  }
}

Attendance Analytics

Monitor event check-ins and attendance patterns:
Hourly Breakdown:
  • Bar chart showing check-ins by hour
  • Identify rush hours and bottlenecks
  • Optimize staff allocation
Hourly Check-Ins
{
  "hourlyBreakdown": [
    { "hour": "09:00", "checkIns": 45 },
    { "hour": "10:00", "checkIns": 89 },
    { "hour": "11:00", "checkIns": 123 },  // Peak hour
    { "hour": "12:00", "checkIns": 98 },
    { "hour": "13:00", "checkIns": 57 }
  ]
}
Key Metrics:
  • Total checked in vs. tickets sold
  • No-show rate
  • Check-in rate percentage
Calculations:
Attendance Metrics
const checkIns = 412;
const ticketsSold = 487;
const noShows = ticketsSold - checkIns; // 75
const checkInRate = (checkIns / ticketsSold) * 100; // 84.6%
Top Check-In Hours:
  • Ranked list of busiest hours
  • People count per time slot
  • Helps plan future events
Peak Hours
[
  { "hour": "11:00", "count": 123 },
  { "hour": "10:00", "count": 89 },
  { "hour": "12:00", "count": 98 },
  { "hour": "09:00", "count": 45 }
]

Geographic Analytics

Understand where your attendees come from:
Metrics:
  • City-wise attendee distribution
  • Percentage breakdown
  • Count of attendees per city
City Distribution
{
  "cities": [
    {
      "city": "Lagos",
      "count": 287,
      "percentage": 58.9
    },
    {
      "city": "Abuja",
      "count": 103,
      "percentage": 21.1
    },
    {
      "city": "Ibadan",
      "count": 45,
      "percentage": 9.2
    },
    {
      "city": "Port Harcourt",
      "count": 32,
      "percentage": 6.6
    }
  ]
}
Geographic data is extracted from billing addresses and user profiles.
Country Distribution:
  • Primary vs. international audience
  • Country-wise breakdown with percentages
Country Stats
{
  "countries": [
    { "country": "Nigeria", "count": 452, "percentage": 92.8 },
    { "country": "Ghana", "count": 25, "percentage": 5.1 },
    { "country": "Kenya", "count": 10, "percentage": 2.1 }
  ]
}

Real-Time Analytics

Monitor live event activity:
Recent Transactions:
  • Real-time ticket purchases
  • Check-in notifications
  • Payment confirmations
Display Format:
Live Activity
interface Transaction {
  id: string;
  type: 'crypto' | 'fiat';
  buyer: string;
  amount: number;
  tickets: number;
  timestamp: string;
}
Live Metrics:
  • Active browsing sessions
  • Tickets in cart (pending checkout)
  • Pending payments
  • Sales in last hour
  • Revenue in last hour
Real-Time Stats
{
  "activeSessions": 47,
  "ticketsInCart": 23,
  "pendingPayments": 8,
  "salesLastHour": 12,
  "revenueLastHour": 96000
}
Gateway Status:
  • Paystack: Configured ✅
  • Flutterwave: Configured ✅
  • M-Pesa: Not configured ⚠️
  • Stripe: Not configured ⚠️
Gateway Health
{
  "gateways": {
    "paystack": { "configured": true, "status": "operational" },
    "flutterwave": { "configured": true, "status": "operational" },
    "mpesa": { "configured": false, "status": "unavailable" },
    "stripe": { "configured": false, "status": "unavailable" }
  }
}

EventAnalytics Model

Analytics data is stored in the database:
EventAnalytics Schema
model EventAnalytics {
  id        String   @id @default(cuid())
  date      DateTime @default(now())
  
  // Sales metrics
  ticketsSold    Int @default(0)
  revenue        Float @default(0)
  uniqueBuyers   Int @default(0)
  
  // Check-in metrics
  checkIns       Int @default(0)
  checkInRate    Float @default(0)  // Percentage
  noShows        Int @default(0)
  
  // Geographic data (JSON strings)
  topCountries   String?  // [{country: "NG", count: 10}, ...]
  topCities      String?  // [{city: "Lagos", count: 5}, ...]
  
  // Time-based data
  hourlyBreakdown String? // Check-in patterns by hour

  // Relations
  event   Event  @relation(fields: [eventId], references: [id])
  eventId String

  @@unique([eventId, date])
  @@map("event_analytics")
}

API Routes

Organizer Stats

Get overall statistics across all events:
curl https://api.gatepass.com/analytics/organizer/stats \
  -H "Authorization: Bearer YOUR_TOKEN"
Response:
Organizer Stats
{
  "totalRevenue": 12500000,
  "ticketsSold": 1847,
  "activeEvents": 3,
  "totalEvents": 8,
  "revenueGrowth": 23.5,
  "ticketsGrowth": 18.2,
  "recentSales": [
    {
      "id": "order_001",
      "buyer": "[email protected]",
      "amount": 16000,
      "tickets": 2,
      "timestamp": "2026-03-06T14:23:45.000Z",
      "eventName": "Tech Conference 2024"
    }
  ]
}

Event-Specific Analytics

Get detailed analytics for a specific event:
Get Event Analytics
curl https://api.gatepass.com/analytics/clxyz123abc \
  -H "Authorization: Bearer YOUR_TOKEN"
Returns the comprehensive analytics object shown earlier in this guide.

Exporting Data

CSV Export

Export analytics as CSV for further analysis:
Export CSV
function exportAnalytics() {
  const rows = [
    ['metric', 'value'],
    ['totalRevenue', totalRevenue],
    ['ticketsSold', ticketsSold],
    ['checkInRate', checkInRate]
  ];
  
  // Add daily sales
  salesByDay.forEach(point => {
    rows.push([`salesByDay_${point.date}`, point.sales]);
  });
  
  const csv = rows.map(r => r.join(',')).join('\n');
  
  // Download
  const blob = new Blob([csv], { type: 'text/csv' });
  const url = URL.createObjectURL(blob);
  const a = document.createElement('a');
  a.href = url;
  a.download = 'gatepass_analytics.csv';
  a.click();
}

JSON Export

Download raw JSON data:
Export JSON
const data = await fetch(`/api/analytics/${eventId}`).then(r => r.json());
const blob = new Blob([JSON.stringify(data, null, 2)], {
  type: 'application/json'
});
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'analytics.json';
a.click();

Visualizations

The dashboard uses Recharts for data visualization:

Sales Chart (Area)

Sales Area Chart
<ResponsiveContainer width="100%" height={300}>
  <AreaChart data={salesByDay}>
    <CartesianGrid strokeDasharray="3 3" />
    <XAxis dataKey="date" />
    <YAxis />
    <Tooltip />
    <Area 
      type="monotone" 
      dataKey="sales" 
      stroke="#7C3AED" 
      fill="#7C3AED" 
      fillOpacity={0.6} 
    />
  </AreaChart>
</ResponsiveContainer>

Tier Distribution (Pie)

Pie Chart
<PieChart>
  <Pie
    data={salesByTier}
    cx="50%"
    cy="50%"
    outerRadius={80}
    fill="#A78BFA"
    dataKey="sold"
    label={({ name, percent }) => `${name} ${Math.round(percent * 100)}%`}
  >
    {salesByTier.map((entry, index) => (
      <Cell key={`cell-${index}`} fill={COLORS[index % COLORS.length]} />
    ))}
  </Pie>
</PieChart>

Check-In Pattern (Bar)

Bar Chart
<BarChart data={attendance.hourlyBreakdown}>
  <CartesianGrid strokeDasharray="3 3" />
  <XAxis dataKey="hour" />
  <YAxis />
  <Tooltip />
  <Bar dataKey="checkIns" fill="#5B21B6" />
</BarChart>

Brand Colors

Use these colors in custom analytics visualizations:
GatePass Brand Colors
--primary: #7C3AED;    /* Purple */
--secondary: #A78BFA;  /* Light Purple */
--accent: #5B21B6;     /* Dark Purple */
--success: #10B981;    /* Green */
--warning: #F59E0B;    /* Orange */
--error: #EF4444;      /* Red */

Best Practices

Regular Monitoring

Check analytics daily during sale periods to identify and address issues quickly.

Trend Analysis

Compare analytics across events to identify successful strategies.

Data-Driven Decisions

Use tier performance data to optimize pricing for future events.

Export Regularly

Export analytics data for long-term record keeping and reporting.

Troubleshooting

Analytics refresh every 5 minutes. To force a refresh:
  • Click the Refresh button
  • Clear browser cache
  • Check if there are recent orders/check-ins
Geographic data requires:
  • Billing address during fiat payments
  • User profile location (optional)
Crypto purchases may lack geographic info unless user profile is complete.
Common reasons:
  • Event hasn’t happened yet (0% check-in rate)
  • Some attendees haven’t arrived
  • Technical issues at check-in (verify scanner working)

Next Steps

Creating Events

Create your next event using insights from analytics

Check-In Management

Learn how to efficiently check in attendees

Build docs developers (and LLMs) love