Skip to content
BonicBD
Documentation Getting Started

Install the BonicBD snippets on your site

BonicBD generates three snippets per container. The first two are standard Google Tag Manager loader code. The third is the integrated tracker, which handles identity, click-ID capture, UTM storage, and event de-duplication. They belong in different positions, and a snippet in the wrong position fails quietly.

Before you begin

  • A verified tracking hostname for this container.
  • Access to your site template or a header-and-footer injection plugin.
  • The current Dashboard Setup Guide open for your account-specific values.

1. The three snippets and where each goes

The head snippet is the Google Tag Manager loader and belongs at the very top of the <head> element, before any other tag that might need it. The body snippet is the noscript fallback and belongs immediately after the opening <body> tag. The integrated tracker is a separate first-party script that loads from your own tracking subdomain and carries the identity and click-ID logic.

Copy the values from the Dashboard Setup Guide rather than typing them by hand. The snippet URLs are generated per container, so a snippet copied from another account points at the wrong endpoint.

  • Head loader — top of <head>, on every page of the site
  • Body noscript — immediately after the opening <body> tag
  • Integrated tracker — loaded on the same pages as the loader

2. WordPress and WooCommerce

If the BonicBD WordPress plugin is installed and configured, it already places the loader and tracker — do not also paste the manual snippets, or the page will carry two loaders. Use the manual path below only when you are not using the BonicBD plugin. If another GTM plugin (such as GTM4WP) already injects a web-container loader, keep one loader per container and check the page source for duplicates.

On the manual path, use a header-and-footer injection plugin (such as Insert Headers and Footers) or your theme’s custom code area. Paste the head snippet into the header injection field and the body snippet plus the integrated tracker into the footer injection field — the noscript fallback works from the footer, though placing it immediately after the opening body tag is the canonical position when you can edit the template. Verify on a real product page and on the checkout page, because a store theme can inject scripts differently on those two templates.

3. Shopify, custom themes, and other stacks

On Shopify, place the snippets through the theme’s custom code settings for the same three positions. On a custom theme, paste the head snippet into the shared layout template that every page renders, so the tracker is not missing from one template.

If a site has a content security policy, the tracking hostname has to be allowed for scripts and connections. A blocked script produces a CSP violation in the browser console and no BonicBD requests at all.

Note: If your site is behind a security plugin or a CDN, confirm that the tracking hostname is not being rewritten or deferred in a way that moves the script after the events it should capture.

4. Verify each snippet loads from your own hostname

Open your site in a browser, open the Network panel, filter for your tracking hostname, and reload. You should see requests to your own subdomain for the loader and the integrated tracker. Requests going to a shared BonicBD domain, or no requests at all, mean the snippet is missing, in the wrong position, or blocked.

In the BonicBD realtime view, a single page load should produce a visible collection event. If the browser shows the request but BonicBD shows nothing, the problem is at the collection boundary rather than in the snippet placement.

  1. Open the site and the browser Network panel
  2. Filter by your tracking hostname and reload the page
  3. Confirm the loader and integrated tracker both request from your hostname
  4. Confirm a page-load event appears in the BonicBD realtime view

Reviewed against the BonicBD documentation source on 2026-11-07. Dashboard labels can change; follow the current setup guide shown in your account.