Goals & Conversions
Track important user actions on your website with goals. Goals help you measure conversions, signups, purchases, and any other meaningful interactions.
Tracking Goals
Use the pipetrace.goal() method to track goal completions:
// Track a simple goal
pipetrace.goal('signup')
// Track a goal with a monetary value
pipetrace.goal('purchase', 99.99)
// Track a goal with custom properties
pipetrace.goal('subscription', 29.99, {
plan: 'pro',
billing: 'monthly'
})Common Goal Examples
Newsletter Signup
document.querySelector('#newsletter-form')
.addEventListener('submit', () => {
pipetrace.goal('newsletter_signup')
})Account Registration
// After successful registration
async function onSignupSuccess(user) {
pipetrace.goal('account_created', 0, {
method: 'email' // or 'google', 'github', etc.
})
}Free Trial Started
pipetrace.goal('trial_started', 0, {
plan: 'pro',
trial_days: 14
})Feature Adoption
// Track when users use key features
pipetrace.goal('feature_used', 0, {
feature: 'export_data'
})Best Practices
- Use descriptive names -
newsletter_signupis better thangoal1 - Track monetary value - Include the value for purchases to calculate ROI
- Don't over-track - Focus on 5-10 key conversion points
- Use snake_case - Consistent naming makes analysis easier
Viewing Goal Data
Goal completions appear in your dashboard under the Conversions section. You can:
- See total completions by goal name
- View conversion rates over time
- Calculate total revenue from valued goals
- Filter by goal properties