Get started

Step 1 - Add website

To start tracking analytics for your website, first log in to your dashboard and add the website's domain.

Step 2 - Add code snippet

To add analytics to your website, add the following script tag to the <head>...</head> section of your website's HTML.

<script defer src="https://analytics.ritiksharma.me/script.js"></script>

Make sure to include the async or defer attribute. It allows your page to load without waiting for the script.

Note: The script will only collect data when accessed from the domain you registered in Step 1. It will ignore data from development environments like localhost

For static websites, the script must be included on every page you want to track.

For single page applications, add the analytics script to your HTML file or your application’s layout once. (e.g. Next.js)

<head>
  <Script
    src="https://analytics.ritiksharma.me/script.js"
    strategy="afterInteractive"
  />
</head>

Step 3 - Check the script

Once you add the script to your site, reload the deployed site’s page with the script to ensure it sends the first page view.

Go to the dashboard/:siteId to verify that the page view has been sent and is displayed on the charts.