About tracking code

Roistat tracking code is needed to gather the data about customers' visits on your website. Roistat tracking code gathers the following data about the visit: marketing source. keyphrase, landing page, city, device, browser, etc.

Tracking code links all these parameters with one visit number, that is bound to each visitor of your website. It works the following way: tracking code adds the roistat_visit parameter in the browser's cookie, and each unique visitor of the website receives the unique visit number, that is recorded in the variable roistat_visit

The information from the tracking code is used in Roistat analytical reports. All visits on the website are recorded by the tracking code and displayed in Analytics. However, before the integration with CRM and marketing channel, reports will contain only base information about the visits, such as landing page, city, device, etc.

(warning) Roistat tracking code should be installed in every integration of Roistat with CRM.

How to find the tracking code

To find the tracking code of your project, open Settings→Tracking code:

The tracking code contains a key, which is unique for every project. This key is placed in })(window, document, 'script', 'cloud.roistat.com' string, after the 'cloud.roistat.com'.

If you added the tracking code to the website that is not related to your Rositat project:

How to add or remove the additional key of the tracking code

You can create the additional key of the tracking code in your project. You might need it if you use several websites in a single Roistat project and do not want to display it in the common tracking code key.  

  1. Open Settings→Tracking code settings and click the Additional keys for the tracking code button:

  2. Click the Generate a new key button:

    If you want to delete the additional tracking code key, click the [x] button.

How to add the webpage URL, domain or IP-address to the blacklist

  1. Open Settings→Tracking code settings and click the Blacklisted hosts button:

  2. In the opened field enter the webpage URL, domain or IP-address. Each address should be inputted in a separate line. 
  3. Click the Save button. 

(warning) The information from the blacklisted webpages, domains and IP-addresses will not be transmitted to Roistat.

Here are some cases when the blacklist will be useful: 

(warning) Calltracking, emailtracking and lead hunter do not work with blacklisted IP-addresses.

Multidomain mode

Multidomain mode allows saving the visit number while switching between websites. Thus, the analytics by marketing visits will be displayed in a proper way. 

Use this option if you have several websites within a single Roistat project. 

How to install the tracking code on the website

There are several ways to do it:

(warning)Make sure that there are no <noscript></noscript> before the tracking code. Otherwise, the tracking code will not work properly.

How to verify the performance of the tracking code

The performance of the tracking code can be verified using the Roistat interface and in the browser cookie.

Verifying the performance of the tracking code using the Roistat interface

  1. Open Settings→Tracking code.
  2. Enter the website address in the window below and click the Check tracking code button: 

Verifying the performance of the tracking code using the Roistat interface

  1. Go to your website and open the browser console. 
  2. The tracking code is installed properly if the cookie list contains the roistat_visit indicator. 

Problem solution

In case of any problems, contact our support service.