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.
- Sign up for a free account
 - Add your website
 - Install the tracking script
 - 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:
- Go to Appearance → Theme Editor
 - Open header.php
 - Paste the script before 
</head> - 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
- Go to your website dashboard
 - Click "Goals" tab
 - Click "Create Goal"
 - Enter goal name (e.g., "signup", "purchase")
 - 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.
Outbound Link Tracking
Argus Metrics automatically tracks clicks on external links. No configuration needed!
What Gets Tracked
- Links to different domains (e.g., yoursite.com → google.com)
 - Links with 
target="_blank" - HTTP and HTTPS links only
 
Excluding Domains
To exclude certain domains from tracking (e.g., your own subdomains):
<script
  src="https://argusmetrics.se/static/tracker.prod.min.js"
  data-tracking-code="YOUR_CODE"
  data-exclude-outbound="stripe.com,paypal.com"
  defer
></script>
                        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
- Go to your website dashboard
 - Click "Team" tab
 - Click "Invite Team Member"
 - Enter email and select role
 - 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
  }
}