Overview
The Komerza Analytics SDK allows you to track visitor behavior on your custom website and view the analytics directly in your Komerza Dashboard. With just a single script tag, you’ll get comprehensive visitor insights including page views, user sessions, conversion tracking, and more.View Analytics
Access your visitor analytics in the Komerza Dashboard
Features
GDPR Compliant
Automatic cookie consent management with essential/optional cookies
Zero Configuration
Just include the script with your store ID - no complex setup required
Real-time Analytics
View visitor data instantly in your Komerza Dashboard
Privacy Focused
Respects user privacy with transparent cookie consent and Shadow DOM isolation
Quick Start
Single Script Integration
Add the analytics script to your HTML pages with your store ID:Replace
your-store-id with your actual Komerza store ID from your dashboard.
The analytics script automatically handles GDPR compliance by showing a cookie
consent notice to visitors.Cookie Consent Flow
When a visitor first arrives on your site:- Immediate Pageview: An IP-only pageview is recorded immediately (GDPR compliant)
- Cookie Notice Display: A GDPR-compliant notice appears in the bottom-right
- 20-Second Timer: If no response, “Required Only” tracking activates automatically
- User Choice: Visitor can choose “Required Only” or “Accept All” at any time
- Preference Storage: Choice is remembered for future visits (1-hour cookie expiry)
- Required Only
- Accept All
- Random visitor ID (not fingerprinted)
- Device type and browser name
- Referrer information
- Session tracking (1-hour expiry)
- No cross-session tracking
Implementation Examples
Basic Website
E-commerce Site
React/SPA Integration
For single-page applications, add the script once in your main HTML file:Manual Consent Control
If you want to programmatically control consent (e.g., custom cookie banner):Privacy Features
- Random visitor IDs: Required-only tracking uses crypto-random IDs (not fingerprinted)
- Short expiry: All cookies expire after 1 hour
- No cross-domain tracking: Cookies are site-specific
- IP anonymization: Essential pageviews are IP-only, no visitor ID
Content Security Policy (CSP)
For sites with CSP headers, add the following to your CSP configuration:The analytics script does not require CSP nonce integration as it loads from a
trusted CDN. However, ensure
https://cdn.komerza.com is in your script-src
directive, and https://m-api.komerza.com is in your connect-src directive
to allow data transmission.Viewing Your Analytics
Once the script is installed and visitors start coming to your site:- Login to Dashboard: Visit dashboard.komerza.com
- Navigate to Visitor Analytics: Click on the “Visitors” section
- View Insights: See real-time and historical visitor data
- Track Performance: Monitor conversion rates and user behavior
Real-time Analytics
View live visitor activity and current site performance
Historical Reports
Access detailed reports and trends over time
Ad Blocker Compatibility
The analytics script uses the filenameka.min.js which is less likely to be blocked by ad blockers compared to filenames containing “analytics” or “tracking”. However, some aggressive blockers may still block analytics requests.