Sufyaan Studio Engineering4 min read

How to Track Custom Conversion Events & E-commerce Goals

Learn how to dispatch custom conversion events, signup milestones, and checkout revenue using window.analytics.track().

Direct Tutorial Summary
By Sufyaan Studio EngineeringVerified August 2026

Dispatch custom conversion events in your JavaScript frontend by calling window.analytics.track(eventName, properties). Event names can be up to 128 characters, and the optional properties payload supports up to 2 KB of structured JSON metadata.

KEY TAKEAWAYS
  • Step 1: Track Simple Button Clicks
  • Step 2: Attach Custom JSON Metadata
  • Step 3: View Events in Realtime Dashboard

Step 1: Track Simple Button Clicks

Call window.analytics.track() directly in your button click handler.

CODE STEP 1
// Button Click const ctaBtn = document.getElementById('pricing-cta'); ctaBtn.addEventListener('click', () => { window.analytics?.track('pricing_cta_clicked'); });

Step 2: Attach Custom JSON Metadata

Send rich contextual properties such as subscription tiers, currency, and referral source.

CODE STEP 2
// Signup with Metadata window.analytics?.track('user_registered', { plan: 'pro_annual', tier: 'business', amount: 240, currency: 'USD' });

Step 3: View Events in Realtime Dashboard

Navigate to your Analytics dashboard -> Events panel to view live event counts, breakdown by properties, and conversion trends.

FAQ & VERIFICATION

Guide FAQ

Start tracking your websites with confidence.

Create an account in 30 seconds. Up to 25,000 events free every month.

analytics