Goals let you define specific user actions and measure how often visitors complete them. Each goal tracks a conversion rate against total sessions, giving you a clear picture of how effectively your site drives key outcomes.Documentation Index
Fetch the complete documentation index at: https://revlytics.co/docs/llms.txt
Use this file to discover all available pages before exploring further.
Goal types
Revlytics supports two types of goals:Page Goals
Track when a visitor reaches a specific URL path. Useful for measuring visits to signup pages, pricing pages, thank-you pages, etc.*matches a single path segment —/blog/*matches/blog/my-postbut not/blog/2024/my-post**matches across multiple segments —/docs/**matches/docs/api/v2/intro
Event Goals
Track when a custom event with a specific name is fired. Useful for measuring signups, purchases, button clicks, or any action you track withrevlytics.track().
Event goals require you to fire custom events using the JavaScript API or HTML attributes. See Custom Events for setup instructions.
Setting up goals
Step 1: Track the action
Before creating a goal, make sure the underlying action is being tracked. For page goals, no setup is needed — Revlytics automatically tracks all pageviews. For event goals, fire custom events using one of these methods:- JavaScript API
- HTML Attributes
Step 2: Create the goal in your dashboard
- Go to Dashboard → Goals
- Click Create Goal
- Choose a goal type (Page or Event)
- Enter the path pattern or event name
- Optionally add a friendly name (auto-generated if left blank)
Step 3: Monitor conversions
Each goal card displays:- Conversions — Number of unique sessions that completed the goal
- Conversion Rate — Conversions divided by total sessions, shown with a visual progress bar
HTML attribute tracking
Adddata-revlytics-event to any HTML element to track clicks as goal events:
Adding properties
Usedata-revlytics-prop-* attributes for additional data:
custom_event with:
DOM walking
The click handler walks up the DOM tree to find the nearest element withdata-revlytics-event. This means you can place the attribute on a container:
Priority
Elements withdata-revlytics-event are not tracked as regular button clicks. This prevents duplicate events — the goal event takes priority over auto button click tracking.
Example goals
| Goal Name | Type | Pattern | Use Case |
|---|---|---|---|
| Visit Pricing | Page | /pricing | Measure pricing page interest |
| Read Docs | Page | /docs/** | Track documentation engagement |
| Signup | Event | signup | Measure registration conversions |
| Purchase | Event | purchase_completed | Track revenue events |
| Newsletter | Event | newsletter_subscribe | Measure email list growth |
API reference
Goals can also be managed via the API:All API requests require authentication. You must be logged in and have access to the site.