> ## Documentation Index
> Fetch the complete documentation index at: https://docs.engagefabric.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics & Insights

> Analyze gamification metrics with EngageFabric. View retention cohorts, engagement funnels, player activity trends, and export analytics data.

EngageFabric provides powerful analytics to help you understand player behavior, measure retention, and optimize your gamification strategy.

## Overview Metrics

The Analytics dashboard provides key metrics at a glance:

| Metric              | Description                                   |
| ------------------- | --------------------------------------------- |
| **Total Players**   | Total players in your project                 |
| **Active Players**  | Players active in the selected period         |
| **New Players**     | Players who joined in the selected period     |
| **Churned Players** | Previously active players who became inactive |

***

## Retention Analysis

Track how well you retain players over time with cohort analysis.

### Cohort Retention

Players are grouped by signup week/month, then tracked for return visits:

```
Week 0: 100% (signup week)
Week 1: 65% returned
Week 2: 45% returned
Week 3: 38% returned
```

### Viewing Options

* **Weekly cohorts**: Best for short-term retention
* **Monthly cohorts**: Best for long-term trends

<Tip>
  Aim for 40%+ Day 7 retention and 20%+ Day 30 retention for healthy engagement.
</Tip>

***

## Player Segments

Understand your player distribution by activity level:

| Segment               | Definition                             |
| --------------------- | -------------------------------------- |
| **Active Today**      | Players with activity in last 24 hours |
| **Active This Week**  | Players with activity in last 7 days   |
| **Active This Month** | Players with activity in last 30 days  |
| **Inactive**          | No activity in 30+ days                |

Use segments to:

* Identify at-risk players
* Target re-engagement campaigns
* Measure feature adoption

***

## Conversion Funnels

Track player progression through key milestones.

### Creating a Funnel

1. Navigate to **Analytics > Funnels**
2. Click **Create Funnel**
3. Define funnel steps (e.g., Signup → First Quest → Level 5)
4. Set the analysis period

### Funnel Metrics

* **Conversion Rate**: % completing each step
* **Drop-off Points**: Where players abandon
* **Time to Convert**: Average time between steps

<Note>
  Funnels help identify friction points in your player journey.
</Note>

***

## Trends & Charts

Visualize key metrics over time:

* **Player Growth**: New vs. churned players
* **XP Distribution**: XP granted over time
* **Quest Completion**: Quests completed per day
* **Event Volume**: Total events processed

***

## Data Export

Export analytics data for external analysis:

### Export Formats

| Format | Best For                     |
| ------ | ---------------------------- |
| CSV    | Spreadsheets, basic analysis |
| JSON   | Programmatic processing      |

### Export Options

1. Navigate to **Analytics**
2. Click **Export Data**
3. Select date range and format
4. Download the file

<Warning>
  Large exports may take several minutes to generate.
</Warning>

***

## API Access

Query analytics data programmatically:

### Overview Endpoint

```bash theme={null}
GET /api/v1/analytics/overview?projectId={id}&period=7d
```

Response:

```json theme={null}
{
  "period": {
    "start": "2025-01-14",
    "end": "2025-01-21",
    "days": 7
  },
  "overview": {
    "totalPlayers": 1250,
    "activePlayers": 890,
    "newPlayers": 145,
    "churnedPlayers": 23
  },
  "changes": {
    "totalPlayers": 12.5,
    "activePlayers": 8.2,
    "newPlayers": -5.1
  }
}
```

### Trends Endpoint

```bash theme={null}
GET /api/v1/analytics/trends?projectId={id}&days=30
```

### Segments Endpoint

```bash theme={null}
GET /api/v1/analytics/segments?projectId={id}
```

***

## Best Practices

<AccordionGroup>
  <Accordion title="Set retention benchmarks">
    Define target retention rates for Day 1, Day 7, and Day 30.
  </Accordion>

  <Accordion title="Monitor weekly">
    Review analytics weekly to spot trends early.
  </Accordion>

  <Accordion title="Act on insights">
    Use data to iterate on quests, rewards, and progression.
  </Accordion>

  <Accordion title="Segment your players">
    Different player types may need different engagement strategies.
  </Accordion>
</AccordionGroup>
