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

# Metrics

> Learn how to model user interactions using Trophy Metrics. Model any user interaction and trigger automated gamification flows with just a few lines of code.

<h2 id="what-are-metrics">
  What are Metrics?
</h2>

All gamification features are centered around user interactions. At Trophy, we use the term **Metrics** to refer to the data objects that model those interactions within your web or mobile app.

Metrics are un-opinionated, meaning they can be used to model absolutely any user interaction you can think of. Examples could include:

* Followers, likes or posts
* Tasks completed
* Miles ran
* Lessons completed
* Words written
* ...

Metrics are the building blocks of the infrastructure that powers Trophy's gamification features. Each user interaction that relates to a metric is stored as an [Event](/features/events).

Events are stored and processed in chronological order. At any particular point in time, the combined state of a user's event history reflects their overall progress on your platform.

<h2 id="key-attributes">
  Key Attributes
</h2>

Here we describe the key attributes that allow you to create metrics to best fit your use case.

<h3 id="units">
  Units
</h3>

You can easily assign units to metrics in the dashboard for either:

* Arbitrary numbers (tasks, posts, messages etc.)
* Currencies (\$, £, €)

<h2 id="creating-metrics">
  Creating Metrics
</h2>

To create a Metric, head over to the [Metrics](https://app.trophy.so/metrics) page within Trophy and hit the **New Metric** button:

<Frame>
  <video autoPlay muted loop playsInline className="w-full aspect-video" src="https://mintcdn.com/trophy/rGjOHIeZYrVU9hOo/assets/features/metrics/create_new_metric.mp4?fit=max&auto=format&n=rGjOHIeZYrVU9hOo&q=85&s=dca1fdce56e526e270e90746ac3cfb4f" data-path="assets/features/metrics/create_new_metric.mp4" />
</Frame>

<Steps>
  <Step title="Enter a name">
    Choose a name for the metric.
  </Step>

  <Step title="Hit save">
    Save the new metric.
  </Step>

  <Step title="Configure settings">
    Configure additional settings like metric units or currency if applicable on the metric configure page.
  </Step>
</Steps>

<h2 id="metric-analytics">
  Metric Analytics
</h2>

Trophy has a built-in analytics dashboard for each metric you create. It shows you:

* The total value of all tracked events against the metric
* The number of users actively making progress against the metric
* The metric's [Achievement Completion Chart](#achievement-completion-chart)

<Frame>
  <img height="200" noZoom src="https://mintcdn.com/trophy/rGjOHIeZYrVU9hOo/assets/features/metrics/metric_analytics.png?fit=max&auto=format&n=rGjOHIeZYrVU9hOo&q=85&s=92edeb77c958a8a77dd11506a9d0be86" data-path="assets/features/metrics/metric_analytics.png" />
</Frame>

<h3 id="achievement-completion-chart">
  Achievement Completion Chart
</h3>

The achievement completion chart shows the current state of the userbase in terms of the number of users who have completed each achievement that you've configured against this metric.

[Learn more about achievements](/features/achievements).

<Frame>
  <img height="200" noZoom src="https://mintcdn.com/trophy/rGjOHIeZYrVU9hOo/assets/features/metrics/achievement_completions.png?fit=max&auto=format&n=rGjOHIeZYrVU9hOo&q=85&s=29113a61395c95f09bb8d6755caff17a" data-path="assets/features/metrics/achievement_completions.png" />
</Frame>

<h2 id="frequently-asked-questions">
  Frequently Asked Questions
</h2>

<AccordionGroup>
  <Accordion title="How many metrics can I create?">
    As many as you want!
  </Accordion>

  <Accordion title="Can Trophy control my UI when events are tracked?">
    No, metrics are purely server-side and only support the business logic around achievements, streaks and other workflows like sending emails.

    They don't control any in-app UI, but our APIs provide all the data you need to build whatever UI you want.
  </Accordion>
</AccordionGroup>

<h2 id="get-support">
  Get Support
</h2>

Want to get in touch with the Trophy team? Reach out to us via [email](mailto:support@trophy.so). We're here to help!
