Generic Integration Guide
Integrate Fusionaly with any website or web application
Add the tracking script to your <head>:
<script defer src="https://your-domain.com/y/api/v1/sdk.js"></script>Replace your-domain.com with your Fusionaly instance domain.
For the exact steps in your framework, see the guides for Next.js, React, Astro, Nuxt, SvelteKit, WordPress, Shopify, Webflow, Ghost, and Hugo.
What’s Tracked Automatically
Section titled “What’s Tracked Automatically”- Page views - Every page load and SPA navigation
- Button clicks - All button interactions (when enabled)
- Sessions - Visitor sessions and return visits
See Tracking for details.
Configuration
Section titled “Configuration”Set these options before the SDK loads:
<script>window.Fusionaly = window.Fusionaly || {};window.Fusionaly.config = { respectDoNotTrack: true, // Honor DNT (default: true) autoInstrumentButtons: true, // Track clicks (default: true) debug: false // Console logging (default: false)};</script><script defer src="https://your-domain.com/y/api/v1/sdk.js"></script>See SDK Configuration for all options.
Custom Events
Section titled “Custom Events”Fusionaly.sendCustomEvent('newsletter_signup', { source: 'footer'});See Custom Events for more examples.
Revenue Tracking
Section titled “Revenue Tracking”Fusionaly.registerPurchase(1999, 'USD', { product_id: 'prod_123'});See Revenue Tracking for details.
Testing
Section titled “Testing”- Set
debug: truein the config. - Check the browser console for tracking events.
- Check that the events appear in your dashboard.
Fusionaly detects navigation in React, Vue, and Angular on its own. For custom routing, call this function yourself:
window.Fusionaly.sendPageView();