Infinity Campus

Dynamic number replacement

Written by Infinity | Nov 20, 2026, 12:19:50 AM

Dynamic number replacement is how the Infinity Platform finds phone numbers on your website and replaces them with tracking numbers. There are two ways to do this: AutoDiscovery, which is the default, and the data attribute solution. This article explains both, and how to find a tracking pool ID.

AutoDiscovery

By default, Infinity searches your entire page for AutoDiscovery numbers and, if it finds them, replaces them with a tracking number. To set up an AutoDiscovery number for a tracking pool, see Destination Numbers and Autodiscovery Numbers.

The vast majority of Infinity customers use this AutoDiscovery approach. However, there are a few scenarios where it's not the best solution:

  • You use the same number on your website for different areas of your business, such as sales and service, and want Infinity to report on these calls separately.
  • The phone number on your site is changed regularly, which would stop us replacing numbers unless the AutoDiscovery number was also updated.
  • You only want to replace your original number on certain pages, or in certain areas of a page.

In these scenarios, we recommend using our data attribute solution.

Data attributes for dynamic number replacement

If an HTML element has the attribute data-infinity-pool, our code replaces the entire contents of that element with a tracking number from the tracking pool ID specified in the attribute value. For example, if the HTML is:

HTML
<span data-infinity-pool="12345"><p>Sales: 0123 456 7890<p></span>

the resulting HTML after our code runs would look like:

HTML
<span data-infinity-pool="12345">0333 1222 999</span>

Finding a tracking pool ID

To get the tracking pool ID:

  1. Go into the Infinity Platform and select Settings.
  2. Then select Setup and then Settings from the navigation menu.
  3. Select Telephony Settings.
  4. Select Tracking Pools Editor.

You'll see a list of tracking pools, and each one shows its ID at the top:

Tel links

Mobile web browsers can automatically detect phone numbers on a webpage and format them as clickable links that, when tapped, prompt the user to call the number. If you have manually added an anchor element with a tel link around your number, we also replace the number in the tel link, as long as it surrounds the element with the data-infinity-pool attribute. For example, if the HTML is:

HTML
<a href="tel:+441234567890">
    <span>Sales: </span>
    <span data-infinity-pool="12345">0123 456 7890</span></p>
</a>

the resulting HTML after our code runs would look like:

HTML
<a href="tel:+443331222999">
    <span>Sales: </span>
    <span data-infinity-pool="12345">0333 1222 999</span></p>
</a>

We search up to two levels up in the DOM for an anchor element.

Once number replacement using the data-infinity-pool attribute is complete, the code then runs AutoDiscovery number replacement. This means you can use a combination of both methods.

Need more help?

For more on dynamic numbers and tracking pools, see Dynamic Numbers and Tracking Pools. If you're still stuck, get in touch with your Customer Success Manager or email support@infinity.co.