Goals

Track conversions and important events with simplified goal tracking.

Overview

Goals provide a simplified way to track conversions compared to the full metrics system. They're perfect for tracking specific events (like signups) or pageviews (like thank-you pages) with optional monetary values.

Goal Types

Event Goals

Track when a specific event occurs:

  • Signups
  • Purchases
  • Form submissions
  • Button clicks

Pageview Goals

Track when specific pages are viewed:

  • Thank you pages
  • Confirmation pages
  • Landing pages

Creating a Goal

Via UI

  1. Navigate to Goals in the sidebar
  2. Click Create Goal
  3. Enter a name and description
  4. Select goal type (Event or Pageview)
  5. Enter the target event name or page path
  6. Optionally set a monetary value per conversion
  7. Click Create Goal

Via API

POST /api/goals
{
  "projectId": "your-project-id",
  "name": "Sign Up Completed",
  "description": "User completes signup",
  "type": "event",
  "targetEvent": "signup_completed",
  "value": 10.00,
  "enabled": true
}

Goal Stats

For each goal, you can view:

  • Conversions: Number of times the goal was completed (30 days)
  • Total Value: Sum of monetary value from all conversions
  • Change %: Percentage change vs previous period
  • Previous Conversions: Conversions in the previous 30-day period

API Reference

List Goals

GET /api/goals?projectId={projectId}

Get Goal Stats

GET /api/goals/{goalId}/stats?days=30

Update Goal

PATCH /api/goals/{goalId}
{
  "enabled": false
}

Delete Goal

DELETE /api/goals/{goalId}

Best Practices

  • Use clear, descriptive names for goals
  • Set realistic monetary values for accurate ROI tracking
  • Monitor goals regularly to catch trends early
  • Disable goals you're no longer tracking instead of deleting them
  • Use event goals for user actions, pageview goals for destinations