Quick Start
import { Steps, Aside, Code, Tabs, TabItem } from ‘@astrojs/starlight/components’;
Get analyze.swiss running on your website in just a few minutes.
Prerequisites
Section titled “Prerequisites”- An analyze.swiss account (Sign up free)
- Access to your website’s HTML or a tag manager
Installation Steps
Section titled “Installation Steps”-
Sign up and create a workspace
Go to app.analyze.swiss/register and create your account. You’ll automatically get a workspace created for you.
-
Get your tracking code
In your workspace settings, go to Settings → Installation to find your unique tracking snippet:
<scriptsrc="https://analyze-ingest.thismatters.workers.dev/s/a.js"data-api-key="YOUR_API_KEY"data-auto-capture="true"defer></script> -
Add to your website
Paste the script in your website’s
<head>section, just before the closing</head>tag. -
Verify installation
Visit your website and check your analyze.swiss dashboard. You should see your first pageview within seconds!
Framework-Specific Guides
Section titled “Framework-Specific Guides”```tsx// app/layout.tsx (Next.js App Router)import { AnalyzeProvider } from '@analyze.swiss/react';
export default function RootLayout({ children }) { return ( <html> <body> <AnalyzeProvider apiKey="YOUR_API_KEY"> {children} </AnalyzeProvider> </body> </html> );}```What Gets Tracked Automatically
Section titled “What Gets Tracked Automatically”With data-auto-capture="true", analyze.swiss automatically tracks:
| Event | Description |
|---|---|
| Pageviews | Every page navigation |
| Clicks | Button and link clicks |
| Form Submissions | Form submit events |
| Scroll Depth | 25%, 50%, 75%, 100% |
| Engagement Time | Active time on page |
| Outbound Links | External link clicks |
| File Downloads | PDF, ZIP, etc. |
Sending Custom Events
Section titled “Sending Custom Events”Track specific actions important to your business:
// Track a signupanalyze.track('signup', { plan: 'pro', source: 'landing_page'});
// Track a purchaseanalyze.track('purchase', { order_id: '12345', revenue: 99.00, currency: 'USD'});Identifying Users
Section titled “Identifying Users”Connect anonymous activity to known users:
// After user logs inanalyze.identify('user_123', { email: 'user@example.com', name: 'John Doe', plan: 'enterprise'});Next Steps
Section titled “Next Steps”- Full Installation Guide – Advanced options
- Event Tracking – Custom event setup
- Identity Resolution – User identification
- SDK Reference – Complete API docs