Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


(warning) Number substitution does not work without Roistat tracking code.


  1. Open the webpage code and check the value of class or identifier of the element that contains a number. To do it, open your browser and browse the code. The needed element will be highlighted.
  2. If the number is already tagged with some class or identifier (id), copy the name of the class or identifier. 
    A telephone number may have multiple classes. Different classes are divided by spaces.
    For example, Roistat customer service number has two different classes: roistat-phone и tel. 
    You should use the class that belongs to the substitution number. 
  3. If the element with the phone number does not have class or identifier, you should add it in the webpage code. To do it, add the class=“unique class name” or id=“unique title” inside the tag before the telephone number. 
    Thus, the phone number code should look as follows: 

    Code Block
    <span class="roistat-phone">11231111111</span>

  4. On step 3 (Choose website element, including the number) of the calltracking scenario, open the CSS Selector tab and specify the class or identifier in the CSS class or ID name field. Then press Enter or Space, and the specified text will be displayed as the attribute name. 
    You should enter the # symbol before the identifier name. Class names may be specified with a dot or without it. You can specify several classes or identifiers. 

  5. You can also add the telephone number of your website and CSS-Selector on step 3. Phone number and CSS-Selector will be substituted. 


(warning) If you specify the same class or identifier for a substitution number in several scenarios and activate these scenarios, Roistat calltracking won't work correctly. Specify the unique class or identifier for substitution numbers in each scenario. 

Processing the telephone number on the website

By default, the phone number on your website is substituted by the number you specified in the scenario in the following format: +х(ххх) ххх-хх-хх.


Code Block
<a href="tel:11231111111" class="roistat-phone-tel"><span class="roistat-phone-country">1</span>(<span class="roistat-phone-region">123</span>)<span class="roistat-phone-number">111-11-11</span></a> 

Recommended articles

Calltracking scenario