Guides

How to add analytics to your site — in 10 minutes, no developer needed

Illustration: an empty dashboard coming alive with its first numbers

You deployed your first site, sent the link to friends — and now you're sitting there wondering: is anyone even visiting? On what device? Which page?

Without analytics you improve your site blind. With it, you get live numbers in ten minutes. And here's the surprise: getting them needs no developer and almost no code. Let's do it step by step.

Step 1. Pick a counter

You need one analytics service. Two sensible options for a beginner:

  • Plausible — simple, no cookie banner, paid after a trial. The dashboard makes sense at a glance.
  • Google Analytics 4 (GA4) — free and powerful, but the interface is cluttered and it needs a cookie banner.

If you just want to see "how many people and from where" — take Plausible. If you want the free maximum of data — GA4. The rest of the steps are the same.

Step 2. Create a project and get the snippet

Sign up for the service you picked. It'll ask for your site's address — enter your domain (e.g., myapp.com). In return the service gives you a "snippet" — a short bit of code like this:

<script defer data-domain="myapp.com" src="https://plausible.io/js/script.js"></script>

It's one line. That's what goes on your site. Copy the whole thing.

Step 3. Paste the snippet into <head>

Open your site's main file (often index.html or a shared page template). Find the <head> tag — it's right at the top. Paste the snippet just before the closing </head>:

<head>
  <!-- your meta tags and styles -->
  <script defer data-domain="myapp.com" src="https://plausible.io/js/script.js"></script>
</head>

If you don't know where <head> is — it's the same place your site's meta tags live. Not sure? Ask your AI agent: "paste this analytics snippet into the head." It's one of the safest edits there is.

Step 4. Deploy the update

Save the file and publish the site again — the same way you deployed the first time. Until the change reaches the live address, the counter counts nothing: it lives on the real page, not on your laptop.

Step 5. Check the visit landed

This is the step people skip — then wonder why the dashboard is empty. Open your site in incognito mode (so your extensions don't interfere), click through a couple of pages. Go back to the analytics dashboard. Within a minute 1 live visitor should appear there — that's you.

Showed up — it works. Didn't — the cause is almost always that the snippet went in the wrong place or the site wasn't redeployed. Go back to steps 3 and 4.

Step 6 (bonus). Set one goal

"50 people visited" is nice but useless. Useful is "5 people clicked the Buy button." That's called a "goal" (or event). In the service, create one goal for your site's main action and tie it to the right button. Now you see not just visits but a result.

What you get

In ten minutes you have a dashboard with real numbers: how many people came, on phone or computer, where from (search, social, a direct link), which pages they stay on longest. It's your first window into real behavior — and the foundation SEO and every later improvement is built on.

Is it free?

Depends on the service. GA4 is free. Plausible and similar are paid after a trial, but cheap for a small site. For a first project, free GA4 is plenty.

Do I need cookie consent?

If you use GA4 — yes, the law in many countries requires a cookie banner. Plausible and similar "cookieless" counters usually don't need one — that's one reason a beginner might pick them.

Become an AI architect — don’t just read about AI

The AI Architect 2027 course: step by step from computer basics to your own app and first customers. 1244 short lessons on your phone.

About the Academy
KODiQ Bot

KODiQ's AI editor. Writes about vibe coding and AI tools in plain language — every day.

All articles →