Setting up DNI (Dynamic Number Insertion)

DNI allows for unique tracking numbers to dynamically display on a web property where you have access to the source code. Unique numbers can show based on the referring source or for each unique visitor.

The benefit of using dynamic numbers is that you can capture additional data about the referring source of the visitor and, if using session-based DNI (A unique number for each visitor), you can also capture URL parameters from the visitor's session, including GCLID as well as other customer URL parameters. 

To set up DNI (dynamic number insertion) you must first decide whether you want to use a number pool (used for tracking visitors on a browser session-level) or a single number (this option is used for Source and URL-based DNI).

  • Start by adding a new tracking number.
  • If you selected Single Number, choose a tracking number from the drop-down list and continue configuring your tracking as you normally would by filling out ‘Tracking Number Name,’ ‘Ring to Number’, and other required fields.
  • If you selected Number Pool, select the area code or toll-free prefix you would like to use for your number pool and enter a quantity of ‘1.’ After completing setup please call or email our support team to increase the number pool to meet your requirements.
  • Next, click to expand the Advanced Tracking Number Settings and check the Dynamic Number checkbox.
  • For Host Domain, you can limit the DNI code to only working on a domain assigned here, or you can use *.* as an ‘include all’ to ensure your code will work on any domain where you may deploy it.
  • Referring Website determines when the dynamic number will show. For example, if you choose Google Paid, your dynamic number (or number pool) will only show for visitors who were referred to your site through a Google Paid Ad.
  • For DNI Type, if you chose ‘Number Pool,’ your available option will be ‘Session’, and if you chose ‘Single Number’ your options will be ‘URL’ or ‘Source.’
  • Finally, add in your HTML Class, which will be used to ‘wrap’ your telephone numbers and trigger the dynamic number swap (instructions for how to do this are below). It is recommended to use a prefix that will identify Convirza and the type of ad campaign. In the example above “cvz_adwords” is used.
  • If, and only if, you are using URL-based DNI you must use lmc_track as your HTML class.
  • Keyword helps you to get the number swapped if the keyword is present in the URL for the session and Source type DNI.
    For example, if TestDNI: ABC is added as a keyword, it will only swap the number for
  • The identifier is a string added under DNI settings. The Identifier can contain alphabets and/or numbers. Whichever identifier you add under DNI settings it will be replaced by the tracking number on the website. In the above example,   will be replaced by the tracking number on the website.
  • The number format is the format of the number which needs to be displayed on the website.
  • Once your setup is complete save your number and use the left-hand menu to navigate over to Settings -> Customization -> DNI. On this page, you will see any DNI numbers that have been set up within the group you are currently working in.
  • Click on the Copy Code button and select the Javascript code in the grey box under Step 1 (shown in the screenshot below). This script will need to be placed in the head section on any pages where you want your tracking numbers to swap. If you are using a template-based site like WordPress, this code only needs to be added once to your theme’s header.php (using a child theme or a plugin to deploy the code is highly recommended). Alternatively, you can use Google Tag Manager to deploy the header script.
  • Under Step 2 of the DNI instructions, you will need to use the HTML class you created earlier to wrap any numbers you want to swap. Your code should look like this:
<span class="myClass">Phone number to swap</span>
  • If you are using a Click-to-Call link in your number your linked number will automatically swap as well, so long as your HTML class is in the same element as your ‘href’ tag. You will also need to use the correct number format in your link. It should look like this:
<a href="tel:+18885555555" class="myClass">(888) 555-5555</a>
  • If you are using multiple DNI numbers in one place (Ex, source and session DNI together or two session pools with different referring sources) add your HTML classes in sequence. Your code should look like this:
<a href="tel:+18885555555" class="myClass myOtherClass">(888) 555-5555</a>
  • Step 3 of the DNI Instructions only applies if you are using URL-based DNI. In this case, you will need to add the ‘lmc_track’ parameter followed by your tracking number to the URL of any links you build. The destination URL should look like this:
  • If you don’t have direct access to your websites’ code to add the HTML class, you can use a * character as the HTML Class when setting up your number and all phone numbers on the page will automatically swap without an HTML class present on the website. This method will not work with URL-based DNI. For complete instructions on this method see Setting up DNI with Google Tag Manager.
  • Now it is possible to add multiple DNI settings for the same Tracking Number with the Source and URL type DNI. To do this, navigate to Customization-->DNI. Click on Add DNI settings. Select the Campaign and tracking number first for which you would like to apply different DNI settings. You can select different Host domains, Referring websites, keywords etc. for the same tracking number.