Skip to main content
Use this installation only when the website does not bundle a JavaScript application. The browser script records a page view each time the browser loads a document.

Add the script once

Select the intended store, then open Bily > Settings > Apps > More settings > Install tracking and choose HTML. Copy the exact raw script into the global <head> for your site.
index.html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Everyday Store</title>
    <script
      src="https://tracking.example.com/b.js?shop=store.example.com"
      referrerpolicy="strict-origin-when-cross-origin"
    ></script>
  </head>
  <body>
    <h1>Everyday Store</h1>
  </body>
</html>
Copy the exact src value from Bily. Do not shorten it to an origin, append a new path, remove query parameters, or decode encoded characters.

Confirm each document includes it once

Templated sites should place the script in the shared layout. Do not paste another copy into individual pages. Each full document load records its initial PageView automatically. Do not add another manual page-view call.

Applications that change routes in the browser

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

Content security policy

If your policy requires a script nonce, render the nonce that your server created on this script element. Keep the src unchanged.
<script
  nonce="SERVER_GENERATED_NONCE"
  src="https://tracking.example.com/b.js?shop=store.example.com"
  referrerpolicy="strict-origin-when-cross-origin"
></script>

Verify the installation

Confirm one initial page view and one script request per document.