Installation
The Trackelio widget is a lightweight, self-contained script that you embed on your website or application. It requires no build tools, frameworks, or external dependencies.
Adding the script
Section titled “Adding the script”Place the following <script> tag in your HTML, ideally just before the closing </body> tag:
<script src="https://widget.trackelio.com/v1/widget.js" data-project-key="YOUR_PROJECT_KEY" data-position="bottom-right" data-api-base="https://api.trackelio.com"></script>Replace YOUR_PROJECT_KEY with the key found in your workspace under Sites > Settings.
How it works
Section titled “How it works”- Auto-initialization — The widget initializes automatically on page load. No manual setup code is required.
- Zero dependencies — The script is self-contained at roughly 30KB minified. It does not pull in any external libraries.
- Shadow DOM isolation — The widget renders inside a Shadow DOM root, preventing your site’s CSS from affecting the widget and vice versa.
- Global SDK — Once loaded, the script attaches a
window.Trackelioobject that you can use to control the widget programmatically. See the SDK reference for details.
Getting your project key
Section titled “Getting your project key”- Open your Trackelio dashboard.
- Navigate to Sites in the sidebar.
- Select the site you want to add the widget to.
- Open Settings for that site.
- Copy the Project Key shown on the page.
Each site has its own project key. If you manage multiple sites in your workspace, make sure you use the correct key for each one.
Domain validation
Section titled “Domain validation”The widget only loads on domains that are explicitly allowed in your site settings. If the current domain does not match the allowed list, the script exits silently without rendering anything. Configure your allowed domains under Sites > Settings > Allowed Domains.
This prevents unauthorized use of your project key on third-party sites.
Verifying the installation
Section titled “Verifying the installation”After adding the script, open your site in a browser and confirm:
- The trigger button appears in the position you configured.
- Opening the browser console shows no Trackelio-related errors.
window.Trackeliois defined and responds to method calls such aswindow.Trackelio.open().