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

Event Tracking

The Hackle SDK provides a feature to send user events to Hackle. By using this feature at every point where a change in user behavior occurs, you can obtain meaningful data about user behavior and perform user behavior analysis with the collected data.

track

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

Event Name (key)

  • It is recommended to name it like a typical variable name but in a way that is easy to identify.

  • Maximum 128 characters.

Example

Assume you have defined an Event Key called purchase to collect an event when a user taps the purchase button.

/* Example 1: Send event key only */
hackle.Track("purchase");

Property

The Hackle SDK supports adding properties to an Event object.

  • A property must be sent as a key-value pair consisting of a Property Key and a Property Value.

  • You can add a maximum of 64 properties per 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

In the example below, three properties (pay_method, discount_amount, is_discount) have been added.

Last updated