Dynamic Number Insertion - How Number Swapping Ties Every Call to a Keyword, Ad or Page (2026)

Dynamic number insertion shows each website visitor a trackable number, so calls can be matched to the exact visit. Here's how it works and how to set it up right.

By the Call Tracking Hub Editorial Team ยท Published December 2026

What Is Dynamic Number Insertion?

Diagram showing how dynamic number insertion works step by step

Dynamic number insertion (DNI) is a website script that replaces the phone number visitors see with a tracking number based on how they arrived. Someone from a Google Ads click sees one number, someone from organic search sees another. When they call, the call tracking platform knows where they came from.

It's the technology that makes call tracking work for websites, and it's included with most call tracking platforms, including CallRail.

How DNI Works, Step by Step

  1. The visitor arrives. The script reads the referrer, UTM tags, ad click IDs and landing page.
  2. A number is assigned. The script picks a tracking number from your pool and links it to that visitor.
  3. The number swaps. Everywhere your number appears on the page, including tel: links, the tracking number replaces it.
  4. The visitor calls. The platform sees which number was dialed and looks up the visit it was assigned to.
  5. The call forwards. It rings your normal phone, while the platform records the source, keyword and pages viewed.

The caller sees nothing unusual. They dial a local number, and it rings your business.

Source-Level vs Visitor-Level DNI

There are two ways to set DNI up, and they answer different questions.

  • Source-level DNI gives each channel its own number: one for Google Ads, one for organic, one for Facebook. It needs few numbers and shows channel performance.
  • Visitor-level DNI (also called session-level) gives each visitor their own number from a pool. It needs more numbers but shows the keyword, campaign and pages behind each call.
Source-level vs visitor-level DNI
FactorSource-levelVisitor-level
Numbers neededOne per channelA pool sized to traffic
Shows channelYesYes
Shows keyword and campaignNoYes
Shows pages viewedNoYes
Sends calls to Google Ads by clickLimitedYes
Best forLow traffic, tight budgetsPaid search and detailed attribution

If you spend on Google Ads, visitor-level DNI is usually worth it, because keyword-level call data is what improves bidding.

How Many Numbers Do You Need?

Comparison of source-level and visitor-level dynamic number insertion

For visitor-level DNI, the pool must be big enough that each visitor on your site at the same time gets their own number. Numbers are also held for a while after a visit, so someone who calls later still matches.

If the pool is too small, visitors share numbers and the platform has to guess. Too big, and you pay for numbers you don't use. Tracking platforms recommend a pool size from your traffic, and many show a report of how often numbers were shared, so you can adjust.

Each extra number has a monthly cost. On CallRail, extra local numbers are $3 a month beyond the five included. Our call tracking numbers guide covers local versus toll-free choices.

What DNI Lets You See

Once DNI is running, each website call comes with context you couldn't get before:

  • The source and medium, such as Google / cpc or Facebook / paid.
  • The campaign, ad group and keyword for paid search.
  • The landing page and the pages viewed before the call.
  • First-touch and last-touch sources for multi-visit journeys.

Combined with recordings or AI tagging, you can tell which keywords drive calls that book. See call attribution.

Setting Up DNI Correctly

  1. Install the script on every page, including landing pages built in separate tools.
  2. Show your number as plain text. Numbers in images can't be swapped.
  3. Match the number format the script is told to look for, or configure all the formats your site uses.
  4. Turn on auto-tagging in Google Ads and use UTM tags elsewhere. See UTM parameters for call tracking.
  5. Test with tagged links in a private browser window, then call.

Try CallRail Free

Common DNI Problems

Illustration of the factors that decide a DNI number pool size
  • Numbers don't swap: missing script, cached pages or the number in a format the script doesn't recognize.
  • Calls show as direct: lost referrer data, often from links without UTM tags.
  • Wrong source on calls: a pool too small for your traffic.
  • Swaps on some pages only: a different header template or page builder.

Our DNI not working guide walks through each fix for CallRail users.

Does DNI Hurt SEO?

Not when set up properly. Search engines see your real number in the page code, since the swap happens in the visitor's browser. Keep your main number in your site's HTML and on your listings. Our call tracking and SEO guide explains the safe setup.

Dynamic Number Insertion FAQ

Is dynamic number insertion legal?

Yes. It's a common marketing practice. Calls still reach your business, and the tracking number simply forwards them.

Does DNI work on mobile?

Yes. The script swaps both the displayed number and tel: links, so taps to call dial the tracking number.

Can DNI track offline marketing?

No. DNI is for website visitors. Offline marketing uses static tracking numbers. See offline call tracking.