What Is Dynamic Number Insertion (DNI) and How It Works

Dynamic number insertion (DNI) is a call tracking technique that automatically swaps the phone number displayed on your website based on how a visitor arrived. If someone clicks a Google ad and lands on your site, they see one phone number. If someone finds you through an organic search result, they see a different one. When either person calls, you know exactly which marketing channel drove that call. It bridges the gap between online marketing and offline phone conversions, giving you data you’d otherwise never have.

How the Number Swap Works

DNI runs on a small piece of JavaScript installed on your website. When a visitor loads a page, the script detects the traffic source, whether that’s a paid ad, an organic search listing, a social media link, or a direct visit. It then replaces the default phone number on the page with a tracking number assigned to that source. The visitor never notices anything unusual; they just see a phone number and can call it normally. Behind the scenes, the call routes through the tracking number to your real business line, and the system logs which source generated the call.

The JavaScript snippet typically goes on every page of your site, right before the closing body tag. If you run multiple businesses or brands from the same call tracking account, each one needs its own script. Setup through most call tracking platforms involves copying a code snippet from your account settings and pasting it into your site template, a process that takes a few minutes if you’re comfortable editing your website’s code or using a tag manager.

Source-Level vs. Visitor-Level Tracking

DNI comes in two main flavors, and choosing the right one depends on how granular you need your data to be.

Source-level tracking assigns one unique phone number to each marketing campaign or channel. You might have one number for Google Ads, another for your Facebook campaigns, and a third for your email newsletter. When a call comes in on the Google Ads number, you know the caller came from a paid search ad. This approach is straightforward and requires fewer phone numbers, but it only tells you the channel, not the specific keyword or page that triggered the visit.

Visitor-level tracking goes deeper. Instead of one number per channel, you maintain a pool of numbers (at least four is a common minimum) that rotate among individual website visitors. Each visitor gets temporarily assigned their own number for the duration of their session. This lets you see a full visitor timeline: which keyword they searched, which page they landed on, how they navigated your site, and when they picked up the phone. Visitor-level tracking also unlocks integrations that source-level tracking cannot, including Google Ads conversion tracking, multi-channel attribution, and the ability to see call conversions directly inside your ad platform.

There’s an important interaction between the two. If you run both source-level numbers and a visitor-level pool on the same site, source-level numbers typically take priority. That means a visitor arriving through a channel with its own dedicated tracking number might not get assigned a pool number, which can prevent the call from registering as a conversion in Google Ads. Most platforms let you adjust these priority rules, but it’s worth understanding the hierarchy before layering both methods.

What DNI Tells You About Your Marketing

Without call tracking, phone calls are a black hole in your marketing data. You can see that 500 people clicked your ad and 30 filled out a contact form, but the 40 who called your office instead are invisible. DNI closes that gap by attributing each call back to its ad source, giving you a more complete picture of which campaigns actually generate leads.

With visitor-level tracking specifically, you can tie calls to individual pay-per-click keywords. If you’re spending money on 50 different keyword groups in Google Ads, DNI data shows you which ones produce phone calls, not just form fills. That lets you shift budget toward keywords that drive real conversations and cut spending on ones that don’t. You can also feed call conversion data back into Google Ads’ automated bidding algorithms, which improves their ability to find more callers like the ones you’re already getting.

Most call tracking platforms provide dashboards where you can see call volume by source, time of day, call duration, and whether the call was answered. Many also offer call recording and transcription, so you can evaluate lead quality beyond just counting calls. A campaign that generates 100 short, low-quality calls is very different from one that generates 20 long conversations with serious buyers.

Number Pools and Recycling

Visitor-level tracking requires a pool of phone numbers large enough to cover your concurrent website visitors. If your site typically has 10 people browsing at the same time, you need at least that many numbers in rotation, plus a buffer. When a visitor’s session ends, their assigned number returns to the pool and can be given to the next visitor.

This recycling keeps costs manageable. You’re not buying a permanent phone number for every person who visits your site. You’re renting a rotating set that gets reused continuously. Call tracking platforms handle the provisioning and recycling automatically through their APIs, spinning up new numbers or retiring unused ones based on your traffic patterns. For most small to mid-sized businesses, a pool of four to a dozen numbers covers typical website traffic. High-traffic sites may need larger pools.

Impact on Local SEO

One concern that comes up frequently with DNI is whether swapping phone numbers hurts local search rankings. Search engines use something called NAP consistency (name, address, phone number) as a signal for local search results. If your business has different phone numbers floating around the web, it can confuse search engines about which number is the real one.

DNI avoids this problem when implemented correctly because the number swap only happens in the browser via JavaScript. Search engine crawlers typically don’t execute JavaScript the same way a human visitor’s browser does, so they see your real, static business number in the page’s underlying code. The tracking number only appears to live visitors. That said, you should make sure your actual business number remains consistent across your Google Business Profile, directory listings, and other citation sources. DNI should only swap numbers on your own website, not on third-party listings.

Setting Up DNI on Your Site

The technical setup is lighter than most people expect. Here’s what the process generally looks like across major call tracking platforms:

  • Choose your tracking level. Decide whether source-level or visitor-level tracking fits your needs. If you run paid search campaigns and want keyword-level data, visitor-level is the way to go.
  • Get your tracking numbers. Your platform will provision phone numbers for you. For source-level, you’ll select one number per campaign. For visitor-level, you’ll create a number pool sized to your traffic.
  • Install the JavaScript snippet. Copy the code from your platform’s settings and paste it into your website’s template, ideally on every page. If you use a tag manager like Google Tag Manager, you can deploy it through a custom HTML tag instead of editing your site code directly.
  • Configure your integrations. Connect your call tracking account to Google Ads, Google Analytics, or your CRM to push call data into the tools where you already analyze performance.

From there, the system runs on its own. Numbers swap automatically, calls route to your business line, and data flows into your dashboards. Most businesses can go from signup to live tracking in under an hour.

Who Benefits Most From DNI

DNI is most valuable for businesses where phone calls are a primary conversion point. Think home services companies, medical practices, law firms, auto dealerships, real estate agencies, and insurance providers. These are industries where a potential customer is more likely to call than fill out a form, and where each call can be worth hundreds or thousands of dollars in revenue.

If your business rarely gets phone calls from your website, DNI won’t add much. But if you’re spending money on ads and a meaningful share of your leads come in by phone, running campaigns without call tracking means you’re making budget decisions with incomplete data. DNI gives you the missing piece.