The event in Roistat is an action committed by a user on your website, for example, page view, click on the link or sending the form. 

Some events can be tracked by Roistat with the help of data exchange with your systems. Some of the events are already tracked in Roistat. For example, the Rositat tracking code transmits the data about browsed webpages. 

You can create and configure the other events in the Event section. 

Some events can be tracked by other systems only by yourself, for example, registration of the user on the website. Use the API to transmit the information about such events to Roistat. 

Also, you can use the Analytics section to create the reports to browse the statistics on the events. Кроме того, в разделе Аналитика вы можете создавать отчеты для просмотра статистики по событиям. При этом для каждого события доступна статистика по двум показателям: количество сработавших событий для уникальных и не уникальных пользователей.

(info) Events and other entities (leads, calls, etc) are not connected with each other directly. The number of entities can differ from the number of leads, for example, when a visitor clicked a button several times and evoked several events, but created only one lead. 

How to create an event

To create an event: 

  1. Open All items → Event and click the Add an event button:


  2. Then, specify the mandatory parameters
    - Title - title of the event 
    - Conditions for triggering - the way of transmitting the data about the event (Is transmitted via Javascript or Webpage visit).
    - ID - unique identifier of the event that is needed for the correct work of the code. 

    - URL — the visits on this URL should be tracked. This URL is specified using regular expressions. This field is displayed if you select the Webpage visit condition for triggering:
  3. Save changes by clicking the Add button. 
  4. Add the JavaScript code to the pages of your website.

How the events are transmitted

(warning) Before transmitting the event, install the Roistat tracking code!

The data about the events can be transmitted in the following way:

1. Using the Webpage visit condition for triggering:

After the event is created in Roistat, the visits to the specified URL are tracked automatically. 

For every triggering, the date and time of visit are displayed in the Event log section. 


2. Using the configuration of JavaScript:

The information about other events can be sent using the send command.

To do it, create an event in Roistat and specify its name, condition, and ID. 

Then, enter the string with JavaScript code roistat.event.send(‘cart_view’, data), where cart_view — is the ID, data — is the non-mandatory argument key: value.

For example:

 

roistat.event.send('cart_view')
roistat.event.send('register', {'name':'product'})

 


3. Using the API:

Parameters of the event will contain in the GET-request to address:

 https://cloud.roistat.com/api/site/1.0/{PROJECT_ID}/event/register?event=cart_view&visit=456789&data[name]=product


ElementExampleDescriptionIs it mandatory?
eventcart_viewThe ID of the eventYes
visit 456789Visit number from the roistat_visit cookieNo, but desirable
data[name]=productOther additional parametersNo


How to view the events log 

The history of events triggering is displayed in the Events log section: 

The following information is displayed for each triggering: 

Events list: view and management

All events that you create in Roistat are displayed in the Events list section.

The same information you specified during the creation of the event is displayed in the Events list.

- Title - title of the event 
- Conditions for triggering - the way of transmitting the data about the event (Is transmitted via Javascript or Webpage visit).
- ID - unique identifier of the event that is needed for the correct work of the code. 

Actions column contains the key for editing and deleting the events.

How to view the statistics 

After the event is created, two new indicators automatically added in the Events section:

These indicators are displayed in the settings of new and old reports. To learn more about the configuration of reports, read this article.

In Analytics reports, events are bound to the date of the visit. If the event was committed on January, 3rd, and the visit was committed on January, 1th, these events will be displayed in the Analytics report for January, 1th.