Docs
Events

Events

Events are a crucial component of any analytics tool, as they allow you to measure the success of your website against specific objectives. Statsy's Events feature enables you to set up and track the performance of various user interactions, ensuring that your site is effectively meeting your targets. In this guide, we will discuss the different types of events, how to add and label them, and the process of tracking event performance.

Events Panel
Events Panel

Common Events

Each type of business need to measure a bit different things. If you are into B2B service business, you probably have a Contact Form on your website.

We give you a few example events below, but you can whatever event you need.

B2B Services

  • Form Submission
  • Newsletter sign up
  • Call to Action clicks
  • PDF Downloads

SaaS

  • Sign up
  • Trial sign up
  • Trial conversion
  • Newsletter sign up
  • Enterprise contact form submission
  • Blog or docs page views

Ecommerce

  • Add to cart
  • Checkout
  • Purchase
  • Sign up
  • Newsletter sign up
  • Blog or product page views

Goal Types

There are two primary types of events you can create in Statsy:

Custom Event

Custom events allow you to track specific user actions on your website, such as form submissions, button clicks, or downloads. You can define custom events based on your site's unique requirements and objectives.

Pathname Event

Pathname Event events enable you to track user visits to specific pages or paths within your website. This type of event is particularly useful for monitoring conversions, such as completed sign-ups or successful checkouts.

Adding a Goal

To add a event in Statsy, follow these simple steps:

  • Navigate to the "Analytics" tab in your Statsy dashboard.
  • Scroll down to the Events panel and click on the "Add Goal" button.
  • Choose the desired event type (Custom Event or Pathname Event).
  • Enter the required information for your event, such as the event name, target URL, or other relevant details.
  • Click "Save" to create your event.

Tracking Goal

Custom Events

To track Custom Events, you need to add the following JavaScript snippet to the corresponding user action on your website:

statsy(`${eventId}`);

Pathname Event Events

For Pathname Event events, no additional steps are required. Statsy will automatically track visits to the specified URL or path.

Adding Labels

Labels are an optional feature that helps you categorize and organize your events. Labels can be added only to Custom Events. To add a label to a event, follow these steps:

statsy(`${eventId}`, { label: "Form submitted" });

Replace ${eventId} with the event ID you picked when you created the event.