Documentation

Everything you need to get started with Argusmetrics

Quick Start (30 seconds)

Copy this code and paste it in your website's <head> section:

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

Replace YOUR_CODE with your tracking code from the dashboard. That's it!

Getting Started

Argusmetrics 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.io/static/tracker.min.js"
  data-tracking-code="YOUR_TRACKING_CODE"
  defer
></script>

Replace YOUR_TRACKING_CODE with your actual tracking code.

Platform-Specific Guides

Click on your platform for step-by-step instructions:

  1. Open your Framer project
  2. Go to Site Settings → General → Custom Code
  3. Paste this code in "End of <head> tag":
<script
  defer
  data-tracking-code="YOUR_CODE"
  src="https://argusmetrics.io/static/tracker.min.js"
></script>
  1. Replace YOUR_CODE with your tracking code
  2. Publish your site

✓ Done! Analytics will start tracking within minutes.

  1. Open your Webflow project
  2. Go to Project Settings → Custom Code
  3. Paste this code in "Head Code" section:
<script
  defer
  data-tracking-code="YOUR_CODE"
  src="https://argusmetrics.io/static/tracker.min.js"
></script>
  1. Replace YOUR_CODE with your tracking code
  2. Click Save Changes
  3. Publish your site

✓ That's it! Your Webflow site is now being tracked.

  1. Go to Online Store → Themes
  2. Click Actions → Edit Code on your active theme
  3. Find and open theme.liquid file
  4. Locate the </head> tag
  5. Paste this code just before </head>:
<script
  defer
  data-tracking-code="YOUR_CODE"
  src="https://argusmetrics.io/static/tracker.min.js"
></script>
  1. Replace YOUR_CODE with your tracking code
  2. Click Save

✓ Perfect! Your Shopify store is now tracking visitors and sales.

  1. Go to Settings → Advanced → Code Injection
  2. Paste this code in the "Header" section:
<script
  defer
  data-tracking-code="YOUR_CODE"
  src="https://argusmetrics.io/static/tracker.min.js"
></script>
  1. Replace YOUR_CODE with your tracking code
  2. Click Save

✓ All set! Your Squarespace site is now tracking visitors.

✅ Recommended: Use our official WordPress plugin for easy installation. No theme editing required!

Option 1: WordPress Plugin (Recommended)

  1. Download plugin: .zip or .tar.gz
  2. Go to Plugins → Add New → Upload Plugin
  3. Upload the file and click Install Now
  4. Activate the plugin
  5. Go to Settings → Argus Metrics
  6. Paste your tracking code and save

⚠️ Avoid: Do NOT edit your theme's header.php directly - your changes will be lost when updating the theme!

Option 2: Child Theme (Advanced)

If you prefer not to use a plugin:

  1. Create a child theme (preserves code during theme updates)
  2. Add the script to your child theme's header.php
  3. Paste before </head>

💡 Tip: Just copy-paste the code below into your project - it works out of the box!

Next.js 13+ (App Router)

Add to app/layout.js or app/layout.tsx:

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <head>
        <script
          defer
          data-tracking-code="YOUR_CODE"
          src="https://argusmetrics.io/static/tracker.min.js"
        ></script>
      </head>
      <body>{children}</body>
    </html>
  );
}

Next.js 12 (Pages Router)

Add to pages/_document.js:

import { Html, Head, Main, NextScript } from 'next/document';

export default function Document() {
  return (
    <Html>
      <Head>
        <script
          defer
          data-tracking-code="YOUR_CODE"
          src="https://argusmetrics.io/static/tracker.min.js"
        ></script>
      </Head>
      <body>
        <Main />
        <NextScript />
      </body>
    </Html>
  );
}

React (Create React App)

Add to public/index.html inside <head>:

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

Paste this code in the <head> section of every HTML page:

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Your Website</title>

  <!-- Argus Metrics Analytics -->
  <script
    defer
    data-tracking-code="YOUR_CODE"
    src="https://argusmetrics.io/static/tracker.min.js"
  ></script>
</head>
<body>
  <!-- Your content -->
</body>
</html>

✓ That's it! Copy the script tag and add it to all your HTML pages. Analytics will start tracking immediately.

Step 3: Verify Installation

Visit your website and check your Argusmetrics 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>

Custom Properties

Segment your analytics by attaching custom properties to pageviews. Perfect for tracking user types, A/B tests, subscription plans, and more.

🎯 Use Cases: Filter analytics by user plan (free/pro), A/B test variant, user ID, language, or any custom dimension specific to your business.

Tracking Pageviews with Properties

Pass custom properties when tracking pageviews:

window.argus.track({
  plan: 'pro',
  userId: '12345',
  experiment: 'variant-A'
});

Example: Track User Plan

<script>
  // Track pageview with user's subscription plan
  window.argus.track({
    plan: 'premium',
    userId: '12345',
    isLoggedIn: 'true'
  });
</script>

Example: A/B Testing

<script>
  // Track which A/B test variant the user sees
  const variant = Math.random() < 0.5 ? 'A' : 'B';

  window.argus.track({
    experiment: 'pricing-test',
    variant: variant
  });
</script>

Filtering by Properties in Dashboard

  1. Go to your website dashboard
  2. Click "Add Property Filter" button (purple button)
  3. Enter property key (e.g., "plan")
  4. Enter property value (e.g., "pro")
  5. Click "Apply Filter"
  6. Dashboard now shows analytics for only that segment

💡 Pro Tip: You can apply multiple property filters simultaneously to drill down into specific user segments. For example, filter by plan: pro AND experiment: variant-A to see how premium users interact with your A/B test.

Property Keys Best Practices

  • plan - User subscription tier (free, starter, pro, business)
  • userId - Track individual user journeys
  • experiment - A/B test experiment name
  • variant - A/B test variant (A, B, control)
  • language - User language preference (en, sv, no, da)
  • isLoggedIn - Whether user is authenticated (true, false)
  • campaign - Marketing campaign identifier

⚠️ Privacy Note: Do not include personally identifiable information (PII) like names, emails, or addresses in properties. Use anonymized IDs instead.

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.io/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