WordPress Installation
Install Jetrack on your WordPress website
There are several ways to add Jetrack to your WordPress site. Choose the method that works best for you.
Method 1: Using a Plugin (Recommended for Beginners)
The easiest way to add the tracking script without touching code.
Steps
- Install the Insert Headers and Footers plugin from the WordPress plugin directory
- Go to Settings → Insert Headers and Footers
- Paste your BrandJet tracking script in the Scripts in Header section
- Click Save
Your tracking script will now load on all pages of your WordPress site.
Method 2: Theme Editor (For Developers)
Edit your theme files directly to add the tracking script.
Steps
- Go to Appearance → Theme Editor
- Select header.php from the right sidebar
- Find the
</head>closing tag - Paste your tracking script just before
</head> - Click Update File
<!-- Jetrack -->
<script
async
defer
data-website-id="your-unique-id"
src="https://analytics.brandjet.ai/script.js">
</script>
</head>Warning: Changes may be lost when updating your theme. Consider using a child theme.
Method 3: functions.php (Best for Child Themes)
Add the tracking script programmatically using WordPress hooks.
Steps
- Go to Appearance → Theme Editor
- Select functions.php from the right sidebar
- Add this code at the end:
function brandjet_analytics() {
?>
<script
async
defer
data-website-id="your-unique-id"
src="https://analytics.brandjet.ai/script.js">
</script>
<?php
}
add_action('wp_head', 'brandjet_analytics');- Click Update File
This method survives theme updates if using a child theme.
Method 4: wp_head Hook in Child Theme
For child theme users, add to your child theme's functions.php:
// Add Jetrack
add_action('wp_head', function() {
echo '<script async defer data-website-id="your-unique-id" src="https://analytics.brandjet.ai/script.js"></script>';
});WooCommerce Support
BrandJet automatically tracks all WooCommerce pages including:
- Product pages
- Category pages
- Cart and checkout pages
- Account pages
No additional configuration needed!
Multisite WordPress
For WordPress Multisite installations:
- Network-wide tracking: Add the script using Method 3 in your network-activated theme
- Per-site tracking: Create separate websites in BrandJet for each subsite and use different tracking scripts
Page Builders
BrandJet works perfectly with all major WordPress page builders:
- Elementor
- Divi
- Beaver Builder
- WPBakery
- Gutenberg
Simply install using any method above - the tracking script will work across all pages.
Testing Your Installation
- Install the tracking script using your preferred method
- Visit your WordPress site in a browser
- Open Developer Tools (F12)
- Go to the Network tab
- Refresh the page
- Look for a request to
script.jsfromanalytics.brandjet.ai - Check your BrandJet dashboard for visitor data
Troubleshooting
Script Not Loading
- Clear your WordPress cache (if using a caching plugin)
- Clear your browser cache
- Verify the script appears in your page source (View Page Source)
- Check that your website ID is correct
Caching Plugins
If using caching plugins like WP Super Cache or W3 Total Cache:
- Clear your cache after installing the script
- Make sure the cache includes the new header code
Theme Updates
- Use a child theme to prevent losing customizations
- Or use Method 1 (plugin) which survives theme updates
Recommended Plugins
These plugins work great with Jetrack:
- Insert Headers and Footers - Easy script management
- WP Rocket - Caching (compatible with BrandJet)
- Yoast SEO - SEO optimization