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.
- 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.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:
- Open your Framer project
- Go to Site Settings → General → Custom Code
- Paste this code in "End of <head> tag":
<script
defer
data-tracking-code="YOUR_CODE"
src="https://argusmetrics.io/static/tracker.min.js"
></script>
- Replace
YOUR_CODEwith your tracking code - Publish your site
✓ Done! Analytics will start tracking within minutes.
- Open your Webflow project
- Go to Project Settings → Custom Code
- Paste this code in "Head Code" section:
<script
defer
data-tracking-code="YOUR_CODE"
src="https://argusmetrics.io/static/tracker.min.js"
></script>
- Replace
YOUR_CODEwith your tracking code - Click Save Changes
- Publish your site
✓ That's it! Your Webflow site is now being tracked.
- Go to Online Store → Themes
- Click Actions → Edit Code on your active theme
- Find and open theme.liquid file
- Locate the
</head>tag - Paste this code just before
</head>:
<script
defer
data-tracking-code="YOUR_CODE"
src="https://argusmetrics.io/static/tracker.min.js"
></script>
- Replace
YOUR_CODEwith your tracking code - Click Save
✓ Perfect! Your Shopify store is now tracking visitors and sales.
- Go to Settings → Advanced → Code Injection
- Paste this code in the "Header" section:
<script
defer
data-tracking-code="YOUR_CODE"
src="https://argusmetrics.io/static/tracker.min.js"
></script>
- Replace
YOUR_CODEwith your tracking code - 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)
- Download plugin: .zip or .tar.gz
- Go to Plugins → Add New → Upload Plugin
- Upload the file and click Install Now
- Activate the plugin
- Go to Settings → Argus Metrics
- 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:
- Create a child theme (preserves code during theme updates)
- Add the script to your child theme's
header.php - 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
- Go to your website dashboard
- Click "Add Property Filter" button (purple button)
- Enter property key (e.g., "plan")
- Enter property value (e.g., "pro")
- Click "Apply Filter"
- 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
- 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
Argusmetrics 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.io/static/tracker.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.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
}
}