Dynamic Number Insertion (DNI): What It Is and How It Works
Dynamic number insertion (DNI) swaps the phone number on your site with a unique tracking number per visitor or source, so every inbound call ties back to its marketing channel.

Rafael Hernandez
Founder & CEO
Ex-Microsoft SWE · $10M+ PPL ad spend


I hope you enjoy reading this blog post. If you want to try Lead Distro AI for free, click here.
Author: Rafael Hernandez | Founder & CEO of Lead Distro AI
Last Updated: June 4, 2026
Dynamic number insertion (DNI) is a call tracking technique that automatically replaces the phone number shown on your website with a unique, trackable number based on how each visitor arrived. A small JavaScript snippet runs when the page loads, asks the call tracking platform which number this visitor should see, and swaps the default number before the page finishes painting. When the visitor calls that number, the platform forwards the call to your real business line and logs it against the exact source, campaign, keyword, or session that produced it. The result is simple: instead of guessing which ad, page, or channel drove a phone call, you know. DNI is how marketers close the attribution gap between online traffic and offline phone calls, and it is the foundation that pay-per-lead and pay-per-call agencies build call routing and billing on top of.
DNI matters because phone calls are high-intent and hard to measure without it. According to Invoca's DNI guide, phone calls convert to revenue 10 to 15 times more than web leads, yet a call with no tracking number looks like it came from nowhere. DNI gives that call a paper trail. Below is how the number swap actually works, the difference between source-level and session-level tracking, and how Lead Distro AI uses DNI to feed call routing and lead distribution from one platform.
Key Takeaways
- Dynamic number insertion swaps the phone number on a web page with a unique tracking number tied to the visitor's traffic source, campaign, or individual session.
- A JavaScript snippet does the swap on page load, before the page paints, then forwards the call to your real line and logs the source behind it.
- Source-level DNI uses one number per channel (Google, Facebook, email), while session-level DNI assigns a number per visitor for keyword and session detail.
- DNI powers attribution and routing for pay-per-lead and pay-per-call agencies, lead brokers, and lead buyers and sellers who need to prove which calls came from where.
- Lead Distro AI ships DNI with call tracking, and call tracking is usage-based: a per-number monthly fee plus a per-minute rate for inbound calls, layered on the $299/month platform.
What Is Dynamic Number Insertion?
Dynamic number insertion is a call tracking method that displays a different phone number to different website visitors so each inbound call can be traced back to its marketing source. Instead of hard-coding one static number into your site, DNI lets the call tracking platform decide, in real time, which number a given visitor sees.

As Twilio's glossary explains, DNI ties a unique phone number to each ad source, so the platform can connect an offline call to online ad spend. That connection is the whole point. A marketer running Google Ads, Facebook, email, and organic search at the same time can finally see which of those channels generated the call, rather than lumping every call into one untracked bucket.
How the Number Swap Works
The mechanics are straightforward. You place a small JavaScript snippet on your site. When a visitor loads a page, the snippet fires, checks how that visitor arrived (referrer, UTM parameters, or session), and asks the call tracking platform which number to display. The platform returns a tracking number, and the script replaces the default number on the page before it finishes rendering.
When the visitor dials that tracking number, the platform answers, records the call against the stored source data, then forwards the call to your real business line. The caller never knows a swap happened, and the experience is identical to calling a normal number. Per CallRail's overview, this is what lets you show different numbers to visitors depending on whether they came from Google Ads, social, email, or direct traffic.
Source-Level vs Session-Level DNI
There are two main ways to assign numbers, and the choice is a trade-off between cost and detail. Source-level DNI gives one tracking number to each traffic source: one number for Google organic, one for Facebook, one for email. It uses few numbers and is cheap to run, but you only see attribution at the channel level.

Session-level DNI assigns a unique number to each individual visitor session, pulled from a pool of numbers. This unlocks keyword-level and visitor-level data, such as which PPC keyword and which pages led to the call. The catch is cost: DNI relies on pools of numbers, and as Invoca notes, the bigger the pool, the more expensive the service. Platforms manage this by recycling numbers from inactive sessions back into the pool, so a modest pool can still cover many concurrent visitors.
Number Pools and Swap Targets
A number pool is the set of tracking numbers a platform rotates through for session-level tracking. When more visitors are on the site than there are numbers in the pool, the platform reuses numbers from sessions that have gone idle. CallRail's help documentation describes a website pool that dynamically swaps numbers based on how each lead routes to your site, capturing visitor-level data like pages visited and PPC keywords.
The swap target is the number the script looks for on the page in order to replace it. By default the swap target is your real destination number, so any place that number appears in your site's markup gets swapped automatically. Getting the swap target and pool size right is what keeps attribution accurate; too small a pool and concurrent visitors share numbers, which muddies the data.
Why Pay-Per-Lead and Pay-Per-Call Agencies Use DNI
For agencies, DNI is not just a reporting nicety, it is the input that makes paid call campaigns work. A pay-per-call agency advertises tracking numbers, and DNI lets it spin up and assign those numbers per source so it can prove which traffic produced which billable call. That proof is what justifies the payout a buyer pays per call.
DNI also feeds the routing layer. Once a call is tied to a source and qualified through an IVR, the platform can run a buyer waterfall and connect the caller to the right buyer, the same logic covered in our guide to call routing software. Pay-per-lead agencies use the same data to attribute form fills and calls in one system, which is why many run lead and call distribution software rather than separate tools. For the broader model, see how pay-per-call marketing turns tracked calls into revenue, and how pay-per-call compares to pay-per-lead.
DNI vs Static Tracking Numbers
A static tracking number is a single number printed somewhere, such as on a billboard or a specific landing page, that never changes. It tells you a call came from that one placement, and nothing more. DNI is the dynamic version: numbers change per visitor or source so one web page can attribute calls to many channels at once.
| Capability | Static Tracking Number | Source-Level DNI | Session-Level DNI |
|---|---|---|---|
| Numbers used | One fixed number | One per channel | A pool, one per visitor |
| Attribution detail | Single placement | Channel level | Keyword + session level |
| Setup effort | Lowest | Low | Moderate |
| Cost | Lowest | Low | Higher (larger pool) |
| Best for | Offline ads, single landing pages | Multi-channel campaigns | PPC and SEO with keyword tracking |
Most agencies use a mix: static numbers for offline placements where a script cannot run, and DNI for everything on the website. To see how DNI feeds buyer routing and billing in one place, walk through the Lead Distro AI product tour.
How Lead Distro AI Uses DNI
Lead Distro AI ships dynamic number insertion as part of its call tracking, then connects it directly to distribution. The DNI script swaps numbers on your site and attributes each call to its source. From there, Claude AI scores every lead and every call before routing, so a high-intent tracked call can flow into a buyer waterfall while a lower-tier web lead routes round robin.
The platform supports Round Robin, Weighted, Priority/Waterfall, and Ping-Post distribution, so the same attributed call data drives both routing and billing. Call tracking is usage-based: a per-number monthly fee plus a per-minute rate for inbound calls, layered on top of the flat platform subscription. Plans start at $299 per month, and the 7-day free trial requires a credit card so you can run a tracked, swapped call end to end during the trial. For a side-by-side of dedicated call tracking platforms, see our best call tracking software comparison.
FAQ
What is dynamic number insertion in simple terms?
Dynamic number insertion (DNI) is a call tracking technique that automatically shows different phone numbers to different website visitors based on how they found your site. A JavaScript snippet swaps the default number on the page with a unique tracking number, then forwards calls to your real line while logging the source behind each call. It lets you tie an offline phone call back to the exact ad, campaign, keyword, or session that produced it, which is how marketers measure the ROI of channels that drive calls.
How does the DNI number swap actually work?
A small JavaScript snippet on your site fires when a page loads. It reads how the visitor arrived, using the referrer and UTM parameters or a session ID, then asks the call tracking platform which number to display. The platform returns a tracking number and the script replaces the page's default number before it finishes rendering. When the visitor dials that number, the platform records the call against the stored source data and forwards it to your business line, so the caller's experience is unchanged.
What is the difference between source-level and session-level DNI?
Source-level DNI assigns one tracking number per traffic source, such as one for Google, one for Facebook, and one for email. It is cheap and simple but only shows channel-level attribution. Session-level DNI assigns a unique number to each visitor session from a pool of numbers, which reveals keyword-level and visitor-level detail like which PPC term and pages led to the call. Session-level costs more because larger visitor counts need larger number pools, though platforms recycle idle numbers to keep pools efficient.
Does DNI work for pay-per-call agencies?
Yes. Pay-per-call agencies rely on DNI to spin up and assign tracking numbers per traffic source, which lets them prove which campaign produced each billable call. That attribution justifies the payout buyers pay per qualified call. DNI also feeds the routing layer: once a call is attributed and qualified through an IVR, the platform can run a buyer waterfall and connect the caller to the right buyer. Lead Distro AI combines DNI, scoring, and distribution in one platform for both pay-per-lead and pay-per-call agencies.
How much does dynamic number insertion cost?
Cost depends on how many tracking numbers you use and your call volume, because DNI relies on pools of phone numbers. Source-level setups use few numbers and cost little; session-level setups need larger pools and cost more. With Lead Distro AI, call tracking is usage-based: a per-number monthly fee plus a per-minute rate for inbound calls, layered on top of the $299-per-month platform subscription. The 7-day free trial requires a credit card, so you can test DNI on live traffic before committing.
Conclusion
Dynamic number insertion is the quiet engine behind phone call attribution. By swapping the number on your website with a unique tracking number per visitor or source, DNI turns an untraceable phone call into a measured conversion you can tie back to a specific ad, keyword, or session. Source-level DNI keeps things cheap and channel-focused; session-level DNI trades a larger number pool for keyword and visitor detail. For pay-per-lead and pay-per-call agencies, that attribution is what makes paid call campaigns provable and routable. Lead Distro AI ships DNI as part of usage-based call tracking and wires it straight into Claude AI lead scoring and distribution, so the same tracked call that proves your marketing also routes to the right buyer.
Want every inbound call tied to its source and routed to the right buyer automatically? Start your 7-day free trial and run a tracked, swapped call end to end.
About the Author

Founder & CEO of Lead Distro AI & Great Marketing AI
UC Berkeley graduate and former software engineer at Microsoft. Rafael built Lead Distro AI after managing over $10M in ad spend for performance marketing agencies (pay-per-lead and pay-per-call), including running campaigns for Neil Patel. He combines deep software engineering expertise with hands-on performance marketing experience to build tools that help these agencies scale profitably.
About Lead Distro AI
Lead Distro AI: AI-Powered Lead Distribution & Call Tracking That Maximizes ROI
The modern platform for pay-per-lead and pay-per-call agencies. Route, score, and deliver leads with AI-powered automation and real-time P&L tracking. Built for performance marketing agencies and lead buyers across legal, insurance, mortgage, solar, and home services verticals.
4 Distribution Methods
Waterfall, Round Robin, Weighted, Ping-Post
Ping-Post Auctions
Real-time bidding with sub-second routing
Real-Time P&L Reporting
Track revenue, costs, and profit per campaign
Call Tracking
Assign tracking numbers, record calls, and attribute conversions
AI Lead Scoring
Score every lead before routing to maximize conversion
Buyer Portal
Self-serve dashboard for buyers to track leads


