IntegrationerSende begivenheder

Sending events

The SDK allows sending any events from the server part of your website to Finteza, including user action data, database status, performance indicators, etc.

Call the ITracker.SendEvent method. For this purpose, obtain the ITracker implementation using Dependency Injection. For example, this can be done using the following injection into the constructor:

class SomeClass
{
    public SomeClass(ITracker tracker)
    {
        tracker.SendEvent("{EVENT}""{REFERER}");
    }
}

Using the SendEvent method, you can register the events and pass additional information as parameters, for example, a type of a purchased good, price, currency, etc. The following parameters are supported:

Parameter

Type

Description

name *

string

Event name. The maximum length is 128 symbols.

referer*

string

The host on which the SDK runs. All events are bound to counters (websites) on Finteza side using the websiteId. The system makes sure that a host an event has arrived from corresponds to the counter host (specified in the website settings of the Finteza panel). This prevents inflating traffic.

backReferer

string

The address of a web page a visitor was located at before performing a tracked action.

userIp

string

The IP address of the visitor who performed a tracked action.

userAgent

string

The user-agent of the visitor who performed a tracked action.

unit

string

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

value

string

The value of the parameter. The maximum length is 64 symbols.

* – required parameters.

Example:

tracker.SendEvent("Server Track Purchase""https://www.mysite.com""USD""100");