Custom Events
A page view is one kind of thing that happens on a site. Everything else you can record by calling pushbroom.event().
window.pushbroom?.event('Signed Up', { plan: 'solo' }) That’s the entire API.
The Type
The first argument names the event. It has to be a string, and it cannot be empty. Spaces are fine. write the name you want to read on a chart, because that is where you are going to read it.
The Data
The second argument is optional. It’s a flat object:
window.pushbroom?.event('Purchase', {
plan: 'team',
seats: 12,
currency: 'USD'
}) Every key becomes something you can filter and group by. Keep values short; strings and numbers are the kind of things that belong on an axis or in a filter.
Last updated