Documentation
Custom Events
Custom Events
Track custom events like button clicks, form submissions, downloads, and more.
Tracking Events
Use the global pulse function to track events:
// Basic event
pulse('signup_click');
// Event with value
pulse('purchase', { value: 99.99 });
// Event with properties
pulse('download', {
category: 'ebook',
file: 'guide.pdf'
});
Auto-tracking with Data Attributes
Add data attributes to HTML elements for automatic tracking:
<button data-pulse-event="signup_click">Sign Up</button>
<a href="/file.pdf" data-pulse-event="download" data-pulse-file="guide.pdf">
Download PDF
</a>
Event Names Best Practices
- Use lowercase with underscores:
button_click - Be descriptive:
newsletter_signupnotsignup - Use consistent naming across your site
Viewing Events
Go to Dashboard → Analytics → Events to see all tracked events, their counts, and trends.