Installation
We’ve made the installation process as simple as possible to minimize setup time and avoid headaches.
Just follow these three steps:
- Create an API key
- Add a
<script />
tag to your site - Optional, host a JS file.
1. Create an API key
If your organization has been created on our platform but hasn’t received any sessions yet, a setup page will be available in the sidebar. Use this page to create an API key.
If sessions have already started flowing in, navigate to Settings, find your domain, and manage your API keys there.
2. Add the <script />
tag
Add the following script snippet to your site’s <head>
section:
<script
async
src="https://cdn.byteboost.io/v1beta/repo/inspector/main.js"
data-byteboost-key="YOUR_API_KEY"
></script>
Consider removing the "async" attribute to reduce events lost before the package has been loaded. Read more on MDN
Replace "YOUR_API_KEY"
with the key you created in the previous step.
3. (Optional) Host a JS file.
We allow you to use a Service Worker to provide additional insights into network requests. Skipping this step won’t affect core functionality.
-
Create a JavaScript file in your project’s file system so it is accessible at:
https://www.youdomain.com/byteboost.js
. -
Populate the file with the following code
importScripts("https://cdn.byteboost.io/v1beta/repo/inspector/byteboost.js")`;
That's it!
You’ve successfully installed Byteboost on your site! 🎉
You can confirm the installation by running the following in your browser’s console:
byteboost.debug();
This will enter debug mode, which will start logging all events coming in and out of the event bus.
If you have any questions or run into issues, feel free to reach out:
- Email us: [email protected]
- Chat with us: byteboost.io