Cookie preferences

Choose which optional cookies EndFrame may use on this site. Analytics and advertising tools load only if you allow them, and you can change your mind any time from “Cookie settings” in the footer. Whatever you choose, this tab keeps the campaign labels from the link that brought you, and they are saved with your account if you sign up. Read the Cookie Policy.

Needed for the site to work, such as remembering this choice. Always on.

Lets us load analytics tools through Google Tag Manager, including Google Analytics and Microsoft Clarity session recordings, to understand how the site is used.

Allows advertising tags to measure our ad campaigns. None run on this site today. It also keeps ad click IDs from the page address for this tab, and saves them with your account if you sign up.

Skip to main content

What Is Dynamic Number Insertion? How DNI Ties Phone Calls to Campaigns

A plain explanation of dynamic number insertion for marketers: source-level numbers versus session number pools, how to size a pool, which calls DNI cannot attribute, and how to keep your real number consistent for local search.

The EndFrame Team7 min read

Dynamic number insertion (DNI) is a piece of JavaScript that replaces the phone number shown on your website with a tracking number picked for that visitor. Every tracking number forwards to your real line, so the caller notices nothing. When one of them rings, the call tracking tool looks up who was shown it and records the call against that traffic source, or against that visitor's individual session. That is how a phone lead gets credited to the campaign behind it instead of landing in reports as a call from nowhere. How much detail you get depends on which of two designs you use, and every design has blind spots worth knowing before you buy.

How the number swap works

You add the vendor's script to every page. When a page loads, the script reads what it knows about the visit: the UTM parameters in the landing page URL, the referring site, any ad click ID. It then rewrites the phone number on the page, including the number inside a tel: link, so a tap on a mobile dials the tracking number too. This only works on numbers written as text in the page HTML. A number baked into an image or a banner graphic cannot be rewritten by the script. The call is routed through the vendor's phone system to your line, and the tool logs who called, when, for how long and which number they dialled. Our guide to lead source tracking covers how the same source data is kept for form leads.

Source-level swapping versus session-level number pools

There are two ways to decide which number a visitor sees, and they answer different questions.

DesignHow numbers are assignedWhat a call can be tied toNumbers needed
Source-levelOne number per source: everyone from Google Ads sees number A, everyone from Facebook sees number BThe channel or source only. Every caller from that source looks the sameOne per source you want to separate
Session-level (visitor-level)A pool of numbers per source. Each visitor is lent a number from the pool for their sessionThe individual visit: campaign, keyword, landing page, pages viewed, and any click ID capturedEnough that two live visitors rarely share a number

Source-level is cheap and simple, and it is how offline media is usually tracked too: one number on the billboard, one on the radio advert. It tells you that paid search drove 40 calls last month but not which campaign or keyword. Session-level DNI is what you need if you want calls in the same report as form leads, broken down by campaign and keyword, or if you want to send individual calls back to an ad platform.

How a number pool works, and why size matters

  1. 1A visitor arrives from a paid search ad. The script asks the tool for a number from the paid search pool.
  2. 2The tool lends that visitor a free number and links it to the session, usually through a cookie.
  3. 3The visitor browses, and the same number follows them from page to page.
  4. 4If they call, the tool looks up which session holds that number at that moment and credits the call to it.
  5. 5When the session goes quiet, the number is returned to the pool and can be lent to someone else.

Vendors handle step five differently. Invoca describes monitoring each session for inactivity and returning numbers from inactive sessions to the pool. CallTrackingMetrics remembers which number each visitor saw and keeps showing it on return visits, and its browser-side visitor cookies default to 30 days. Check your own tool's setting, because it decides how long a late call can still be matched.

The risk with a small pool is sharing. If two visitors are holding the same number when it rings, the tool cannot be sure which one called. CallTrackingMetrics scores how likely each match is, shows any match at 5% or greater by default, and suggests aiming for at least a 90% likelihood score per source. So an undersized pool does not show up as missing calls. It shows up as calls credited to the wrong campaign or keyword, which is harder to spot.

For sizing, CallTrackingMetrics recommends one tracking number for every 20 unique daily visitors from each source. A site with 600 paid search visitors a day would need about 30 numbers in the paid search pool by that rule. Ratios differ between vendors, and Invoca notes that larger pools cost more, so treat any ratio as a starting point and check the tool's accuracy report after a few weeks of real traffic.

What DNI cannot see

  • Callers who saved the number or wrote it down. If they kept the tracking number, a pool tool may credit the call to whoever holds that number now. If they kept your real number, the call has no source at all.
  • Printed, hard-coded and image-based numbers: brochures, email signatures, PDF menus, a number inside a header graphic. The script cannot swap what it cannot read.
  • Your Google Business Profile and directory listings. People who call from a map listing never load your site, so they never see a swapped number.
  • Visitors whose browser does not run the script, because of a blocker or scripts disabled. They see the original number.
  • Visitors who decline cookies where the tool waits for consent. CallTrackingMetrics, for example, documents that number swapping does not occur for visitors who decline cookies when its cookies are classed as marketing cookies in the consent banner.
  • Journeys that cross devices or outlast the cookie: someone browses on a work laptop and calls from a mobile a week later.

The practical consequence is that DNI undercounts the web's influence on calls. Compare the calls your tool attributes with the total on your phone system each month. A large gap is normal and usually points at listings, repeat customers and offline media. A short question on the call, such as how the caller found you, can fill part of it; see self-reported attribution for how to record and compare those answers.

Keep the real number in the page source and your listings

DNI should only change what a visitor sees in the browser. The HTML your server sends should still contain your real business number, which is what search engines and directories read. Invoca describes its own script working this way: the real number stays in the page code while visitors see the tracking number. Consistent name, address and phone details across your site and listings matter for local search, so a tracking number should never become the number the web associates with your business. In practice:

  • Keep your main number in the template, footer and any structured data, and let the script swap it on page load.
  • Do not hard-code tracking numbers into directory listings or the site template.
  • If a tool offers a tracking number for your Business Profile, read its local search guidance first and keep your main number listed alongside it.
  • Test in a private window: arrive through a tagged URL and check the number swaps, then arrive directly and check your real number shows.

Google forwarding numbers: a free, Google-only version

Google Ads has its own form of DNI built in. For the conversion type Google calls calls to a phone number on your website, a phone snippet replaces your number with a Google forwarding number for visitors who arrived by clicking one of your ads. A call counts as a conversion only if it lasts at least the minimum length you set, and forwarding numbers exist only in eligible countries. It needs no separate subscription, but it only sees Google Ads traffic, so calls from Meta, organic search or email stay unattributed. Setup is covered in Google Ads call conversion tracking.

Getting call data back into ad platforms

Google's Import call conversions type, like its other types that measure real calls, works only with calls that went through Google forwarding numbers. Calls answered on a third-party tool's numbers reach Google Ads another way: a session-level tool that stored the visitor's click ID, such as gclid, with the call can send that call to Google Ads as an offline conversion, often only once it has been qualified as a sale. Source-level numbers cannot do this, because there is no session and so no click ID to send. See Google Ads offline conversion import for the upload itself, and offline conversion tracking for how Meta and TikTok accept the same kind of data.

Which option fits your business

OptionWhat it measuresBest for
Tracking taps on tel: linksTaps on a phone link, not whether a call connected. No call lengthA rough signal of intent when calls are a minor channel; see tracking phone number clicks
Google forwarding numbersReal calls from people who clicked a Google ad, with a minimum lengthAccounts where Google Ads is the main paid channel
Source-level call trackingReal calls per channel, including offline mediaComparing channels and print or radio advertising on a small budget
Session-level DNI with number poolsReal calls per campaign, keyword and landing page across every channelBusinesses where calls are a main lead source across several ad platforms

Whichever you pick, decide in advance how a call is judged, by length or by outcome, and use the same rule in every report, so call leads and form leads are counted on comparable terms.

Frequently asked questions

Does dynamic number insertion hurt local SEO?

It should not, provided the swap happens in the visitor's browser and your real number stays in the page HTML, your Google Business Profile and your directory listings. Search engines and directories then keep seeing one consistent number. Problems start when tracking numbers are hard-coded into templates, footers or listings, because different numbers for the same business end up published in different places.

Is dynamic number insertion the same thing as call tracking?

No. Call tracking is the wider practice of using dedicated numbers to learn where calls come from. A static tracking number printed on a flyer or read out in a radio advert is call tracking without DNI. Dynamic number insertion is the website part of it: a script that decides which tracking number each visitor sees on the page.

Does DNI track taps on a click-to-call link?

It tracks the call that follows. When the script swaps the number, it usually updates the tel: link as well, so a tap on a phone dials the tracking number and the call is logged against the session. The tap itself is a separate event. If you also record taps as conversions, expect more taps than connected calls, and avoid counting both as primary goals.

Try EndFrame

Add a server-side path for your conversions.

EndFrame collects events first-party and forwards conversions server-side to Meta, GA4, TikTok, and webhooks with event-ID deduplication — then credits each conversion to its campaign, with the visit-to-conversion path you can audit.

No credit card required

Keep reading