Here’s something most website owners don’t realise: having a website without analytics is like running a shop with the lights off. You can’t see who walks in, what they look at, or why they leave. You’re making decisions based on gut feeling instead of evidence. Setting up website tracking changes that — and it takes less time than you think.
This guide covers everything you need to know about how to set up website tracking from scratch. I’ll walk you through choosing a tool, installing the tracking snippet, tagging your campaigns, building a dashboard, and defining goals. Whether you’re launching a new site or finally adding analytics to an existing one, this is your starting point.
Why Every Website Needs Tracking
Without analytics, you’re guessing. You might think your homepage is your most popular page, but it could be a blog post you wrote two years ago. You might assume visitors come from social media, when actually 60% find you through search. You might not know that 80% of your mobile visitors leave within 5 seconds because your navigation is broken on small screens.
Website tracking answers three fundamental questions:
- Who visits your site? — Not names, but patterns: what devices they use, what countries they’re in, how they found you
- What do they do? — Which pages they view, what they click, where they drop off
- Is it working? — Are visitors doing what you want them to do — buying, signing up, contacting you?
You don’t need complex analytics. You don’t need dozens of reports. You need a clear picture of what’s happening on your site so you can make informed decisions. That’s it.
Step 1: Choose Your Analytics Tool
The first decision is which tool to use. There are plenty of options, but for privacy-first analytics, five tools stand out. Each has a different balance of simplicity, features, and cost.
| Tool | Best For | Starting Price | Self-Hosted Option | Cookie-Free | Difficulty |
|---|---|---|---|---|---|
| Plausible | Simple dashboards, content sites | $9/month | Yes (Community Edition) | Yes | Easy |
| Matomo | Full-featured analytics, e-commerce | Free (self-hosted) | Yes | Configurable | Moderate |
| Umami | Clean interface, developers | Free (self-hosted) | Yes | Yes | Easy–Moderate |
| Fathom | Privacy compliance, EU data | $14/month | No | Yes | Easy |
| GoatCounter | Personal sites, minimal tracking | Free (non-commercial) | Yes | Yes | Easy |
Not sure whether to self-host or use a cloud service? We cover that decision in detail in our self-hosted vs cloud analytics comparison.
Step 2: Install the Tracking Snippet
Once you’ve chosen a tool and created an account (or set up your server), you’ll get a small piece of JavaScript code — the tracking snippet. This goes on every page of your website.
The snippet typically looks something like this:
<script defer data-domain="yoursite.com" src="https://analytics.yoursite.com/js/script.js"></script>
Where you add it depends on your platform:
WordPress
Most privacy-first tools have WordPress plugins. For Plausible, install the official plugin from the WordPress repository. For Matomo, use the Matomo for WordPress plugin. If there’s no plugin, paste the snippet into your theme’s <head> section using a plugin like “Insert Headers and Footers” or your theme’s custom code area.
Static Sites and Custom Platforms
Add the snippet directly to your HTML template, just before the closing </head> tag. If you use a static site generator like Hugo or Jekyll, add it to your base template so it appears on every page.
Shopify, Squarespace, and Other Hosted Platforms
Look for a “Custom Code” or “Header Scripts” section in your platform’s settings. Paste the snippet there. Most platforms make this straightforward.
Verifying It Works
After adding the snippet, open your website in a new browser tab and check your analytics dashboard. You should see your own visit appear within a few seconds (for real-time tools) or a few minutes (for tools that batch process). If nothing shows up, check your browser’s developer console for errors — a mistyped domain or blocked script is the most common issue.
Step 3: Set Up UTM Parameters for Campaigns
Installing the tracking snippet gives you baseline data: pageviews, traffic sources, and visitor counts. But if you run any marketing campaigns — email newsletters, social media posts, paid ads — you need UTM parameters to tell your analytics tool where that traffic came from.
UTM parameters are tags you add to your URLs. When someone clicks a tagged link, your analytics tool captures the campaign details automatically. Instead of seeing “Twitter” as a traffic source, you’ll see “spring-sale-twitter-post-2” — far more useful.
We’ve written a complete guide on UTM parameters and how to tag every campaign. At minimum, use these three parameters on every marketing link:
utm_source— where the traffic comes from (e.g., “newsletter”, “twitter”)utm_medium— the channel type (e.g., “email”, “social”, “cpc”)utm_campaign— the specific campaign (e.g., “spring-sale-2026”)
Step 4: Build Your First Dashboard
With tracking installed and campaigns tagged, data starts flowing in. But raw data isn’t useful until you organise it into a dashboard you’ll actually check.
A good starter dashboard answers these questions at a glance:
- How many visitors came this week? — Unique visitors and pageviews
- Where did they come from? — Traffic sources and referral traffic
- What did they look at? — Top pages and entry pages
- Did they engage? — Bounce rate or engagement rate and average session duration
- Did they convert? — Goal completions (if you’ve set them up)
Most privacy-first tools give you this out of the box. Plausible’s single-page dashboard already shows all of these metrics. Matomo lets you customise widgets. Either way, resist the urge to add dozens of widgets. Start with five metrics, and add more only when you have a specific question that needs answering.
We cover this in much more detail in our guide to building your first analytics dashboard.
Step 5: Define Conversion Goals
A conversion goal is the action you want visitors to take. Without goals, analytics is just trivia — interesting numbers with no business meaning.
Common conversion goals include:
| Website Type | Primary Goal | Secondary Goals |
|---|---|---|
| E-commerce | Completed purchase | Add to cart, account creation |
| SaaS / App | Free trial signup | Pricing page visit, demo request |
| Content / Blog | Email newsletter signup | Scroll to bottom, share click |
| Local business | Contact form submission | Phone number click, directions click |
| Portfolio | Enquiry form submission | Project page views, PDF download |
In most tools, you set up goals by specifying a URL (e.g., “/thank-you” page) or an event name (e.g., “signup-click”). The tool then tracks how many visitors complete that goal and shows your conversion rate.
For a deeper dive into mapping visitor actions to real business outcomes, read From Clicks to Customers.
Step 6: Audit Your Setup
After your tracking has been running for a week, do a quick audit to make sure everything is working correctly. Here’s a simple checklist:
- Tracking snippet is on every page — check 5-10 different pages, including your homepage, a blog post, and any landing pages
- Data is flowing — your dashboard shows visitors, pageviews, and traffic sources
- UTM parameters are working — click a tagged campaign link and verify it appears in your reports
- Goals are tracking — trigger a test conversion and check if it registers
- Your own visits are excluded — most tools let you filter out your own IP or use an exclusion extension
- No duplicate tracking — check your page source to ensure the snippet isn’t loaded twice
- Privacy is handled — confirm you’re not collecting personal data without consent
If you find issues, most are easy to fix. A missing snippet on one page, a broken UTM link, a goal pointing to the wrong URL. Catching these early means your data is clean from the start.
Common Mistakes to Avoid
I’ve audited hundreds of analytics setups. These are the mistakes I see most often:
- Installing the snippet but never checking the dashboard — analytics only works if you look at it. Schedule 10 minutes every Monday to review your numbers.
- Tracking too many things — start simple. Five metrics. You can always add more later.
- Inconsistent UTM parameters — “facebook” vs “Facebook” vs “fb” creates fragmented data. Pick a naming convention and stick to it.
- Not filtering internal traffic — your team’s visits will skew your data, especially on low-traffic sites.
- Ignoring mobile — check that your tracking works on mobile devices. Some snippet placements break on mobile themes.
- No goals defined — pageviews without goals is like counting cars on a road without knowing where they’re going.
Deep Dives: Related Guides
This hub article gives you the complete picture. For detailed implementation on specific topics, explore these guides:
| Topic | Guide | What You’ll Learn |
|---|---|---|
| Campaign Tracking | UTM Parameters: How to Tag and Track Every Campaign | How to create, organise, and analyse UTM-tagged links |
| Your Dashboard | Your First Analytics Dashboard | Which metrics to display and how to read them |
| Hosting Decision | Self-Hosted vs Cloud Analytics | Costs, maintenance, and privacy trade-offs |
| Server-Side | Server-Side Tracking Explained | How to move tracking off the browser for better reliability |
| Privacy | Privacy-Compliant Tracking: A Practical Guide | How to track visitors without breaking privacy laws |
Understanding the Basics
If you’re new to analytics concepts, these foundational articles will help you understand the data your new tracking setup produces:
- What Is a Session in Web Analytics? — How visits are measured and grouped
- What Is a Unique Visitor? — How analytics tools count real people
- What Is a Pageview? — The most basic metric and why it still matters
- What Is a Traffic Source? — Understanding where your visitors come from
- Bounce Rate vs Engagement Rate — Which metric actually tells you something useful
- Understanding Referral Traffic — How to read and act on referral data
- Marketing Touchpoints — Tracking the full customer journey
Frequently Asked Questions
How long does it take to set up website tracking?
With a cloud-hosted tool like Plausible or Fathom, the basic setup takes 10–15 minutes. This includes creating an account, adding the tracking snippet, and verifying it works. Setting up UTM parameters, goals, and a proper dashboard adds another 30–60 minutes. A complete, audited setup can be done in an afternoon.
Do I need a cookie consent banner?
If you use a cookie-free analytics tool like Plausible, Fathom, or Umami, you generally don’t need a consent banner for analytics. These tools don’t use cookies or collect personal data. However, if your site has other cookies (from embedded videos, chat widgets, or marketing tools), you might still need one. See our full guide: Do you actually need a cookie banner?
Which metrics should I check first?
Start with three: unique visitors (how many people came), top pages (what they looked at), and traffic sources (how they found you). Once you’re comfortable with those, add conversion tracking. Don’t try to understand everything at once.
Can I set up tracking without knowing how to code?
Absolutely. Most privacy-first tools have WordPress plugins or simple copy-paste snippets. If you can paste text into a form field, you can install analytics. The tools themselves are designed for non-technical users — Plausible’s entire dashboard fits on one screen with no configuration needed.
Is it worth paying for analytics when free options exist?
Free self-hosted tools (Umami, GoatCounter, Matomo) are excellent if you’re comfortable managing a server. Paid cloud tools ($9–14/month) are worth it if you value simplicity and professional support. For most small businesses, $9–14/month is a minor cost compared to the insights you get. The most expensive option is having no analytics at all and making blind decisions.
The Bottom Line
Learning how to set up website tracking isn’t a one-time task — it’s the start of understanding your audience. The six steps in this guide give you a solid foundation: choose a tool, install the snippet, tag your campaigns, build a dashboard, define goals, and audit everything.
You don’t need to be a data scientist. You don’t need expensive tools. You need 15 minutes, a privacy-first analytics tool, and the willingness to look at what the numbers tell you. The insights are already there on your website. You just need to start measuring them.
Pick a tool from the comparison table above, follow the steps, and check back next Monday. I promise the numbers will surprise you — and that surprise is the first step toward making smarter decisions for your business.