At Noibu, catching errors is the name of the game. When deployed properly, the NoibuJS script captures errors from the start of a page's load time. However, if the script is deployed near the bottom of your HTML body, the script may miss capturing loading issues and other errors that occur early in the page load.
To give the script the best chance at capturing errors accurately and completely, we recommend deploying the script directly in the head tag on all pages. If this is not possible, place the script as close to the top of the body as possible.
Why Script Location Matters
A webpage loads from top to bottom: It starts at the top of the HTML file and works its way down, loading everything in order until it reaches the bottom of the page. If the NoibuJS script is deployed in the body, the page could load any number of elements before the script, and if the page throws an error before the script activates, it won't be recorded. This can be a critical issue. Often, errors triggered by faulty scripts or images appear near the beginning of the page's load time, so you stand to miss a lot of important data if the NoibuJS script is deployed further down.
We understand that it's not always possible to host third-party scripts in the HTML head. In those cases, we recommend placing the script as close to the top of the body as possible, before the majority of the page loads.
Checking the Script's Location
The NoibuJS script is deployed in a <script>
tag. To determine the script's location, use your browser's developer tools to analyze the page's elements. We recommend using Chrome's DevTools, as they're easiest to understand and navigate, but any browser will do.
- Navigate to your website.
- Open the DevTools panel. The easiest method is to right-click anywhere and select Inspect. This should open the DevTools on the Elements tab.
- Hit
CTRL-F
orCommand-F
and type noibu in the search box. This will bring you to the tag that houses the NoibuJS script.
- Note the breadcrumb tags under the
script
line.
- If the tags include
html head
, the script is deployed to the head of the page. This indicates the script loads early and has the best possible chance of capturing most errors. - If the tags include
html body
, the script is deployed somewhere in the body. This indicates that many page elements may load before the script, which may result in the script missing errors.
- If the tags include
Visit our Tag Implementation Guides for a closer look at this process.