For the complete documentation index, see llms.txt. This page is also available as Markdown.

Custom Analytics

Track the events that matter to your business.

Auto tracked events tell you how people move around your app. Custom events tell you whether they did the thing you care about — added to cart, booked, subscribed, finished.

Custom Analytics is Premium, and the tab stays locked until Firebase Analytics setup is complete.

There are three ways to record one.

1. Navigation bar buttons

Every navigation bar button can report its own taps. When adding or editing one, turn on Enable Firebase Analytics and give the event a name.

The Custom events tab

This works for every button type — Linker, Cart, Custom, Native Link Sharing, Hamburger and Multi Language — and for individual items inside a hamburger menu.

The name you enter is the event name in Firebase. Something like nav_cart_clicked reads clearly in a report months later.

2. Webpage element clicks

To track a tap on something on your own website — an Add to Cart button, a filter, a link — click Create new event and fill in:

Field
What to enter

Element's identifier

The class or id of the element to watch.

Event Name

What the event is called in Firebase.

Property Key & Value

Optional extra detail recorded with the event.

Find the identifier by opening your site in a desktop browser, right-clicking the element and choosing Inspect — the same method as the cart counter.

Property Key & Value is how you tell identical events apart. If your Add to Cart button carries the same identifier on listing and product pages, add clicked_from / Product listing page so the report shows which one customers use.

3. From your own code

For something no click can capture — an order completing, a form validating, a video finishing — call the bridge function:

Naming events

Pick a convention and keep it. Firebase treats add_to_cart, AddToCart and add-to-cart as three unrelated events, and you cannot merge them afterwards.

Lowercase with underscores is the usual choice. Name the action, not the element: checkout_started still makes sense after you redesign the button.

Check it

Custom events do not record from Twinr Preview. Test with a real build, and use Firebase's DebugView to watch events arrive in real time rather than waiting for the next day's report.

Last updated