> ## Documentation Index
> Fetch the complete documentation index at: https://danswer-mintlify-deep-research-1773355783.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Analytics and usage monitoring in Onyx

<Info>
  **Enterprise Edition Feature**

  This feature requires an Enterprise plan. [View plans](/admins/billing/overview)
  or [contact sales](https://onyx.app/contact-sales) to learn more.
</Info>

Onyx provides comprehensive analytics to help you understand how your users are interacting with the system and monitor
usage patterns across your organization.

## Query History

On the Query History page, you can see a log of all messages sent to Onyx.
This includes messages sent to the Slack bot and through API keys.

<img className="rounded-image" src="https://mintcdn.com/danswer-mintlify-deep-research-1773355783/mwF-EX7U3MAkhK8q/assets/admins/analytics/query_history.png?fit=max&auto=format&n=mwF-EX7U3MAkhK8q&q=85&s=37cb5380327305bbcc7940ac293471a8" alt="Query History" width="5110" height="2154" data-path="assets/admins/analytics/query_history.png" />

### Exporting Query History

You can export your query history to a CSV file.
This export can be time consuming depending on the size of your query history.

## Usage Statistics

On the Usage Statistics page, you can see a summary graph of the active users and number of queries sent to Onyx.

Additionally, you view the thumbs up and thumbs down feedback your users are giving their AI answers.

<img className="rounded-image" src="https://mintcdn.com/danswer-mintlify-deep-research-1773355783/mwF-EX7U3MAkhK8q/assets/admins/analytics/usage_statistics.png?fit=max&auto=format&n=mwF-EX7U3MAkhK8q&q=85&s=de70cede0e0595c39fbf997f876cdbf3" alt="Usage Statistics" width="5110" height="1712" data-path="assets/admins/analytics/usage_statistics.png" />

## Custom Analytics

Onyx Enterprise Edition allows you to configure a custom analytics provider.

<Steps>
  <Step title="Set the CUSTOM_ANALYTICS_SECRET_KEY environment variable">
    Set the `CUSTOM_ANALYTICS_SECRET_KEY` environment variable to some random string.
    Make sure you have the value saved temporarily somewhere.

    Re-deploy Onyx.
  </Step>

  <Step title="Go to the Custom Analytics tab in the Admin Panel">
    Go to the Custom Analytics tab in the Admin Panel.
  </Step>

  <Step title="Enter in the Javascript snippet provided by your Analytics provider">
    This snippet would normally be placed within the `<head>` tags at the base of your project. For the Secret Key,
    use the value you saved in Step 1.

    <Note>
      The `<script>` tag MUST be removed before being copied into the text box.
    </Note>
  </Step>
</Steps>

For reference: [PostHog's documentation](https://posthog.com/docs/product-analytics/installation)
on how to set up a custom analytics provider.
