To keep track of important user flows and interactions such as signup, login, upgrade, checkout and app purchases, transactions are required. Code must be added to specify where a transaction begins and ends. Following are some of the custom transaction functions used in Atatus.

Beginning a transaction

To start a transaction, make use of the beginTransaction() function. When using this function, Atatus will start to time the duration of the transaction.

Syntax

Parameter

Example

Ending a transaction

To know if a transaction currently running has successfully completed, use the endTransaction() function. The transaction time will be recorded and reported to Atatus.

Syntax

Example

Failing a transaction

The failTransaction() function will notify Atatus on the failure of any transaction. The time at which the transaction fails will be recorded and reported to Atatus.

Syntax

Example

You can either call endTransaction() or failTransaction() to record a transaction. Both the functions cannot be used together.

Recording a transaction with duration

To record a transaction with a time duration (ms), the recordTransaction() function is used. This function is useful when you do not begin or end a transaction.

Syntax

Parameter

Example