Track custom user actions (Goals)

Jolt allows you to track specific user actions beyond pageviews, known as Goal (signup, newsletter subscribe, checkout initiated, etc.). Tracking goals helps you:

  • Understand what users actually do
  • Improve revenue forecasts
  • Optimize for conversions

You can track goals in two ways:

1. Client-side tracking (simple)

Add a JavaScript snippet where the conversion occurs (e.g., on a "thank you" page after signup, when a user clicks a button, etc.).

window?.jolt.track("goal_name");

For HTML-only tracking, add data-jolt-event to an element and use data-jolt-event-[key] only for properties you intentionally want to send. Jolt does not read input values from forms.

Rules for goal_name:

  • Use lowercase letters.
  • Numbers, underscores (_), and spaces are allowed (spaces will be converted to underscores).
  • Limit the normalized event name to 64 characters.

2. Server-side tracking (most accurate)

Use the Node.js SDK for trusted actions such as completed payments, subscriptions, and generated reports. Follow the server-side event tracking guide to create a write key and send individual or batched events.

Documentation

Documentation