Skip to content
Documentation menu: Installation

Install in 2 minutes

Add theBizness.ai analytics to your website with our lightweight, privacy-focused tracking script. Choose your platform below for step-by-step instructions.

Lightweight

About 5 KB gzipped

Privacy controls

Privacy mode in your dashboard

Universal

Any site that can add a script tag

Universal installation

This code works on any website. Add it to the head of your HTML.

<script
  defer
  data-website-id="your-website-id"
  data-domain="yourdomain.com"
  src="https://thebizness.ai/js/script.js">
</script>
Start free trial

Card required. Charged when your 7-day trial ends unless you cancel first. One trial per customer.

Platform guides

6 guides

Next.js

Easy
2 min
Next.js applications using the App Router or the Pages Router
App Router and Pages Router
Environment variables
Proxy setup

React

Easy
3 min
Pure React applications and SPAs
useEffect integration
react-helmet-async
Reusable hook and component

Vue.js

Easy
3 min
Vue 2 and Vue 3 applications
Composition API
Options API
Lifecycle management

WordPress

Easy
2 min
WordPress themes and plugins
Theme integration
Plugin support
Update-safe methods

Laravel

Medium
5 min
Laravel applications with Blade templates
Blade integration
Environment variables
Middleware support

Django

Medium
5 min
Python Django web applications
Template integration
Settings config
Custom tags

Other platforms

These platforms have no full guide yet. They only need the universal script tag from above in the head of every page.
  • Google Tag Manager

    1. Open your container and choose Add a new tag.
    2. Choose Custom HTML as the tag type and paste the script tag.
    3. Set the trigger to All Pages, name the tag, then save and publish the container.
  • Webflow

    1. Open Project Settings and choose the Custom Code tab.
    2. Paste the script tag in the Head Code section.
    3. Save the settings and publish your site.
  • Ghost

    1. In Ghost Admin, open Settings and choose Code Injection.
    2. Paste the script tag in the Site Header section and save.
  • Shopify

    1. Open Online Store, then Themes, then Actions and Edit code.
    2. In the Layout folder, open theme.liquid and paste the script tag just before the closing head tag. Use {{ shop.domain }} as the data-domain value.
    3. Save the file.

Your dashboard shows the same instructions with your website ID and domain already filled in (on the Configure page).

Script attributes

Everything the script reads from its own tag
  • data-website-id Required. Your website ID. Without it the script does nothing.
  • data-domain Your website's domain. Recommended: it is used to tell internal navigation from external referrers. Sites on shared hosting domains (vercel.app, github.io and similar) are treated per project, not per platform: my-app.vercel.app and other-project.vercel.app are different sites.
  • data-cookie-domain Optional. A parent domain such as example.com. The visitor and session cookies are then shared across its subdomains, so a visitor who moves between www, shop and app stays one visitor. Without it the cookies belong to the exact host. The value is ignored unless the page is on that domain and the browser accepts a cookie for it.
  • data-hash-routing Optional. true also counts fragment routes without a slash, such as #about, as pageviews; false counts no fragments. By default only route-like fragments such as #/pricing are counted. A route without a slash is reported with one (#about appears as /#/about in your reports). Fragments that contain = or & or are longer than 100 characters are never counted, and the query inside a route is never sent.
  • data-debug Optional. true logs what the script sends and why an event was not recorded (for example origin_not_allowed or plan_limit) in the browser console.

Advanced installation

Proxy setup

Route the script and its requests through your own domain, which reduces the number of requests that ad blockers block.
  • Served from your own domain, so it is less likely to be blocked
  • First-party request path
  • Any reverse proxy must forward all of /api/events/*, including the conversion paths, must keep the visitor's Origin or Referer header, and should remove the Cookie and Authorization headers before forwarding. All visitors then reach us from your proxy's address, so the per-address rate limits apply to your site as a whole. The Next.js guide lists the proxy recipes for Next.js middleware, nginx and Cloudflare Workers.
Learn about proxying

Custom domain setup

Serve the script from a subdomain you control, through a reverse proxy you host.
  • analytics.yourdomain.com
  • Requires a DNS record and a TLS certificate on your domain
See the proxy guide

Frequently asked questions

How much does the script impact page speed?

The script is about 5 KB gzipped and loads without blocking the page, so its effect on page load is small.

Does the script set cookies?

Yes. It sets two first-party cookies on your domain: thebizness_visitor_id (365 days) and thebizness_session_id (one hour after the last tracked activity). They belong to the exact host unless you set data-cookie-domain to share them across your subdomains. It also uses localStorage (thebizness_utm and thebizness_referrer_data) for UTM and referrer data used for attribution for up to 30 days (the entry stays in the browser until it is replaced or cleared). Safari (macOS and iOS) and Brave cap cookies written by JavaScript at about 7 days, and Safari also clears localStorage after 7 days without a visit, so visitors who return later in those browsers can show as new visitors. The proxy setup does not lift this. It sets no third-party cookies.

Can I track multiple websites?

Yes, each website gets its own unique tracking ID. You can manage multiple sites from one dashboard.

Does my site need a Content-Security-Policy change?

Only if your site sends a Content-Security-Policy header. Allow https://thebizness.ai in script-src (to load the script) and connect-src (to send data). An inline window.thebizness stub needs a nonce or hash under script-src. The proxy setup needs only 'self'.

Does the script collect personal data?

It does not store IP addresses with events. It stores persistent visitor and session IDs with each event. Whether you need consent before the script runs depends on your jurisdiction, and that decision is yours. See the privacy guide for details.

What about ad blockers?

Some ad blockers block the standard script. The proxy setup serves it from your own domain, which reduces that blocking. Conversion tracking needs the conversion paths proxied too; the proxy setup in the Next.js guide covers them.

Need help with installation?

Email us at [email protected] and we'll help you get set up.

Card required. Charged when your 7-day trial ends unless you cancel first. One trial per customer.