Skip to end of metadata
Go to start of metadata

How it works


Roistat will import data from the Deals and Leads pages in Bitrix24 if you set up the Bitrix24 (Box) type of integration.

The tracking code serves to collect and send visitors' data to Roistat from a website.

Firstly, the tracking code should be placed on each web page you wish to track. Having added the code will set the roistat_visit variable containing a visit ID into the cookie. Once you have successfully installed the tracking code on your website, the Promo Code functionality will be available.

Secondly, it's necessary to customize lead export from Roistat to Bitrix24 by adding the value of the roistat_visit cookie to the deal. We developed an easy-to-manage module to export leads. It won't take you a lot to set it up.

In summary, when a visitor creates some request on your website, a new lead is created in your CRM and characterized among others by the visit ID (the roistat_visit variable) contained in the lead commentary. Otherwise, if a client is calling, a manager asks him/her for a promotional code and puts it down to a deal card; promo code appearance needs special setup.

Step 1. Set up tracking code

To view the Roistat tracking code, navigate to Settings  Tracking Code:

Insert the code between the <body></body> tag of your web pages. It can be placed next to the Google Analytics counter or any others.

The tracking code must be placed into the HTML code of every page of your website.

Consequently, all visits will be counted and analyzed in Analytics.

Do not insert more than one counter in a page to prevent inaccurate data entry.

Step 2. Install the Roistat module

Sign in to your Bitrix24 account and access the Control Panel:

Open MarketplaceSolutions through the left navigation panel, enter roistat in the search field, select Roistat — Сross-cutting business analytics system from the apps list and click Install:

Click the Install updates button on the page opened:

Read and accept the License agreement to continue. After the application is downloaded, click Install:


Once the installation is completed, navigate to Settings  System settings  Module settings  Roistat.

Set up the username and password that Roistat will use to access your Bitrix24 and import leads and deals data. You may configure any username and password.

Step 3. Configure Roistat access to Bitrix24

Open SettingsIntegrations and choose Bitrx24 (Box) from the Available integrations drop-down menu. Click Select to save the integration type. Then, specify access to your Bitrix24 account:

  • URL: your Bitrix24 project URL (;

  • Username: the username specified in the Roistat module settings;

  • Password: the password specified in the Roistat module settings.

Step 4. Arrange statuses

Once Bitrix24 has integrated with Roistat, you'll need to arrange deals and leads statuses:

  • Not registered: waste leads or duplicate deals. Do not delete such deals to provide reliable statistics. You can gather them all in one status, e.g. Waste;

  • Processing: deals being in process, not completed, e.g. negotiations or product packaging;

  • Paid: deals that are paid or very likely to be paid;

  • Rejected: when a client rejects the purchase or requests a refund.

Just drag and drop a status to the box you wish.


Quote statuses will be imported to Roistat as well. It's a Bitrix24 API shortcoming, so that you should leave these statuses in the Not registered group.

Moreover, you should leave the Converted status in the Not registered group otherwise leads and deals converted from those leads will overlap.

All the statuses can be distributed the following way:

Step 5. Automatic leads export

 If deals are already created automatically

In this case, the lead commentary field should contain the value of the roistat_visit cookie.

Below is an example of the string that contains the value of this cookie:

The string to insert into the lead commentary field should have the format as follows:

When created leads should be automatically exported from your website to Bitrix24. For this to happen, we offer you a complete solution: deal proxying.

When a visitor creates some request on your website, a new deal is automatically created in Bitrix24 as well, and a backup copy of the lead data is stored in your Roistat account. Keeping this in mind, you will not have to worry that Bitrix24 can be off-line sometimes. In any case, all the data is stored and then re-exported to Bitrix24 some time later.

To set up deal proxying, insert the following code snippet into the file that processes deal forms on your website (e.g. sends data to some e-mail):

Verify the integration

When a client creates some request on your website, a new lead will be created in Bitrix24 and will have a commentary with the roistat code.


You can view deals from Roistat as well by clicking the corresponding link:

Done! You may start working with Roistat.

  • No labels