data

Video Metrics

We believe privacy advocates are doing a great job by creating better website analytics tools. However, video services like YouTube and Vimeo are becoming increasingly privacy invasive. They are essentially Google Analytics on steroids. We think that if you want to understand how your videos are performing on your site, you don’t need to track your users. Instead, mave’s metrics tracks usage, providing valuable insights without compromising user privacy.

How It Works

Our metrics system runs on Elixir with Postgres and utilizes TimescaleDB. All video events are aggregated per session and sent over websockets. Each session is unique, as we don’t track users. Therefore, when a user refreshes, it is considered a new view.

For each video you watch (or start metrics on), we create a Phoenix Channel, which is represented as a session, combined with some normalized data about the browser and device (without being able to do a fingerprint). We capture play and pause events for each session. Disconnecting (meaning: closing the tab) will also cause a pause event on the server, which is why we use websockets.

Configuring Metrics

You can configure metrics in our components library:

<script crossorigin type="module">
  import {
    Player,
    setConfig,
  } from "//cdn.video-dns.com/npm/@maveio/components/+esm";

  setConfig({
    metrics: { enabled: true, socket: "wss://your_own_metrics_instance" },
  });
</script>

As you can see, you can also disable metrics completely for all mave elements in your site. By doing this, data doesn’t end up in mave.io - so this will remain empty, but you can start your own server and query what you want to see.

Available Data

Our metrics system provides several types of data:

Plays

Retrieve the number of plays and associated data using the video’s metadata. The data is grouped into time buckets using a specified interval, such as 1 day, within a given timeframe. A play is defined based on a minimum watch seconds threshold.

Watching

A simple request to determine how many people are currently watching a video in real-time.

Sources

Retrieve the number of plays per source. A source refers to the location where your video is placed, which can be particularly useful when embedding the same video across multiple pages/sites.

Engagement

Engagement is used to determine which portion of a video has been watched. This shows you which seconds of the video contain views, helping you understand which parts of your content are most engaging.

Self-Hosted Option

If you want complete control over your metrics data, you can run your own metrics server. Our metrics system is open source and available on GitHub.

For detailed instructions on setting up and configuring your own metrics server, see our Self-Hosted Metrics documentation.

Let us know if you have questions or are interested in running your own metrics server by reaching out to our support or chatting on our Discord.

🍪 Press 'Accept' to confirm that you accept we don't use cookies. Yes, this banner is just for show!
Accept