This page demonstrates the custom events tracking API. Click the buttons below to track various events.
Note: Make sure to replace YOUR_SITE_ID_HERE in the script tag above with your actual site ID.
Track events without additional properties
Trackveil.track('Button Clicked');
Track events with additional data
Trackveil.track('Purchase', {
value: 29.99,
currency: 'EUR',
product: 'Test Product'
});
Track form submissions
Trackveil.track('Newsletter Signup', {
source: 'test-page'
});
Track media interactions
Trackveil.track('Video Played', {
video_id: 'intro-video',
duration: 120
});
Track file downloads
Trackveil.track('File Downloaded', {
filename: 'whitepaper.pdf',
size: '2.4MB'
});
Track e-commerce actions
Trackveil.track('Add to Cart', {
product_id: '12345',
name: 'Premium Plan',
price: 15.00
});
Open your browser's developer console (F12) and check the Network tab to see events being tracked.
Events are sent to: https://api.trackveil.net/event
View your events in the dashboard: Events Dashboard
Parameters:
eventName (string, required) - Name of the event to trackproperties (object, optional) - Additional data to track with the eventExample:
// Simple event
Trackveil.track('Feature Used');
// Event with properties
Trackveil.track('Purchase', {
value: 49.99,
currency: 'EUR',
product_id: '12345',
category: 'Premium',
payment_method: 'stripe'
});
Common Use Cases: