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"
  data-api-endpoint="https://app.argusmetrics.io/api/v1/analytics/track"
  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
  defer
  data-tracking-code="YOUR_TRACKING_CODE"
  data-api-endpoint="https://app.argusmetrics.io/api/v1/analytics/track"
  src="https://argusmetrics.io/static/tracker.min.js"
></script>

Replace YOUR_TRACKING_CODE with your actual tracking code.

Important: The data-api-endpoint attribute is required when your site is hosted on a different domain than the API (e.g., GitHub Pages, Netlify, Vercel, Cloudflare Pages). Without it, tracking requests will be sent to your hosting provider instead of the Argusmetrics API and silently fail.

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"
  data-api-endpoint="https://app.argusmetrics.io/api/v1/analytics/track"
  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"
  data-api-endpoint="https://app.argusmetrics.io/api/v1/analytics/track"
  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"
  data-api-endpoint="https://app.argusmetrics.io/api/v1/analytics/track"
  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"
  data-api-endpoint="https://app.argusmetrics.io/api/v1/analytics/track"
  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!

Step 1: Create your Argusmetrics account

  1. Go to app.argusmetrics.io/signup
  2. Enter your email and select a plan (Hobby is free)
  3. Check your inbox and click the magic link (valid for 15 min)

Step 2: Add your website

  1. On the dashboard, click "Add Website"
  2. Enter your website name and domain (e.g. https://yoursite.com)
  3. You will receive an 8-character tracking code

Step 3: Verify your domain

Domain verification is required before tracking starts. This confirms you own the domain.

  1. Go to Settings for your website in the dashboard
  2. Copy the DNS TXT record shown:
    Type: TXT
    Host: _argusmetrics.yoursite.com
    Value: [your unique verification token]
  3. Add the TXT record at your DNS provider (Loopia, Cloudflare, GoDaddy, etc.)
  4. Wait 1-5 minutes, then click "Verify Domain Now"

Step 4: Install the WordPress plugin

  1. Download the plugin: .zip or .tar.gz
  2. In WordPress: Plugins → Add New → Upload Plugin
  3. Upload the .zip file and click Install Now
  4. Click Activate

Step 5: Configure the plugin

  1. Go to Settings → Argusmetrics
  2. Paste your 8-character tracking code
  3. Check "Exclude Administrators" (so your own visits are not tracked)
  4. Click Save Settings

Done! Visit your site and check your dashboard — data appears in real-time.

Tip: Argusmetrics is cookieless and GDPR-compliant — you can remove any cookie consent plugin (e.g. Complianz, CookieYes) since it is no longer needed.

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

Alternative: 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"
          data-api-endpoint="https://app.argusmetrics.io/api/v1/analytics/track"
          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"
          data-api-endpoint="https://app.argusmetrics.io/api/v1/analytics/track"
          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"
  data-api-endpoint="https://app.argusmetrics.io/api/v1/analytics/track"
  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>

  <!-- Argusmetrics Analytics -->
  <script
    defer
    data-tracking-code="YOUR_CODE"
    data-api-endpoint="https://app.argusmetrics.io/api/v1/analytics/track"
    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.

Required: Static hosting platforms (GitHub Pages, Netlify, Cloudflare Pages, Vercel, etc.) do not support POST requests. You must add the data-api-endpoint attribute, otherwise tracking requests will silently fail.

The tracking script automatically sends data to the same domain it's loaded from. Since your site is hosted on a static platform, you need to tell it where the API is:

<script
  defer
  data-tracking-code="YOUR_CODE"
  data-api-endpoint="https://app.argusmetrics.io/api/v1/analytics/track"
  src="https://argusmetrics.io/static/tracker.min.js"
></script>

Without data-api-endpoint, the script sends POST requests to your static host (e.g., GitHub Pages), which returns a 405 error. The script catches errors silently, so you won't see any error messages — tracking just doesn't work.

How to verify: Open your browser's DevTools (F12) → Network tab → visit your site → look for a POST request to /track. It should return 200, not 405.

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.

Campaign & Ad Tracking

Track the performance of your ad campaigns from Meta, Google Ads, TikTok, and any other platform using UTM parameters.

No extra setup needed. The tracking script automatically reads UTM parameters from your URLs and sends them to the dashboard.

What are UTM Parameters?

UTM parameters are tags you add to the end of your ad URLs. When someone clicks the link, Argusmetrics reads the tags and shows you exactly which campaigns are driving traffic.

Parameter Purpose Example
utm_sourceWhere the ad is shownfacebook, google, instagram
utm_mediumType of trafficcpc, email, social
utm_campaignCampaign namesummer_sale, launch_2026
utm_contentAd variantimage_a, video_b
utm_termSearch keyword (Google Ads)cheap+shoes

Example: Meta (Facebook) Ads

When creating an ad in Meta Ads Manager, set your destination URL like this:

https://yoursite.com/offer?utm_source=facebook&utm_medium=cpc&utm_campaign=summer_sale&utm_content=video_v1

In your dashboard, this visit will show up under UTM Campaigns with source facebook, medium cpc, and campaign summer_sale. The traffic channel will automatically be categorized as "Paid".

Example: Google Ads

https://yoursite.com/landing?utm_source=google&utm_medium=cpc&utm_campaign=brand_keywords&utm_term=web+analytics

Tip: Both Meta and Google can generate UTM parameters automatically. In Meta Ads Manager, use the "URL Parameters" field. In Google Ads, enable "Auto-tagging" in your account settings.

Traffic Channels

Argusmetrics automatically categorizes your traffic into channels based on UTM parameters and referrer data:

Channel How it's detected
Paidutm_medium is cpc, ppc, or paid
Emailutm_medium is email
OrganicReferrer is Google, Bing, DuckDuckGo, etc.
SocialReferrer is Facebook, Twitter, LinkedIn, etc.
ReferralReferrer is another website
DirectNo referrer (typed URL, bookmark, etc.)

What You See in the Dashboard

  • UTM Campaigns — Table showing source, medium, campaign name, and visitor count
  • Traffic Channels — Chart breaking down Paid vs Organic vs Direct vs Social traffic
  • Goals — Combine with conversion goals to see which campaigns actually convert

Combining with Goals

Set up a conversion goal (e.g., "signup") and then check the UTM Campaigns section to see which ad campaigns are driving actual conversions — not just clicks.

Note: Argusmetrics does not support retargeting pixels (Meta Pixel, Google Tag, etc.) since these require third-party cookies and cross-site tracking. We track which campaigns bring traffic and conversions, but we don't feed data back to ad platforms for retargeting.

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

Ecommerce Analytics

Track revenue, products, and conversion funnels with built-in ecommerce analytics. Perfect for SaaS, Shopify, WooCommerce, and any online store.

No extra setup needed. The tracking script already includes trackEcommerce(). Just call it at the right moments in your checkout flow.

Event Types

Track the full customer journey with 8 event types:

Event When to use
view_itemVisitor views a product page
add_to_cartProduct added to cart
remove_from_cartProduct removed from cart
begin_checkoutCheckout process started
add_payment_infoPayment details entered
add_shipping_infoShipping details entered
purchasePurchase completed
refundRefund processed

Track a Purchase

window.argus.trackEcommerce('purchase', {
  transaction_id: 'order-123',
  revenue: 99.99,
  currency: 'USD',
  tax: 8.00,
  shipping: 5.99,
  product_name: 'Pro Plan',
  product_id: 'plan_pro',
  quantity: 1
});

Track Product Views

window.argus.trackEcommerce('view_item', {
  product_name: 'Pro Plan',
  product_id: 'plan_pro',
  price: 99.99
});

Track Add to Cart

window.argus.trackEcommerce('add_to_cart', {
  product_name: 'Starter Plan',
  product_id: 'plan_starter',
  quantity: 1,
  price: 29.99
});

Full Checkout Funnel Example

// 1. Product page
argus.trackEcommerce('view_item', {
  product_name: 'Pro Plan', product_id: 'plan_pro', price: 99.99
});

// 2. Add to cart button
argus.trackEcommerce('add_to_cart', {
  product_name: 'Pro Plan', product_id: 'plan_pro', quantity: 1, price: 99.99
});

// 3. Checkout page
argus.trackEcommerce('begin_checkout', {
  revenue: 99.99, currency: 'USD'
});

// 4. After successful payment
argus.trackEcommerce('purchase', {
  transaction_id: 'order-456',
  revenue: 99.99,
  currency: 'USD',
  product_name: 'Pro Plan',
  product_id: 'plan_pro'
});

Custom Properties

Attach extra data like payment method or coupon codes:

argus.trackEcommerce('purchase', {
  transaction_id: 'order-789',
  revenue: 79.99,
  product_name: 'Pro Plan',
  properties: {
    payment_method: 'credit_card',
    coupon: 'SAVE20'
  }
});

Server-Side Tracking (API)

You can also send ecommerce events directly from your backend:

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

{
  "tracking_code": "YOUR_CODE",
  "event_type": "purchase",
  "event_name": "Product Purchase",
  "transaction_id": "order-123",
  "revenue": 99.99,
  "currency": "USD",
  "product_name": "Pro Plan",
  "product_id": "plan_pro"
}

What You See in the Dashboard

  • Total Revenue — Sum of all purchases in the selected period
  • Total Transactions — Number of completed purchases
  • Average Order Value — Revenue / transactions
  • Top Products — Best-selling products by revenue
  • Revenue Chart — Revenue over time (daily)
  • Conversion Funnel — Drop-off rates from view to purchase

Multi-currency support: Revenue is tracked per currency (USD, EUR, SEK, etc.). The dashboard filters by currency automatically.

Available Fields

Field Type Description
transaction_idstringUnique order ID (required for purchases)
revenuenumberTotal transaction amount
currencystringISO 4217 code (default: USD)
taxnumberTax amount
shippingnumberShipping cost
product_namestringProduct name
product_idstringProduct SKU/ID
product_categorystringProduct category
product_brandstringProduct brand
quantitynumberQuantity (default: 1)
pricenumberPrice per unit
propertiesobjectCustom key/value data

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://app.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