Install Bread & Butter with the JavaScript Snippet
For websites running on custom HTML, or a proprietary web app that doesn't match one of our platform-specific guides, Bread & Butter provides a lightweight JavaScript tracking snippet. This is a browser-side tracking method: it delivers powerful visitor identification and journey tracking, but like any client-side script, it's subject to the standard limitations of modern browser privacy settings and ad blockers.
In short: if your site doesn't run on a platform we have a dedicated guide for, this generic JavaScript snippet is your install path. It goes in your site's
<head>, the same place you'd add Google Analytics or a similar tracking tool.
Important note for WordPress users: if your primary root domain runs on WordPress, use the native Bread & Butter WordPress plugin instead of this snippet. See our WordPress plugin installation guide for those steps. The plugin unlocks server-side tracking, which is more resistant to ad blockers and browser privacy settings than a browser-side script. The exception is a peripheral subdomain that doesn't run on WordPress itself (for example a support or app subdomain), where this JavaScript snippet is the right tool to unify tracking across your whole ecosystem.
Installation Steps
Step 1: Get your tracking script
- Log into your Bread & Butter Dashboard
- Go to Settings > App & Domains
- Add your subdomain or custom domain
- Copy the JavaScript tracking snippet provided (it includes your unique App ID)
Recommended: Install via Google Tag Manager
If you're already using Google Tag Manager on your site, this is the easiest and most reliable way to install Bread & Butter, and it's the method we recommend. See our full Google Tag Manager installation guide for more detail.
Step 2: Add the script as a GTM tag
- In your GTM container, create a new tag and choose Custom HTML
- Paste the Bread & Butter tracking snippet into the tag
- Set the trigger to All Pages
- Save and Submit to publish the container
Step 3: Confirm it's working
- Open your live site in a new browser or incognito window
- Return to your Bread & Butter Dashboard and confirm visitor data is coming in
Alternative: Manual install
If you're not using Google Tag Manager, add the script directly to your site.
Step 2: Add the script to your site
- Open your site's source or theme editor
- Locate the global
<head>section (for exampletheme.liquid,header.php, or a global site settings area, depending on your platform) - Paste the tracking script as high in the
<head>as possible - Save and publish
Step 3: Confirm it's working
- Open your live site in a new browser or incognito window
- Return to your Bread & Butter Dashboard and confirm visitor data is coming in
Troubleshooting: If data isn't showing up, double-check that your App ID in the script matches your dashboard, and confirm your live URL is listed under Settings > Advanced Settings > Website Domains.