Getting Started with Metrics Bar

Learn how to set up and use Metrics Bar to track your website analytics with privacy-first, real-time insights.

Getting Started with Metrics Bar

Welcome to Metrics Bar! This guide will help you get started with tracking your website analytics in just a few minutes.

What is Metrics Bar?

Metrics Bar is a privacy-first analytics platform that gives you real-time insights into your website traffic without compromising your visitors’ privacy. Unlike traditional analytics tools, we don’t use cookies or track personal information.

Quick Setup

Step 1: Create an Account

First, sign up for a free account at metrics.bar. The free plan includes:

  • Up to 100K pageviews per month
  • Real-time analytics
  • Basic reports and insights
  • Privacy-first tracking

Step 2: Add Your Website

Once you’re logged in, click the “Add Website” button and enter your domain name. For example:

  • example.com
  • blog.example.com
  • www.example.com

Step 3: Install the Tracking Code

After adding your website, you’ll receive a unique tracking code. Add it to your website’s HTML, just before the closing </head> tag:

<script>
  (function() {
    var script = document.createElement('script');
    script.src = 'https://metrics.bar/track.js';
    script.setAttribute('data-site-id', 'YOUR_SITE_ID');
    script.async = true;
    document.head.appendChild(script);
  })();
</script>

Step 4: Verify Installation

Visit your website and check the Metrics Bar dashboard. You should see your first pageview within a few seconds!

Understanding Your Dashboard

Overview Section

The overview section shows key metrics at a glance:

  • Visitors: Unique visitors to your site
  • Pageviews: Total number of pages viewed
  • Events: Custom events tracked
  • Revenue: Revenue from tracked conversions

Time Ranges

You can filter data by different time ranges:

  • Today
  • Yesterday
  • This Week
  • This Month
  • Custom Range

Website Details

Click on any website in your dashboard to see detailed analytics including:

  • Page performance
  • Referrer sources
  • Browser and device breakdown
  • Geographic data
  • Custom events

Advanced Features

Custom Events

Track custom events to measure specific user actions:

// Track a custom event
metricsBar.track('purchase', {
  value: 29.99,
  currency: 'USD'
});

Revenue Tracking

Track revenue from purchases or conversions:

metricsBar.track('revenue', {
  amount: 99.99,
  currency: 'USD'
});

API Access

Use our REST API to programmatically access your analytics data:

curl -X GET "https://api.metrics.bar/v1/websites/YOUR_SITE_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"

Best Practices

  1. Privacy First: We don’t use cookies or track personal information
  2. Real-time Data: All data is processed in real-time
  3. GDPR Compliant: No consent banners needed
  4. Lightweight: Our tracking script is less than 1KB

Need Help?

Happy tracking! 🚀