Skip to content

Event Tracking

NOTE

Event tracking requires a PRO account.

What are Events?

Events allow you to track specific user interactions that occur on your website beyond standard page views. While page analytics tell you which pages users visit, events provide deeper insights into how users engage with your content and features.

Common use cases for events include:

  • Button clicks and link interactions
  • Form submissions
  • Video plays, pauses, and completions
  • File downloads
  • Newsletter signups
  • Feature usage
  • Custom conversion actions

Tracking Events

Cabin automatically records which page triggered each event, giving you context for user interactions. There are two ways to implement event tracking:

1. Using HTML Data Attributes

Add the data-cabin-event attribute to any HTML element:

html
<a href="menu.pdf" data-cabin-event="Download Menu">Download Menu</a>

HTML attributes are automatically converted to click events when the element is clicked.

2. Using JavaScript

For more complex interactions or custom triggers, use the JavaScript method:

js
cabin.event('Download Menu')

This approach gives you flexibility to trigger events based on any condition or user action.

Examples

Here are some common event tracking examples:

html
<!-- Track PDF downloads -->
<a href="report.pdf" data-cabin-event="Download Report">Download Annual Report</a>

<!-- Track video plays -->
<button data-cabin-event="Play Tutorial Video">Play Video</button>

<!-- Track form submissions -->
<form onsubmit="cabin.event('Newsletter Signup'); return true;">
    <!-- form fields -->
    <button type="submit">Subscribe</button>
</form>

Viewing Events in the Dashboard

Events are displayed in a dedicated list on your dashboard. Each event can be expanded to see which pages triggered the events. The dashboard shows click rates for both Unique Visitors and Total Visitors, allowing you to analyze both overall engagement and unique-visitor interaction patterns.

Events

Released under the MIT License.