Documentation

Everything you need to get started with Argus Metrics

Getting Started

Argus Metrics is a privacy-first web analytics platform. It takes less than 5 minutes to set up.

  1. Sign up for a free account
  2. Add your website
  3. Install the tracking script
  4. Start seeing data in real-time

Installation

Step 1: Get Your Tracking Code

After adding a website in your dashboard, you'll receive a unique tracking code. It looks like this:

ABC123XYZ

Step 2: Add Script to Your Website

Add this snippet to the <head> section of your website, right before the closing </head> tag:

<script
  src="https://argusmetrics.se/static/tracker.prod.min.js"
  data-tracking-code="YOUR_TRACKING_CODE"
  defer
></script>

Replace YOUR_TRACKING_CODE with your actual tracking code.

Platform-Specific Guides

WordPress

Add the tracking script to your theme's header:

  1. Go to Appearance → Theme Editor
  2. Open header.php
  3. Paste the script before </head>
  4. Save changes
React / Next.js

Add to your _document.js or index.html:

// In _document.js (Next.js)
<Head>
  <script
    src="https://argusmetrics.se/static/tracker.prod.min.js"
    data-tracking-code="YOUR_CODE"
    defer
  />
</Head>
Static HTML

Simply paste the script in every HTML page's <head> section.

Step 3: Verify Installation

Visit your website and check your Argus Metrics dashboard. You should see a real-time visitor within seconds.

Custom Events

Track custom actions like button clicks, form submissions, purchases, or any user interaction.

Basic Event Tracking

window.argus.trackEvent('signup');

Events with Properties

Add custom properties to track additional context:

window.argus.trackEvent('purchase', {
  plan: 'pro',
  amount: 9,
  currency: 'EUR'
});

Example: Track Button Click

<button onclick="window.argus.trackEvent('cta_click', {button: 'Get Started'})">
  Get Started
</button>

Conversion Goals

Track important business metrics like signups, purchases, or form submissions.

Setting Up Goals

  1. Go to your website dashboard
  2. Click "Goals" tab
  3. Click "Create Goal"
  4. Enter goal name (e.g., "signup", "purchase")
  5. Track events with that name

💡 Tip: Goals automatically track custom events with matching names. Track "signup" events, create a "signup" goal, and see conversion rates instantly.

404 Error Tracking

Find and fix broken links by tracking 404 errors automatically.

Setup

Add this code to your 404 error page:

<script>
  if (window.argus) {
    window.argus.trackEvent('404 Error', {
      path: window.location.pathname,
      referrer: document.referrer || 'direct'
    });
  }
</script>

404 errors will appear in your dashboard's "404 Errors" section with:

  • Broken URL path
  • Number of times accessed
  • Referrer (where visitors came from)
  • Last seen timestamp

Team Management

Collaborate with your team by inviting members with different permission levels.

Roles

👑 Owner

Full access. Can delete website, manage billing, and invite admins/viewers.

⚙️ Admin

Can view analytics, edit settings, manage goals, and invite viewers.

👁️ Viewer

Can only view analytics. No editing permissions.

Inviting Team Members

  1. Go to your website dashboard
  2. Click "Team" tab
  3. Click "Invite Team Member"
  4. Enter email and select role
  5. They'll receive an invitation email

API Reference

Access your analytics data programmatically via our RESTful API.

Authentication

Create an API token in your website settings and include it in requests:

curl -H "Authorization: Bearer YOUR_API_TOKEN" \
  https://argusmetrics.se/api/v1/dashboard/website/7/stats

Track Pageview

POST /api/v1/analytics/track
Content-Type: application/json

{
  "tracking_code": "YOUR_CODE",
  "path": "/about",
  "referrer": "https://google.com",
  "screen_width": 1920
}

Track Custom Event

POST /api/v1/analytics/track-event
Content-Type: application/json

{
  "tracking_code": "YOUR_CODE",
  "event_name": "signup",
  "properties": {
    "plan": "pro",
    "amount": 9
  }
}

Need Help?

Can't find what you're looking for? We're here to help!

Contact Support