Website Analytics & Events

Page views, sessions, and custom events from your site.

One script tag. No site token and no server code. Do not rebuild visit or page-view tracking; the script already does it.

When to use this vs REST

Use the loader to send page views and events from a website. There is no separate REST event API.

Do not rebuild

  • Session tracking or page view collection.

Drop-in

No token and no server code. Same loader as chat, with data-site-id. Events feed the Websites hub and automation. No embed JWT.

<script src="https://webforms.dropcowboy.com/latest/dropcowboy-loader.min.js"
        data-site-id="YOUR_SITE_ID"
        defer></script>
<script>
// The loader is deferred, so call it once the page has parsed.
document.addEventListener('DOMContentLoaded', function () {
  DropCowboy.track('signup_started', { plan: 'pro' });
});
</script>

JS API / HTML tag

Method What it does
DropCowboy.track(name, props) Records a custom event on this site.

Auth and scopes

Site-scoped (Origin enforced)

Limits

  • The loader only runs on origins allowed for the site.
  • None. Events flow through the loader.

Copy the code

The snippet on this page, ready to paste.

Add the script tag
<script src="https://webforms.dropcowboy.com/latest/dropcowboy-loader.min.js"
        data-site-id="YOUR_SITE_ID"
        defer></script>
<script>
// The loader is deferred, so call it once the page has parsed.
document.addEventListener('DOMContentLoaded', function () {
  DropCowboy.track('signup_started', { plan: 'pro' });
});
</script>