Skip to main content
The Goal Report helps you track specific conversion events and measure how many visitors complete desired actions. This is essential for measuring the success of your website and marketing campaigns.

What is a Goal Report?

A goal represents a single, specific action you want users to complete, such as:
  • Viewing a thank-you page
  • Submitting a form
  • Clicking a button
  • Completing a purchase
The Goal Report shows you:
  • How many visitors completed the goal
  • Total visitors to your site
  • Goal conversion rate

Key Metrics

Goal Completions

Number of unique visitors who completed the goal

Total Visitors

Total number of unique visitors in the time period

Conversion Rate

Percentage of visitors who completed the goal

Goal Value

Optional: monetary value associated with goal completions

Goal Types

Umami supports two types of goals:
Track when visitors view a specific page. This is useful for:
  • Thank you pages after form submissions
  • Confirmation pages after purchases
  • Downloaded content pages
  • Key destination pages
Example: Track newsletter signups
{
  "type": "path",
  "value": "/newsletter/thank-you",
  "startDate": "2024-01-01",
  "endDate": "2024-01-31"
}
Page view goals are the simplest to set up and work automatically once your Umami tracking is installed.

Setting Up Goals

1

Identify Your Goal

Decide what action represents a conversion for your business. This could be a page view (e.g., /thank-you) or a custom event (e.g., purchase_complete).
2

Choose Goal Type

Determine whether to track a page view or custom event based on your implementation.
3

Configure the Goal

Set up the goal in your reporting system with the appropriate type and value.
4

Add Tracking (if needed)

For custom events, add umami.track() calls to your website code.
5

Verify

Test that the goal is being tracked correctly by completing the action yourself.

Understanding Goal Results

Conversion Rate Calculation

The conversion rate is calculated as:
Conversion Rate = (Goal Completions / Total Visitors) × 100
Example:
  • Total Visitors: 10,000
  • Goal Completions: 250
  • Conversion Rate: 2.5%
Goal completions are counted per unique session. If the same user completes the goal multiple times, it’s only counted once.

Common Goal Examples

Track purchase completions and revenue:Purchase Completion:
  • Type: Page view
  • Value: /checkout/thank-you
Add to Cart:
  • Type: Custom event
  • Value: add_to_cart
Product View:
  • Type: Page view
  • Value: /products/* (with wildcard)
Track form submissions and lead capture:Contact Form Submission:
  • Type: Custom event
  • Value: contact_submit
Demo Request:
  • Type: Page view
  • Value: /demo/scheduled
Whitepaper Download:
  • Type: Custom event
  • Value: whitepaper_download
Track signups and product usage:Free Trial Signup:
  • Type: Page view
  • Value: /signup/success
Onboarding Completion:
  • Type: Custom event
  • Value: onboarding_complete
Feature Usage:
  • Type: Custom event
  • Value: feature_export_used
Track engagement with content:Newsletter Subscription:
  • Type: Custom event
  • Value: newsletter_subscribe
Article Read Completion:
  • Type: Custom event
  • Value: article_read_complete
Video Watch:
  • Type: Custom event
  • Value: video_watched

Use Cases and Insights

Track Campaign Performance

Use goals to measure the effectiveness of marketing campaigns.Workflow:
  1. Set up a goal for your conversion event
  2. Add UTM parameters to campaign links
  3. Filter goal report by UTM parameters
  4. Compare conversion rates across campaigns
Example:
{
  "type": "path",
  "value": "/signup/success",
  "filters": {
    "utm_campaign": "spring_sale_2024"
  }
}
Combine Goal Reports with Attribution Reports to see which traffic sources drive the best conversion rates.

API Usage

curl -X POST https://your-umami-instance.com/api/reports/goal \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "websiteId": "your-website-id",
    "parameters": {
      "startDate": "2024-01-01T00:00:00Z",
      "endDate": "2024-01-31T23:59:59Z",
      "type": "path",
      "value": "/thank-you"
    },
    "filters": {
      "country": "US"
    }
  }'

Response Format

{
  "num": 250,
  "total": 10000
}
Calculate conversion rate:
const conversionRate = (response.num / response.total) * 100;
// 2.5%

Tracking Custom Events

To use custom event goals, add tracking to your website:

Basic Event Tracking

// Track a simple event
umami.track('button_click');

// Track event with properties
umami.track('purchase', { 
  value: 99.99, 
  currency: 'USD',
  product: 'Premium Plan' 
});

React Example

import { useEffect } from 'react';

function SignupButton() {
  const handleClick = () => {
    // Track the goal
    if (window.umami) {
      umami.track('signup_click');
    }
    
    // Your signup logic
    handleSignup();
  };
  
  return (
    <button onClick={handleClick}>
      Sign Up
    </button>
  );
}

Form Submission Example

const form = document.querySelector('#contact-form');

form.addEventListener('submit', (e) => {
  // Track goal completion
  umami.track('contact_form_submit');
  
  // Form submission continues...
});

Best Practices

Keep Goals Simple

Track one clear action per goal. Don’t combine multiple actions.

Use Meaningful Names

Name events clearly (e.g., ‘newsletter_subscribe’ not ‘event1’)

Set Benchmarks

Establish baseline conversion rates to measure improvements

Monitor Regularly

Check goal conversion rates weekly to catch issues early
Create multiple goals to track different stages of your conversion funnel, not just the final conversion.

Troubleshooting

Possible causes:
  • Goal type or value doesn’t match actual events
  • Tracking code not properly installed
  • Ad blockers preventing tracking
How to fix:
  1. Verify the page path or event name exactly matches
  2. Test the goal action yourself and check browser console
  3. Ensure Umami tracking script is loaded
Check:
  • Date range is correct
  • Filters aren’t excluding/including unexpected traffic
  • Goal isn’t being triggered multiple times per session
Verify: Compare with other analytics tools if available

Next Steps

Funnel Analysis

Track multi-step conversion processes with Funnel Reports

Attribution

See which traffic sources drive goal completions

Build docs developers (and LLMs) love