Sending events

After installing SDK, you can send application user action events to Finteza. To do this, use the event method specifying the string name of the event:

Objective-C:

[Finteza event:@"{EVENT}"];

Swift:

Finteza.event("{EVENT}")

Set the event name in {EVENT}. If you use a prefix with an application name, it is added to all sent events.

Call this function after any necessary event in the application, like moving to a section, pressing a button, filling in the form, etc.

The maximum acceptable length of an event name including a prefix is 128 characters.


Additional data in the event parameters #

In events sent to Finteza, you can specify additional data as parameters, for example, a type of a purchased good, price, currency, etc.

Objective-C:

[Finteza event:@"{EVENT}" id:@"{ID}" unit:@"{UNIT}" value:@"{VALUE}"];

Swift:

Finteza.event("{EVENT}", id: "{ID}", unit: "{UNIT}", value: "{VALUE}")

Set the event name in {EVENT}. The following parameters are specified next:

Parameter

Type

Description

id

string

Random ID. The maximum length is 64 symbols. To avoid using the ID, set nil.

unit

string

Parameter measurement units, for example, USD, items, etc. The maximum length is 32 symbols.

value

number

Parameter value. The maximum length is 64 symbols.

Examples for Objective-C:

[Finteza event:@"Book Load" id:@"CATEGORY_ID" unit:@"BOOKS" value:@"BOOK_ID"];
[Finteza event:@"First Book Open" id:nil unit:@"Count" value:@(42).stringValue];

Examples for Swift:

Finteza.event("Book Load", id: "CATEGORY_ID", unit: "BOOKS", value: "BOOK_ID")
Finteza.event("First Book Open", id: nil, unit: "Count", value: String(42))

Complex event accounting models for in-app purchases and E-Commerce will be added in the future.


Disabling event tracking #

To temporarily disable event registration inside the application, set the tracking to No/False (the default is Yes/True).

Objective-C:

Finteza.tracking = NO;

Swift:

Finteza.tracking = false

After that, all further events registered via the event function (including the ones with the parameters) will be ignored and not sent to Finteza.