Empower developers to seamlessly integrate real-time user location data into their applications with our SDK, transforming interactions into captivating visual experiences on a dynamic globe.
First, you need to register your application to get a unique App ID. Navigate to your dashboard and register a new application.
1. Go to your dashboard
2. Click "Register New App"
3. Enter your application name and domain (optional)
4. Copy your generated App ID
npm install small-wins-sdkimport { Visualize } from 'small-wins-sdk';
// Initialize with your App ID
const visualize = new Visualize({
app_id: 'YOUR_APP_ID'
});
// Track events
visualize.track('user-interaction');Here's a complete example of tracking button clicks:
import { Visualize } from 'small-wins-sdk';
const visualize = new Visualize({
app_id: 'YOUR_APP_ID'
});
// In your component or event handler
const handleClick = () => {
visualize.track('button-click', {
buttonId: 'my-button',
action: 'submit-form',
timestamp: new Date().toISOString()
});
};
// Attach to button
<button onClick={handleClick}>
Click Me
</button>Note: Replace YOUR_APP_ID with the App ID you received after registering your application. Events are sent asynchronously and will appear on your dashboard map in real-time.