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>Card required. Charged when your 7-day trial ends unless you cancel first. One trial per customer.
Platform guides
Next.js
React
Vue.js
WordPress
Laravel
Django
Other platforms
Google Tag Manager
- Open your container and choose Add a new tag.
- Choose Custom HTML as the tag type and paste the script tag.
- Set the trigger to All Pages, name the tag, then save and publish the container.
Webflow
- Open Project Settings and choose the Custom Code tab.
- Paste the script tag in the Head Code section.
- Save the settings and publish your site.
Ghost
- In Ghost Admin, open Settings and choose Code Injection.
- Paste the script tag in the Site Header section and save.
Shopify
- Open Online Store, then Themes, then Actions and Edit code.
- 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.
- Save the file.
Your dashboard shows the same instructions with your website ID and domain already filled in (on the Configure page).
Script attributes
data-website-idRequired. Your website ID. Without it the script does nothing.data-domainYour 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-domainOptional. 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-routingOptional. 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-debugOptional. 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
- 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.
Custom domain setup
- analytics.yourdomain.com
- Requires a DNS record and a TLS certificate on your domain
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.