Script tag (HTML)

To add Toolbird Analytics in plain HTML you can add our script. This script should be added to the <head> part of your website:

<script src="https://api.toolbird.io/js/script.js" data-domain="yourdomain.com"></script>

Remember to change the `data-domain` to the domain of your website.

When added you should be able to see the data come in on the Dashboard. Toolbird will not track events coming from other websites than the one specified on the Dashboard. This means you cannot test it using localhost

Next Steps

To get the most out of Toolbird Analytics, we recommend to look at event tracking. These will allow you to do stuff like tracking conversion rates: Event Tracking with Script Tag

When the Script have been initialised you will have access to the `window.toolbird` property. This lets you access the same functions as the JavaScript Package.

// Basic Event Tracking
window.toolbird.track("Sign up")

// Include properties
window.toolbird.track("cta_clicked", {
    position: "hero",
    color: "purple"
})

// Maybe affilate tracking?
window.toolbird.track("affiliate_link", {
    affliateId: "EHJ42HD"
})

Last updated