Tracking

Core events

Bantico includes built-in core events for the most important parts of the user journey, such as visits, signups, checkout, and payments.

Core event list

These are Bantico’s built-in tracking events.

page_view

Sent when a page is viewed. In most setups this is tracked automatically after Bantico is installed.

button_click

Sent when a tracked button or click target is clicked.

pricing_view

Sent when a pricing page or pricing step is viewed.

signup_started

Sent when a user starts the signup flow.

signup_completed

Sent when a user successfully completes signup.

checkout_started

Sent when a user starts checkout.

payment_completed

Sent when a payment is completed, usually from your payment provider webhook.

Bantico also records link_clicked as an internal system event when a tracked Bantico link is clicked before redirect. You usually do not need to send this manually from the browser.

Track method

Sends a Bantico core event from JavaScript.

bantico.track("signup_started", {  source: "footer",})

Parameters

eventName

stringrequired

One of Bantico’s built-in core event names.

properties

object

Optional object containing extra event properties.

Properties

[key]

string | number | booleanflexible

Any additional metadata for this event.

Data attributes

Track core event clicks declaratively with HTML data attributes. No extra JavaScript required.

Add data-bantico-event to any clickable element such as a button or link:

<button data-bantico-event="signup_started">  Get Started</button>

Adding properties

Add additional data-bantico-* attributes to include event properties:

<button  data-bantico-event="signup_started"  data-bantico-plan="Pro"  data-bantico-source="hero">  Get Started</button>

This sends a Bantico signup_started event with properties { plan: "Pro", source: "hero" }.

Tracking forms

For form submissions, it's best to call bantico.track() after the submission succeeds. For example:

const handleSubmit = async (e) => {  e.preventDefault()  const result = await submitForm(data)  if (!result.success) return  bantico.track("signup_completed", {    source: "footer",  })}

This ensures you only track successful submissions and avoids sending completion events for failed validation.