# Count pageviews with LopeBase

> Add one tag to a site and LopeBase counts its pageviews, visits, pages, and sources itself, with no cookies and no visitor ids.

Source: https://lopebase.com/docs/pageviews
Updated: 2026-10-08
Open in the app: https://app.lopebase.com/analytics

You do not need PostHog, Google Analytics, or Plausible to see pageviews in LopeBase. One tag, and LopeBase counts them itself: pages, visit sources, and visits, with no cookies and no visitor id, working alongside anything else you already have connected.

## Add the tag

1. **Open Analytics:** Under "Pageviews counted by LopeBase" for a property with no hits yet, copy its tag. [Open Analytics](https://app.lopebase.com/analytics)
2. **Add it to your site:** Put the tag once in the layout every page shares, inside ``, however your framework does that: `app/layout.tsx` for Next.js's app router, `pages/_document.tsx` for its pages router, the shared layout for Astro, `src/app.html` for SvelteKit, and so on. There is also a ready-made prompt for your coding agent to do this for you.
3. **Deploy and check:** Numbers show on Analytics within a minute of the first visit after you deploy.

> **Tip:** The tag looks like this, with your property's own key: ``

## How it counts

Each page load sends one hit, and so does every page change inside a single-page app, without a full reload. The visit's source (a search engine, a link, or a UTM parameter) is kept only in that browser tab's `sessionStorage` for the rest of the visit, never in a cookie, and no visitor id is ever set. Hits are only accepted from the property's own site address, using a key that names the property but carries no secret.

Because there is no cookie and nothing to consent to, pageviews counted this way need no cookie banner, and the ad blockers that hide other analytics tools rarely block it.

## What you see

Once hits arrive, Analytics shows pageviews and visits over the last 30 days, pages per visit, your top traffic source, a daily chart, and breakdowns of top pages and sources, the same shape as any other analytics source LopeBase reads.

## With or without the adapter

Pageviews work whether or not a property has the [LopeBase Adapter](https://lopebase.com/docs/lopebase-adapter) installed. With both, LopeBase can show which pages and sources bring in the signups your adapter reports from your own database.

## Where to go next

- [Connect your tools](https://lopebase.com/docs/connections) for PostHog, Google Analytics, or Plausible if you already use one of them.
- [Analytics](https://lopebase.com/docs/analytics) for everything else the page shows.
- [Install the LopeBase Adapter](https://lopebase.com/docs/lopebase-adapter) to pair pageviews with your own signups.

## If something goes wrong

### No numbers show up after adding the tag

Check that the tag is on every page, inside the shared layout rather than just one page, and that you deployed after adding it. It can take a minute after the first real visit for numbers to appear.

### Add LopeBase's site address on the property first

The property needs a site address before LopeBase can issue it a tag. Add one on the property's own page, then come back to Analytics.

### Will this need a cookie banner?

No. It sets no cookie and no visitor id, so there is nothing that needs consent.

### Can I use this alongside PostHog or Google Analytics?

Yes. It runs independently of any other analytics connection; Analytics shows each source's numbers in its own row.
