Skip to content

Integration with Bitrix24 (Leads + Deals)

Please note:

From January 1, 2021, integration with Bitrix24 is available only for users of commercial Bitrix24 plans.

How the Integration Works

When a client leaves a request on the site, a new lead is automatically created in Bitrix24 (it is not possible to automatically create a deal in this integration). The visit number is passed to the lead from the roistat_visit browser cookie to an additional field named roistat.

If the manager communicates with the client by phone, they can ask for a promo code and enter this code in the roistat field.

If the value from the roistat field is accidentally deleted, Roistat will independently determine the source of the request when loading leads and deals. This way, the deal will be assigned to the right advertising channel.

  • This integration is also available for Ukrainian version of Bitrix24.

  • You can also connect the self-hosted version of Bitrix24 through this integration. To do this, follow the setup instructions below.

  • For calls via Roistat Calltracking, the call recording will be sent to the lead, and you can listen to it.

How to pass the sale date from the 'Start date' field

Bitrix24 deals contain a Start date field. If you specify this field in the experimental feature called [The name of the field from which you want to load the sales date] (/settings/project/experimental_features/#integrations_20), the sale date will be uploaded from the deal field. After updating the data, the sale date of previous deals will change.

If you want the deal creation date to be the time the deal was created, not the lead

In Bitrix24, the deal creation date is the moment when the lead was created. If you want Roistat to consider the deal creation date as the moment the deal was created in CRM, enable the experimental option called Enter the name of the field from which you want to take the date of creation.

Sending a lead to CRM

If the lead was not marked as a duplicate, a new lead is created with the client's contact information and additional fields configured.

When sending a lead, the phone number is passed in the Phone field.

When sending a lead to CRM, Roistat checks for duplicates only one of the following entities: Contact or Company.

Sending data from Roistat to Bitrix24 marketing analytics

Roistat sends the following data to Bitrix24 analytics:

  • Transition source;
  • Data about the device from which the client visited the site;
  • UTM tags: utm_source, utm_medium, utm_campaign, utm_content, utm_term;
  • URL of the page visited;
  • Date of transition to the page.

You can enable the sending of this data in advanced integration settings:

1.png

If Roistat receives UTM tags from a call according to the Calltracking script, and at the same time the Send data to marketing analytics option is enabled in Bitrix24, UTM tags will be transferred to the deal in Bitrix24.

Loading data from Bitrix24 to Roistat

Please note:

  • The lead and the deal are connected during the first transfer of data from Bitrix24.

  • In this integration, Roistat uploads only Lead and Deal entities from Bitrix24. Roistat does not work with the Order entity.

  1. If the lead has not yet been converted into a deal, it will be uploaded as a lead to Roistat. The analytics will display additional fields and lead status. The lead ID will be in the lead_{id} format, for example, lead_123.

  2. If the lead was directly converted into a deal, the deal will be uploaded as a lead to Roistat. The analytics will display additional fields for the deal and lead, as well as the status of the deal. The lead ID will be in the lead_{id} format, for example, lead_123.

  3. If the lead was converted into a contact, and a deal was created based on the contact without the roistat field filled in:

    • Roistat will check if the deal belongs to the lead created earlier.
    • If there is a connection with a previously created lead, the deal and the lead (including the source) will be linked.
    • If there is no connection with the leads created earlier, the deal will be uploaded as a new lead to Roistat.
    • The analytics will display additional fields for the deal and lead, as well as the status of the deal. The lead ID will be in the lead_{id} format, for example, lead_123.
  4. If the lead was converted into a contact, and a deal was created based on the contact with the roistat field filled in:

    • The deal will be uploaded as a new lead to Roistat.
    • In the analytics, additional fields of the deal will be displayed, as well as the status of the deal. The deal ID will be in the deal_{id} format, for example, deal_123.
  5. If the deal was created manually or in a way not described above, it will be uploaded as a lead to Roistat. The analytics will display additional fields of the deal, as well as the status of the deal. The deal ID will be in the deal_{id} format, for example, deal_123.

    Please note:

    Client name, Phone number and Email are loaded into Roistat from client data.

Setting Up the Integration

Step 1. Add a roistat additional field

To add a roistat custom field in the Lead and Deal entities:

  1. In the project settings in Bitrix24, open CRM → Settings → CRM settings:

    2.png

    Select Form and report settingsCustom Fields:

    3.png

  2. For the Lead entity, click Add Field. The General parameters page opens:

    4.png

  3. In the Name field, enter roistat.

  4. In the Type drop-down list, select String.

  5. Click Save.

  6. For the Deal entity, repeat steps 2 - 5.

If for some reason you create a deal manually (for example, for offline sources), you can fill in the roistat field with data about the deal source. Information about the source of the transaction will be displayed in Analytics.

To assign a deal to a specific advertising channel, enter the following markers in the roistat field:

  • yamarket{ID} – if you want to assign the deal to the Yandex.Market channel. Hereinafter, ID is the advertising channel identifier. For example, yamarket1.
  • direct{ID} – if you want to assign the deal to the Yandex.Direct channel. For example, direct2.
  • google{ID} – if you want to assign the deal to a Google Ads channel. For example, google3.
  • merchant{ID} – if you want to assign the deal to the Google Merchant Center channel. For example, merchant4.
  • vk{ID} – if you want to assign the deal to the VK channel. For example, vk5.
  • facebook{ID} – if you want to assign the deal to the Facebook channel*. For example, facebook6.
  • mytarget{ID} – if you want to assign the deal to the myTarget channel.
  • seo_yandex – if you want to assign the deal to the Yandex SEO channel.
  • seo_google – if you want to assign the deal to the Google SEO channel.

Step 2. Set up integration with Bitrix24 in Roistat

Enabling integration in Roistat

  1. Add the Roistat tracking code to all pages of your site using the instructions.

  2. Open the Integrations section.

  3. Click Add integration. In the CRM/CMS block, select the Bitrix24 (Leads + Deals) card and click Add:

    5.png

  4. Click Set up integration (gear icon):

    6.png

Setting up authorization in Bitrix24

  1. In the field to the left of the Authorize application button, enter the URL of your project in Bitrix24. It usually looks like this: https://.bitrix24.

  2. Click Install application. A page with information about the Roistat integration app will open in your Bitrix24 profile.

    If the Roistat integration app info window doesn't open and you can't find it in the Marketplace, contact us.

    Click Install. Then check the boxes next to the required options and click Install again.

    Please note:

    To install the application, your Bitrix24 account must have administrator rights.

  3. In Roistat, click Authorize application to save authorization parameters in Bitrix24.

Distribution of statuses from Bitrix24

At the Loading leads and deals from CRM: stage assignment step, distribute deal statuses into groups by dragging them to the required blocks. Read more in this article.

7.png

Advanced integration settings

At the Loading leads and deals from CRM: advanced settings step, you can:

  • Specify parameters for filtering deals. For more details, see this article.

  • Specify the values for the business metric fields. or more details, read this article.

  • Set up the transfer of the source from leads to manually created deals. If a contact is created based on a lead and then added to a manually created deal, Roistat will automatically assign a source from the lead to the deal. This option is enabled by default.

  • Set the Mark transmitted emails as unread in CRM option. By default, an email sent to an existing deal is marked as read.

  • Set the Load only leads from CRM option. If this option is enabled, deals will not be uploaded to Roistat and displayed in analytics.

  • Set up the transfer of data about the source to the marketing analytics of Bitrix24. To do this, enable the Send data to marketing analytics option. The visit source, client device data, UTM tags, landing page URL, and visit date will be sent. Please note: Roistat does not load data from the Marketing analytics field.

  • Enable use of deal sale date from CRM. To do this, enable the Use the date of sale from the CRM option.

  • Enable creating leads with the Available to everyone tag. The Available to everyone option allows all employees to work with the lead in CRM.

Click the Save button to apply the changes.

8.png

Creating tasks

At the Creating tasks step, you can set up automatic task creation when creating a deal:

  1. Enable the Create tasks when creating deals option.

  2. Fill in the fields:

  3. Time for task completion – the number of minutes in which the task must be completed. If you leave the field blank, the value will automatically be set to 24 hours.

  4. Text of the task – description to be automatically added to the task.

  5. Task title – title to be automatically added to the task.

  6. Created by – employee on whose behalf tasks should be created.

Click Save to apply the changes.

9.png

Distribution of leads

At the Distribution of leads step, you can specify which employees to assign new leads to in CRM.

In the Leads responsible managers field, select employees from the drop-down list and click Save:

10.png

After that, Roistat will automatically distribute deals to the specified employees.

Client management

You can upload Contacts or Companies from CRM as clients.

Contacts are used by default. To load companies as clients, at the Client management step, enable the Use companies as clients in Roistat option.

Please note:

If the Use companies as clients in Roistat option is enabled, Roistat will only work with companies.

If you want to link a contact to the created lead (if it is created in CRM), enable the Linking a lead to a contact option. Search for a contact is carried out using the email and phone number of the lead.

Step 3. Set up automatic uploading of leads to Bitrix24

We recommend configuring the transfer of leads to CRM via Roistat. In this case, leads are sent to Roistat first, and then Roistat sends them to CRM. To learn more about this mechanism, read this article.

If sending leads from the site to CRM is already configured using your own code, in order to exchange data with Roistat, you need to configure the transfer of the roistat_visit cookie value to CRM. To do this, open the PHP file that is configured to send requests to your CRM. Above the code for sending leads to CRM, paste the following script:

$roistatVisitId = array_key_exists('roistat_visit', $_COOKIE) ? $_COOKIE['roistat_visit'] : 'nocookie' 

After that, add the received roistatVisitId value to the data sent to CRM. If necessary, contact a web developer for help.

Setting up Product sales analytics

Please note:

Before setting up Product sales analytics, reinstall the Roistat integration app (see the Setting up authorization in Bitrix24 section). During installation, allow the application access to the product catalog.

Integration of Roistat with Bitrix24 allows using Product sales analytics – a tool that lets you analyze the effectiveness of sales of individual products and product groups (brands, categories). Products are uploaded to Roistat both from CRMInventoryProduct catalog.

To set up Product sales analytics:

  1. Make sure that products are created in Bitrix24. To do this, open the CRMInventoryProduct catalog section in the Bitrix24 project:

    11.png

    To create a product, click on the Create Product button:

    12.png

    The product can be located both in the Product catalog section and in any subcategory.

  2. In the Roistat project, open the Analytics section, go to the Product sales analytics tab and click Connect product analytics:

    13.png

  3. After the next import of deals from CRM, product information will be displayed in the Analytics → Reports section. If the products are categorized, the report will display subcategories.

    14.png

    Also, detailed information about the product is displayed in the deal card and in the lead card:

    15.png

Product analytics works both for new deals and for deals that were uploaded to the project before Product analytics was enabled. To update data on deals created before Product Analytics was enabled, please contact Roistat Support.

Verifying the integration

When a client leaves a request on the site, a new lead must be created in Bitrix24 with the roistat field filled in. Leads are also displayed in Roistat:

  1. In the Project diagnosticsList of submitted leads section:

    16.png

  2. In the Analytics section in the list of deals:

    17.png

After setting up the integration, we recommend using the following Roistat tools:

* Facebook is owned by Meta Platforms, banned in the Russian Federation and recognized as extremist by a court.