How to Add Tracking Code to Peripheral Subdomains

To maintain a unified session and accurate cross-domain tracking, you need to deploy the Bread & Butter tracking code across all connected peripheral subdomains (e.g., support.yourdomain.com, app.yourdomain.com, shop.yourdomain.com).

Bread & Butter now uses an AI Agent to automatically discover and list your associated subdomains, eliminating the need to manually register them. You simply need to approve them and deploy the tracking code.


Here is the technical guide to configuring and deploying tracking to your subdomains.

Step 1: Approve Subdomains

Instead of manually typing in every subdomain your company uses, your Bread & Butter AI Agent automatically fetches them.

  1. Log in to your Bread & Butter dashboard.
  2. Navigate to Settings > App & Domains.
  3. Review the list of auto-detected subdomains generated by the AI Agent.
  4. Click Approve next to the subdomains you want to actively track and merge with your primary domain account.
  5. You can always add new or missing ones manually by clicking 'Create new'.

Step 2: Deploy the Tracking Code

Once approved in the dashboard, you must install the tracking logic on the destination subdomain. Choose the method that matches your environment:


If your subdomain runs on WordPress, use the official Bread & Butter plugin.

  1. On the subdomain's WordPress Admin dashboard, install and activate the Bread & Butter plugin.
  2. During the setup wizard, the plugin will automatically detect that it is operating on a subdomain.
  3. A modal titled "Merge Subdomain?" will appear, displaying your primary root domain.
  4. Click the blue Merge Accounts button. This automatically ties the subdomain's tracking events to your primary domain account without requiring manual API key configuration.

Option B: Custom/Non-WordPress Environments (Script Tag)

If your subdomain is a custom web app, React app, or runs on a non-WP CMS, you will need to use the standard JavaScript snippet.

  1. In your Bread & Butter dashboard, locate the tracking script generated for your approved subdomain.
  2. Copy the <script>  tag provided.
  3. Paste the snippet directly into the <head>  section of your subdomain's HTML code. Ensure this fires on every page route you wish to track.

For a complete list of third part apps supported and installation instructions, visit: How to Install Bread & Butter on Your Website


Step 3: Verify the Installation

Once deployed, verify that the events are passing correctly:

  1. Open an incognito browser window and navigate to your subdomain.
  2. Click through a few pages to trigger the tracking events.
  3. Return to your Bread & Butter dashboard and navigate to your Opportunities > All Traffic tab.
  4. Confirm that the traffic is actively registering under the unified account.

Note: If you accidentally select "Continue install with a separate account" during the WordPress setup, the subdomain will act as a siloed environment. To fix this, you will need to contact us to rectify the situation and Merge Accounts.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.