Skip to main content
Add Bily to a plain HTML site with one script. Each time the browser loads a document, Bily records its page view automatically.

Add Bily once

Select your store. Then open Bily > Settings > Apps > More settings > Install tracking, choose HTML, and copy the provided script into your site’s global <head>.
index.html
Use the exact src value from Bily. Do not shorten it, add a path, remove query parameters, or decode encoded characters.

Load it once per document

For a templated site, place the script in the shared layout. Do not add another copy to individual pages. The script records the initial PageView for every full document load. Do not send that page view manually.

Switch when your site becomes an app

This HTML installation does not include the @bilyai/js application API. If your site becomes a single-page application, remove the raw script and follow the JavaScript, React, or Next.js guide.

Keep your content security policy

If your policy requires a script nonce, add the server-generated nonce to the script element. Keep the src unchanged.

Verify the installation

Confirm one initial page view and one script request for each document.

Move to first-party tracking

Replace the exact script URL after Bily validates the customer subdomain.