Get started

Custom events

Count signups, purchases, and clicks, not only pageviews.

Send an event

Once the script is installed, call emberbee with a name wherever the thing you care about happens, such as a form submit or a button click:

emberbee("signup");

Each event shows up in the Custom events table on your dashboard with its count. A visit that sends a custom event never counts as a bounce, even if it saw only one page.

Add details

Pass an object as the second argument to record details about the event:

emberbee("signup", { plan: "pro", seats: 3, trial: true });

Hover an event in the Custom events table to see its details, such as how many signups chose each plan.

Then filter the whole dashboard by a detail: add a Property filter, such as plan is pro, to see where your pro signups came from.

Keep within these limits. An event that breaks one is not recorded at all:

  • Event names are up to 64 characters.
  • Up to 20 details per event.
  • Each detail's name is up to 64 characters.
  • Each value is a string of up to 256 characters, a number, or true or false.

Send events before the script loads

The script loads with defer, so it may not be ready when your own code first runs. Add this before the emberbee snippet and call emberbee as early as you like. The script sends the queued events once it loads.

index.html
<script>
  window.emberbee = window.emberbee || function () { (window.emberbee.q = window.emberbee.q || []).push(arguments); };
</script>

What counts toward your plan

Your plan's monthly allowance counts pageviews and custom events together, across all the sites you own. Page speed measurements don't count.