Add Datrika to your site

Datrika works on any website. All it needs is one tracking script in the head of every page.

Replace YOUR_SITE_ID with your site ID in Datrika. Copy the script with the ID filled in from your site settings, on the General tab.

Add the script

Paste the script into the <head> of every page you want to track. If your site has a shared template or header, pasting it there once is enough.

index.html

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>My website</title>
    <script defer
      src="https://cdn.datrika.app/da.js"
      data-datrika
      data-site-id="YOUR_SITE_ID">
    </script>
  </head>
  <body>
    <h1>Hello!</h1>
  </body>
</html>

Done? Open your site in a browser - the setup guide in Datrika picks up the first visit and takes you to your dashboard.