Sending events introduction

SDK will send various events related to user and his actions such as custom events and mobile view screen.

We've got three event types:

Custom events can be created by you, and contain any information you provide as Map.

Screen event is used to collect data about users' navigation inside app. It sends name of route to User.com database.

Product event has predefined structure. It is used to collect data about products conversion / actions. You can pass custom information inside parameters attribute (like quantity of product, its price, color, time spent on product page etc.).

  • Sending a custom event

    Sending is easy as one line of code. Just pass the name of event and provide data as Map<String, dynamic>.

    UserComSDK.instance.sendCustomEvent(
      eventName: 'user_interacted',
      data: {
        'button_id': Random.secure().nextInt(999),
      },
    );

    You don't have to worry about offline mode - event will be stored in local DB and sent when network will be available.

    SDK will automatically add your user identifier and date-time information to the event. In User.com web panel your event will appear as Event user_interacted (based on class or annotation name).