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

Event Tracking

The Hackle SDK provides the ability to send user events to Hackle. By using this feature at every point where user behavior changes, you can obtain meaningful data about user actions, and use that data to analyze user behavior.

You can view sent events in the Event Management menu on the Dashboard.

It generally takes up to ~60 seconds for events to appear in the Dashboard after being sent.

track

Pass the Event Key to the track() method to send a user event.

Parameter
Type
Required
Constraints

Event name (key)

string

Required

Maximum 128 characters.

Example

Assume you have defined an event key called purchase to collect events when a user clicks the purchase button.

import io.hackle.android.HackleApp
import io.hackle.sdk.common.Event

hackleApp.track("purchase")

Property

The Hackle SDK supports adding properties to Event objects.

  • Properties must be sent as key-value pairs (Property Key and Property Value).

  • A maximum of 64 properties can be added to an event object.

Category
Type
Constraints

Property Key

string

  • Character limit is 128 characters.

  • Case-insensitive.

  • For example, AGE and age are recognized as the same Property Key.

Property Value

boolean, string, number, array

  • For string type, the character limit is 1024 characters.

  • String type is case-sensitive.

  • For example, APPLE and apple are recognized as different Property Values.

  • For number type, up to 15 integer digits and up to 6 decimal places are supported.

Example

The example below shows three properties being added: pay_method, discount_amount, and is_discount.

Last updated