Install on Django

Create or select your website in Seean, then copy its snippet from Settings → Installation. Replace YOUR_SITE_TOKEN below with that website’s public token. Keep the external script and both data attributes; never put a server order API secret in this code.

Add to the shared HTML template

Find the template that owns your document’s <head>, often templates/base.html. Paste the tag before its existing closing </head>:

<script defer src="https://app.seean.io/k.js"
  data-site="YOUR_SITE_TOKEN"
  data-api="https://app.seean.io"></script>

Templates using {% extends "base.html" %} inherit that document. If your project has multiple base templates, cover each relevant one once. Keep the tag outside an overridable block unless child templates preserve the parent content. Django template inheritance.

This measures browser pages, not Django server requests, background jobs or API calls. For an API-only Django backend with a separate React/Vue frontend, install in that frontend’s HTML document instead.

Deploy and local testing

Deploy your template change through the project’s existing process. For localhost or 127.0.0.1 development, add data-local to the tag and use a separate Seean test website. This attribute does not override privacy or automation exclusions. Do not commit a server revenue key into a template.

If your CSP limits external scripts or collection requests, allow the script and collector origins used in your generated snippet. Check browser CSP errors rather than disabling the site’s policy wholesale.

Verify rendered pages

Test pages from each base template, including authenticated pages only where your own policy permits analytics. Server-side redirects do not emit pageviews on their own; the browser document must actually load and execute the tag.

Open the published site in a browser and follow installation verification: confirm k.js loads, a collection request is sent, and the correct website and paths appear in Events. Check a direct page load, a link to a different pathname, and Back/Forward. Setup health shows the last received pageview time and offers a published-homepage check; it does not certify every page.

If events are missing, check the published HTML, consent settings, content blockers, CSP and exclusions. Install the tracker only once: a second tag, plugin or tag-manager installation can double count. Supported pathname navigation is automatic; do not add another pageview tag for every history change. Hash-only changes are not distinct pages.

Changes and removal

To change the site token, update this installation and publish again. To stop future collection, remove the same tag and publish; existing reports remain. Recheck installation after platform, theme or routing changes.

See script options, custom events and technical privacy. Loading this script must follow your site’s analytics-consent policy; a platform cookie banner does not necessarily control custom code automatically.

Something unclear? Contact support.