Event Tracking

Track clicks, signups, and any custom goal - with JS or no-JS

Track what matters: signups, clicks, checkout. Works on both Cloud and Self-hosted - same script.

0) Add the base script first

If you haven’t yet, paste the tag from dashboard → Website → Settings in <head>:

<script defer data-website-id="YOUR_ID" data-domain="yourdomain.com"
  src="https://cloud.openwebtrack.one/script.cookieless.js"></script>

Self-hosted: use your ORIGIN instead of cloud.openwebtrack.one.

Verify: visit your site → dashboard Realtime shows 1 visitor.


1) JS: One-liner

// simple
window.owt.trackEvent('signup');

// with properties (max 10, values are strings/numbers/booleans)
window.owt.trackEvent('signup', {
  plan: 'pro',
  source: 'header',
  method: 'google'
});

2) No-JS: HTML attribute

Add clicks without coding:

<button data-owt-goal="signup" data-owt-goal-plan="pro" data-owt-goal-source="homepage">
  Sign Up Now
</button>

Any click on data-owt-goal fires. Extra data-owt-goal-* become properties.

API reference

window.owt.trackEvent(name, data, callback)
ParamTypeRequiredDetails
namestringYes1-32 chars, a-z0-9 _-
dataobjectNo≤10 props, flat key/value
callbackfunction(status)No200 on success

Events appear in dashboard → Events → filter by name / property / date.

Examples you can copy

// E-commerce
window.owt.trackEvent('add_to_cart', { product_id: '123', price: 49.99 });
window.owt.trackEvent('checkout_completed', { total: 149.97, items: 3 });

// Content
window.owt.trackEvent('video_play', { video_id: 'abc', duration: 120 });
window.owt.trackEvent('file_download', { file: 'brochure.pdf' });

// SaaS
window.owt.trackEvent('search', { query: 'analytics' });

Check it worked

  1. Fire event → dashboard → Events → should appear in under 10s
  2. Not showing? Open DevTools → Network → collect or event → should be 200
  3. Ad blocker? Try with blocker off or self-host on your subdomain

Next