Simple Analytics Setup & Implementation | OpsBlu Docs

Simple Analytics Setup & Implementation

How to install Simple Analytics for privacy-first tracking with no cookies. Covers one-line script deployment, custom domain bypass, SPA routing, and...

Simple Analytics Setup Overview

Simple Analytics is a privacy-first web analytics platform that provides essential insights without cookies, tracking scripts, or personal data collection. This guide covers everything you need to set up Simple Analytics on your website.

Why Simple Analytics?

Simple Analytics stands out in the analytics landscape by prioritizing:

  • Privacy by design: No cookies, no personal data collection, GDPR/CCPA compliant
  • Lightweight: Minimal performance impact (~3KB script)
  • Simple interface: Clean, easy-to-understand dashboard
  • Bypass ad blockers: Custom domain option to avoid blocking
  • Open source: Transparent codebase
  • No data sampling: All data, all the time

Quick Start

The fastest way to get started with Simple Analytics:

1. Create an Account

Visit simpleanalytics.com and sign up for an account. Choose from:

  • Free trial: 14-day trial with full features
  • Starter plan: $19/month for small sites
  • Business plan: $59/month for growing sites
  • Enterprise: Custom pricing for large organizations

2. Add Your Website

  1. Log into your dashboard
  2. Click "Add Website"
  3. Enter your domain (e.g., example.com)
  4. Click "Create"

3. Install the Script

Add the Simple Analytics script to your website:

<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt="" referrerpolicy="no-referrer-when-downgrade" /></noscript>

Place this code in your HTML <head> tag or before the closing </body> tag.

4. Verify Installation

  1. Visit your website
  2. Wait 1-2 minutes
  3. Check your Simple Analytics dashboard
  4. You should see your visit in real-time

Installation Methods

Simple Analytics supports multiple installation methods to fit different technology stacks:

Standard JavaScript

Perfect for traditional websites and static sites:

<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt="" referrerpolicy="no-referrer-when-downgrade" /></noscript>

NPM Package

For modern JavaScript applications:

npm install sa-sdk-javascript
import { loadScript } from 'sa-sdk-javascript';
loadScript();

Framework-Specific

See the detailed installation guide for framework-specific instructions.

Features and Extensions

Auto Events Tracking

Automatically track clicks, form submissions, and other interactions:

<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<script async defer src="https://scripts.simpleanalyticscdn.com/auto-events.js"></script>

This extension automatically tracks:

  • Button clicks
  • Link clicks
  • Form submissions
  • Video plays
  • PDF downloads

Learn more in the Event Tracking guide.

Custom Domain (Bypass Ad Blockers)

Use your own domain to bypass ad blockers:

  1. Add a DNS record pointing to Simple Analytics
  2. Configure in your dashboard
  3. Update script URL:
<script async defer src="https://analytics.yourdomain.com/latest.js"></script>

Benefits:

  • Avoid ad blocker blocking
  • First-party context
  • Improved data accuracy

Hash Mode

For single-page applications that use hash-based routing:

<script async defer src="https://scripts.simpleanalyticscdn.com/latest.hash.js"></script>

This tracks URLs like example.com/#/products/123.

Ignore Pages

Exclude specific pages from tracking:

<script>
  window.sa_pageview_ignore = ['/admin', '/dashboard', '/settings'];
</script>
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>

Core Tracking Capabilities

Automatic Page Views

Simple Analytics automatically tracks:

  • Page URL
  • Page title
  • Referrer
  • Screen size
  • Browser
  • Operating system
  • Country (based on IP, not stored)

Manual Page Views

For single-page applications, trigger page views manually:

if (window.sa_event) {
  window.sa_event('pageview');
}

Custom Events

Track specific user actions:

window.sa_event('button_click');
window.sa_event('newsletter_signup');
window.sa_event('purchase_complete', { amount: 99.99 });

Goals and Conversions

Set up goals in your dashboard to track:

  • Form submissions
  • Button clicks
  • Purchase completions
  • Newsletter signups
  • Custom events

Privacy and Compliance

GDPR Compliance

Simple Analytics is GDPR compliant by default:

  • No cookies used
  • No personal data collected
  • No consent banner required
  • Data processed in EU (optional)

Data Storage

Your data is stored:

  • Default: Amsterdam, Netherlands
  • Optional: US or Asia regions
  • Retention: Unlimited (based on plan)

Data Ownership

You own your data:

  • Export anytime (CSV, JSON)
  • Delete anytime
  • No data sharing with third parties

Visitor Privacy

Simple Analytics protects visitor privacy:

  • No tracking across sites
  • No user profiling
  • No fingerprinting
  • IP addresses not stored

Dashboard and Reporting

Real-Time Analytics

View live visitor activity:

  • Current visitors
  • Active pages
  • Traffic sources
  • Devices

Historical Data

Analyze trends over time:

  • Daily, weekly, monthly views
  • Growth comparisons
  • Traffic patterns
  • Seasonal trends

Key Metrics

Track important website metrics:

  • Page views: Total and unique
  • Visitors: Total and unique
  • Bounce rate: Single-page sessions
  • Session duration: Average time on site
  • Top pages: Most visited pages
  • Referrers: Traffic sources
  • Countries: Geographic distribution
  • Devices: Desktop vs mobile vs tablet
  • Browsers: Browser distribution
  • Operating systems: OS distribution

Custom Reports

Create custom views:

  • Filter by date range
  • Filter by page
  • Filter by referrer
  • Filter by device
  • Export to CSV

Integration Capabilities

API Access

Access your data programmatically:

curl https://simpleanalytics.com/api/pageviews \
  -H "Api-Key: YOUR-API-KEY" \
  -H "User-Id: YOUR-USER-ID"

Use cases:

  • Custom dashboards
  • Automated reports
  • Data synchronization
  • Third-party integrations

Webhooks

Receive real-time notifications:

  • New visitors
  • Goal completions
  • Traffic spikes
  • Custom events

Embeds

Embed public stats on your website:

<iframe src="https://simpleanalytics.com/example.com?iframe=true"
        width="100%" height="500px" frameborder="0"></iframe>

Best Practices

Script Placement

Recommended: Place in <head> for early loading

<head>
  <script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
</head>

Alternative: Before closing </body> to avoid blocking render

<body>
  <!-- Your content -->
  <script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
</body>

Performance Optimization

  • Use async and defer attributes
  • Load from CDN (scripts.simpleanalyticscdn.com)
  • Consider custom domain for better caching
  • Minimal script size (~3KB)

Testing and Debugging

Browser Console:

console.log(window.sa_event); // Should output a function

Network Tab: Look for requests to queue.simpleanalyticscdn.com

Dashboard: Check real-time visitors in your dashboard

Common Setup Scenarios

Multi-Domain Tracking

Track multiple domains under one account:

  1. Add each domain in dashboard
  2. Install script on each domain
  3. View combined or separate stats

Subdomain Tracking

Track subdomains separately or combined:

  • Separate: Add each as separate site
  • Combined: Use root domain only

Development vs Production

Exclude development traffic:

<script>
  // Only load in production
  if (window.location.hostname === 'example.com') {
    document.write('<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"><\/script>');
  }
</script>

E-commerce Tracking

Track purchases and revenue:

window.sa_event('purchase', {
  amount: 99.99,
  currency: 'USD',
  product: 'Premium Plan'
});

Troubleshooting

No Data Appearing

Check: Script is loading

  • Open Network tab
  • Look for requests to simpleanalyticscdn.com

Check: Domain matches

  • Verify domain in dashboard matches your website

Check: Ad blockers

  • Test in incognito mode
  • Consider custom domain

Duplicate Page Views

Cause: Script loaded multiple times Solution: Ensure script is only in one location

Events Not Tracking

Check: Event syntax

// Correct
window.sa_event('event_name');

// Incorrect
sa_event('event_name'); // Missing window.

Check: Script loaded before event call

  • Place events after script loads
  • Or use callback

Setup Guides

Detailed guides for specific setup scenarios:

Getting Help

Need assistance?

Next Steps

After installation:

  1. Set up goals: Define what actions matter
  2. Configure events: Track specific interactions
  3. Create custom reports: Focus on key metrics
  4. Set up alerts: Get notified of traffic spikes
  5. Share dashboard: Give team members access
  6. Export data: Integrate with other tools

Simple Analytics provides a clean, privacy-focused alternative to traditional analytics platforms while maintaining the insights you need to understand your website's performance.