Static HTML Installation
Install Jetrack on traditional HTML websites
For traditional HTML websites, adding Jetrack is straightforward.
Basic Installation
Add the tracking script to the <head> section of every page you want to track:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your Page Title</title>
<!-- Jetrack -->
<script
async
defer
data-website-id="your-unique-id"
src="https://analytics.brandjet.ai/script.js">
</script>
</head>
<body>
<h1>Your content here</h1>
</body>
</html>Using Templates or Includes
If your site uses a template system or server-side includes, add the script to your header template once:
PHP Includes
header.php:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php echo $pageTitle; ?></title>
<!-- Jetrack -->
<script
async
defer
data-website-id="your-unique-id"
src="https://analytics.brandjet.ai/script.js">
</script>
</head>
<body>index.php:
<?php
$pageTitle = "Home";
include 'header.php';
?>
<h1>Welcome</h1>
<?php include 'footer.php'; ?>Apache SSI (Server Side Includes)
header.html:
<head>
<meta charset="UTF-8">
<title>My Site</title>
<!-- Jetrack -->
<script
async
defer
data-website-id="your-unique-id"
src="https://analytics.brandjet.ai/script.js">
</script>
</head>index.html:
<!DOCTYPE html>
<html lang="en">
<!--#include virtual="/includes/header.html" -->
<body>
<h1>Content</h1>
</body>
</html>Nginx SSI
Similar to Apache SSI, enable SSI in your nginx config:
location / {
ssi on;
}Then use includes in your HTML files.
Static Site Generators
If you're using a static site generator like:
- Jekyll - Add to
_includes/head.html - Hugo - Add to
layouts/partials/head.html - 11ty - Add to
_includes/head.njk - Pelican - Add to
templates/base.html
Check your specific generator's documentation for including scripts in the head section.
Single Page Websites
For simple one-page websites, just add the script once in the <head>:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Landing Page</title>
<script
async
defer
data-website-id="your-unique-id"
src="https://analytics.brandjet.ai/script.js">
</script>
</head>
<body>
<section id="home">...</section>
<section id="about">...</section>
<section id="contact">...</section>
</body>
</html>Multiple Pages Without Templates
If you have multiple pages without a template system:
- Create a snippet file with your tracking script
- Copy and paste it into each HTML file's
<head> - Keep the snippet file for future pages
Or use a find-and-replace tool to add it to all files at once.
File Structure Example
my-website/
├── index.html
├── about.html
├── contact.html
├── services.html
└── css/
└── style.cssEach HTML file should include the tracking script in its <head>.
Testing
- Add the tracking script to your HTML files
- Upload files to your web server
- Visit your website in a browser
- Open Developer Tools (F12) → Network tab
- Look for
script.jsfromanalytics.brandjet.ai - Check your BrandJet dashboard for visitor data
Troubleshooting
Script Not Loading
- Check that the script is in the
<head>section - Verify the
srcURL:https://analytics.brandjet.ai/script.js - Ensure your website ID is correct
- Clear browser cache and try again
Tracking on Localhost
To test on your local machine:
- Go to your BrandJet dashboard
- Navigate to Settings → General
- Enable "Allow localhost debugging"
- Copy the updated script (includes
data-allow-localhost="true") - Use this script for local testing
Missing from Some Pages
- Verify the script is in every HTML file you want to track
- Use templates/includes to manage the script in one place
- Check page source to confirm script is present
Best Practices
- Always place the script in the
<head>section - Add it before other custom scripts when possible
- Use the
asyncanddeferattributes for better performance - Keep a master copy of the script for new pages
Minification & Build Tools
If using build tools to minify HTML:
- The tracking script should remain in the final output
- Verify the script attributes (
async,defer,data-website-id) are preserved - Test the build output to ensure tracking works