Get Started
SiteViews Logo

The Simplest Way to Show Page Views

Track page views and gather visitor information effortlessly with
react-siteviews
. Zero backend setup required.
React ⚛️
Next.js ⚡
TypeScript 🟦

Get Started in Minutes

Choose your preferred technology stack and start tracking page views

⚠️ SiteViews only works in production deployments — it will not track views in a local development environment.

SiteViews Counter Template

You are in Version siteviews@2.0.5

index.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>SiteViews Template</title>
  </head>
  <body>

    <div>
      <p>Views: <span id="views">Loading...</span></p>
    </div>

    <!-- include siteviews script tags  -->
    <script
      src="https://unpkg.com/siteviews@2.0.5/dist/index.js"
      type="application/javascript"
      scriptfor="siteviews"
      project-name="my-project"
      output-element-id="views"
      refresh="10"
      toast
      suppressLogs
    ></script>
  </body>
</html>

Output

Views:

About siteviews Script Attributes

AttributePriorityDescription
src*required-highCDN URL pointing to the SiteViews package. Never modify this value.
type*required-highMust be "application/javascript" so the browser executes SiteViews correctly.
scriptfor*required-highMust be set to "siteviews" so the package can locate and initialize itself.
project-name*required-lowUnique project identifier used to track and store view counts per project.
output-element-id*required-highID of the element where the view count will be rendered on the page.
refresh (Second)optionalRe-fetches the view count at a set interval. Minimum value is 10 seconds.
toastoptionalShows a toast notification only on the user's first visit. Omit if unnecessary.
suppressLogsoptionalSilences all SiteViews console logs and warnings. Recommended for production use.
If you do not provide the * marked attributes, the counter will not work correctly.

What’s new in Version 2.0.5?

  • Remvoe user-info attributes from siteviews script tags

Why Choose SiteViews?

Built for modern web applications with developer experience in mind

Zero Backend
No server setup required. Just add the script and start tracking.
Privacy First
Respects user privacy while providing essential analytics.
Developer Friendly
TypeScript support, React hooks, and modern API design.

View Your Site Stats

Enter your hostname to explore page view activity, visitor locations, and device breakdown

Alerts & Updates

Latest updates, issues & upcoming features

Announcement
Mar 2026

New: Site Stats Overview

You can now explore your page view activity directly on this site. Enter your hostname (or full URL) at the bottom of the page to see a GitHub-style heatmap, visitor breakdown by country, ISP, device, and more — all without leaving the page.

Loading...