Install on your platform
Snippets for Next.js, React, Vue, WordPress, Shopify, Webflow, Framer, and Google Tag Manager.
Pick your platform below. Each snippet is the same tracker, reframed for where that platform expects custom code. Replace yourdomain.com with your site's domain.
<script defer src="https://websight.srexrg.me/t.js" data-site="yourdomain.com"></script>Paste inside your <head>, before the closing tag.
import Script from "next/script";
// in app/layout.tsx <head> or root layout
<Script defer src="https://websight.srexrg.me/t.js" data-site="yourdomain.com" />Use next/script with the defer strategy in your root layout.
<!-- public/index.html, inside <head> -->
<script defer src="https://websight.srexrg.me/t.js" data-site="yourdomain.com"></script>Add to index.html so it loads once, outside the React tree.
<!-- index.html, inside <head> -->
<script defer src="https://websight.srexrg.me/t.js" data-site="yourdomain.com"></script>Add to index.html in your project root.
<script defer src="https://websight.srexrg.me/t.js" data-site="yourdomain.com"></script>Paste into your theme's header.php before </head>, or use a "header scripts" plugin (e.g. WPCode). No plugin required.
<script defer src="https://websight.srexrg.me/t.js" data-site="yourdomain.com"></script>Online Store → Themes → Edit code → layout/theme.liquid, before </head>.
<script defer src="https://websight.srexrg.me/t.js" data-site="yourdomain.com"></script>Project Settings → Custom Code → Head Code. Publish to apply.
<script defer src="https://websight.srexrg.me/t.js" data-site="yourdomain.com"></script>Site Settings → General → Custom Code → End of <head> tag.
<script defer src="https://websight.srexrg.me/t.js" data-site="yourdomain.com"></script>New Tag → Custom HTML, paste the snippet, trigger on All Pages. Prefer direct install if possible (GTM adds latency).
Single-page apps
Route changes are tracked automatically. The tracker patches the History API (pushState and replaceState) and listens for popstate, so client-side navigations count as pageviews with no extra setup. If your app uses a hash router, add data-hash to the snippet so hashchange navigations are tracked too. See the script reference for every attribute.
Behind an adblocker?
Adblockers can block third-party analytics domains. Serve the tracker from your own domain to make requests same-origin and unblockable. See Adblockers for the one-rule proxy setup.