
Dynamic number insertion (DNI) is a small piece of JavaScript that swaps the phone number on your website for a tracking number based on where the visitor came from. When that visitor calls, you know which ad, keyword or channel produced the call. Without it, your ad reports show clicks, your phone shows calls, and nobody can connect the two.
For a law firm, a roofing company or an insurance agency paying for Google and Meta traffic, that connection decides where the next ad dollar goes. DNI gives you the source of each call. What happens after the call is a separate problem: who answers, how fast, and whether the lead lands in a pipeline with a follow-up. We build the ads, the AI agents and the CRM at MediaBloom, so this guide covers DNI and the follow-up that makes its data pay off.
TL;DR
- DNI replaces the visible phone number on your site with a tracking number tied to the visitor’s source, so each call is attributed to an ad, campaign or channel.
- A single number per source suits print and profiles. A rotating pool of numbers suits websites and paid traffic, because it can tie a call to one visit’s keyword and landing page.
- Setup is a script on every page, a visible number in a supported format and tracking numbers routed to your real line.
- Attribution only pays off when calls are answered fast and the source follows the lead into your CRM.
- We run ads, AI follow-up and GoHighLevel CRM as one done-for-you system, so source data does not die in a report.
Table of Contents
- What dynamic number insertion means
- How DNI identifies the source and shows the number
- Static numbers vs. dynamic numbers
- What DNI can tell you about a call
- How to set up dynamic number insertion
- What goes wrong with DNI
- Turning call attribution into booked appointments
- Where DNI fits for your business type
- Our perspective
- Put attribution and follow-up in one system
- FAQ
- Sources
What dynamic number insertion means
A “dynamic number” is a phone number that changes on the page depending on who is looking at it. The script on your site replaces your visible number with a tracking number, and that tracking number forwards to your real line. CallRail’s help documentation describes DNI as a JavaScript snippet that swaps the number shown on your website for tracking numbers that route to a destination you choose.
The caller never notices. They see a normal local or toll-free number, dial it and reach your office, intake team or AI receptionist. Behind the scenes, the tracking system logs which number was dialed and matches it to the source it was assigned to.
Two types of swapping exist:
- Source-level swapping. One number is assigned to a whole channel, such as Google Ads or organic search. Every visitor from that channel sees the same number.
- Session-level swapping. Each visitor gets a number from a pool. Nimbata’s guide to DNI explains that this lets a call be tied to that visit’s campaign, keyword and pages viewed.
Source-level tells you which channel works. Session-level tells you which keyword, ad and landing page worked.
How DNI identifies the source and shows the number
When a page loads, the script reads signals that describe how the visitor arrived. CallTracker’s documentation says the snippet reads the referrer, UTM parameters (the tags added to ad URLs, such as utm_source and utm_campaign) and click IDs such as gclid (Google), fbclid (Meta) and msclkid (Microsoft). It then finds phone numbers on the page and swaps in the matching tracking number.
![]()
The swap covers more than the header. Nimbata notes the script can replace numbers in headers, footers, click-to-call buttons and body text as the page loads. A cookie keeps the same number on return visits, according to CallRail’s documentation, so a visitor who comes back and calls tomorrow is still tied to the original source.
Some platforms add geography. CallTrackingMetrics describes a GeoContact option that can show a number based on the visitor’s location. That matters for multi-location businesses, such as an HVAC company serving several metros that wants a local area code in each.
Static numbers vs. dynamic numbers
People searching this topic often ask about the difference between static and dynamic numbers. A static tracking number stays assigned to one source. A dynamic number changes by visitor.
| Static tracking number | Dynamic number (pool) | |
|---|---|---|
| Where it lives | Billboards, mailers, flyers, vehicle wraps, directory listings | Your website and landing pages |
| What it tells you | Which source the call came from | Source, plus campaign, keyword and landing page |
| Needs a script | No | Yes |
| Number inventory | One per source | A pool sized to your traffic |
Nimbata’s DNI feature page says static numbers suit print, radio, TV and profile placements, while DNI suits websites and digital traffic, and recommends using both for online and offline attribution. WhatConverts’ help center adds that channels where a script cannot be installed, such as flyers, billboards, mailers, Google Business Profile and ad extensions, use static attribution that records caller ID, call duration and location.
Practical rule: use a static number wherever you cannot run code, and a pool wherever you can.
What DNI can tell you about a call
The depth depends on the swapping method. With a pool, the WhatConverts documentation lists data such as:
- Source and medium (for example Google Organic, Facebook Ads, Bing Ads)
- Campaign, content and keyword
- Lead page and landing page
- User data such as IP address, browser, operating system and device
For paid social, 800.com’s integrations page says calls from Facebook and Instagram ads can be tied back to the ad set, campaign or creative through UTM parameters. That means your Meta report can show which creative produced phone calls, not only form fills.
The choice is about granularity. Marchex’s documentation frames it as broad channel-level attribution, such as organic Google search versus Bing, against session-based keyword and campaign attribution for paid clicks. If you spend heavily on search, session-level is the one that answers real budget questions. If you run a small mix of channels, channel-level may be enough.
How to set up dynamic number insertion
The steps below follow the common pattern in vendor setup guides. Your tracking platform’s exact screens will differ.
1. Decide the attribution level
List your traffic sources: Google Ads, Meta ads, organic search, Google Business Profile, email, direct. Decide whether you need channel-level or keyword-level answers. A pool must be sized for traffic: Nimbata notes the extra granularity needs a pool large enough for your simultaneous visitors, so a busy campaign needs more numbers than a quiet one.
2. Provision tracking numbers
Buy or provision numbers inside your tracking platform and set a destination for each: your main line, your intake line or your call-handling system. CallTrackingMetrics lists purchasing and configuring source numbers, then creating target numbers, as setup steps.
3. Put one clean number on the page
CallRail’s setup guide requires a visible phone number in HTML or in an image, and supports formats such as 111-222-3333, 111.222.3333 or (111) 222-3333. If your site shows the number in an unusual format, or built from separate pieces of text, the script may not find it. Standardize the format first.
4. Install the snippet on every page
CallRail says to add the account’s JavaScript to each page of the site. Nimbata lists one-line code, Google Tag Manager and a WordPress plugin as install options. Landing pages built in separate tools need the snippet too. A page without it keeps showing your regular number, and those calls land in an “unknown” bucket.
5. Set swap rules and lease time
Rules decide which sources get which numbers. Some platforms also set how long a tracking number stays on the page. RingSquared’s setup guide describes a lease duration that controls how long a number stays assigned and advanced parameters for campaign, ad group and keywords.
6. Connect your ad and analytics accounts
Most platforms can pass calls back as conversions so your ad platform optimizes toward calls that matter. KaiCalls notes that sending conversions to Google Ads or GA4 needs a separate connection, and that Google Ads needs a usable Google click ID. If you also track other traffic sources in GA4, tracking traffic sources in Google Analytics 4 shows how to read non-traditional referrers alongside the call data.
7. Test in a private window
Open your site in an incognito browser through a tagged ad URL (add UTM parameters yourself), confirm the number changes, call it and check that the call appears with the right source. Do this for each landing page and each major source.
What goes wrong with DNI
Most failed installs come from a short list of problems:
- Number not detected. The number is not in HTML or an image, or it is in an unsupported format.
- Missing pages. The snippet is on the main site but not on landing pages, checkout flows or a booking subdomain.
- Too few numbers in the pool. When visitors outnumber the pool, numbers get reused and attribution blurs.
- Hard-coded numbers. A click-to-call button or a footer with a number baked into an image will not swap.
- No cookie disclosure. CallRail’s guide says to notify visitors about cookie use. Match your site’s privacy notice to what your tracking tool sets.
- Lost click IDs. If redirects or form tools strip the gclid, calls cannot be reported back to Google Ads.
- Offline sources mixed in. Billboards and mailers need their own static numbers, or they get credited to “direct.”
Run the incognito test again after every site redesign or landing page change. Redesigns are the most common way DNI quietly breaks.
Turning call attribution into booked appointments
Knowing a call came from a Google Ads keyword is only half the job. The value comes from what you do next.
Pass the source into your lead record. Some systems do this natively. Funnel’s developer documentation says its DNI script analyzes UTM source, medium, campaign and referrer, maps them to a campaign, tags scheduler appointments with the right marketing source and can capture the GCLID on the lead record. Whatever platform you use, the principle holds: the source should travel with the lead into your CRM.
Define what a good call is. Call volume is a vanity number. ServiceTitan’s Google Ads integration documentation shows one way to do this: calls count as leads when they are booked, or when unbooked calls run over 60 seconds and are not excused, and booked jobs whose last touchpoint was a DNI number are tracked as a separate conversion. Copy the idea: tell your ad platform which calls are worth more, not just which ones rang.
Answer the call. Attribution on a missed call tells you exactly which ad you wasted. Our guide on what missed calls cost your business shows how to put a dollar figure on it. After-hours calls and overflow are where AI receptionists and speed-to-lead follow-up earn their place.
Close the loop. Use the source data to move budget. Our post on AI campaign attribution covers what to track once calls, texts and forms all feed the same reports.

Example: a home services contractor
Imagine a roofing company running Google search ads and Facebook ads, with a pool on its website and a static number on yard signs and truck wraps. After a month the report shows which campaign produced calls over a minute long, which produced booked estimates, and which produced only short wrong-number calls. The owner shifts budget toward the campaigns that book. The setup was only half of the win. The other half was a phone answered within seconds on every one of those calls.
Example: a personal injury firm
A firm buying leads from several channels sees calls, but intake cannot tell which channel sends signed cases. With source data attached to each intake call, the firm can compare channels by signed retainers instead of call counts. This is the logic behind how we run pay-per-signed-case acquisition: you pay for signed retainers, not leads. The measure that matters is the signed case, and the source data is only useful when it leads there.
Where DNI fits for your business type
- Personal injury and MVA firms: high-value calls, often at night and on weekends. Prioritize session-level tracking on search campaigns and fast intake. See our page on AI for law firms.
- Home services contractors: calls drive the business. Pair DNI with 24/7 phone answering for home services so storm-season and emergency calls are never missed.
- Insurance agencies: calls from comparison-shopping traffic need speed. See AI customer service for insurance agencies.
- Other local service businesses: if more than a third of your leads call rather than fill out a form, call attribution deserves the same attention as form tracking.
Our perspective
Call tracking is a measurement tool, and measurement does not book appointments. We see the same gap in how businesses buy marketing: one vendor runs the ads, another tracks calls, a third owns the CRM, and nobody owns what happens between the click and the signed or booked job.
That is why we run it as one done-for-you system. We build the ads on Google, Facebook, Instagram and ChatGPT, build the AI agents that call, text and book around the clock, and set up the GoHighLevel CRM, pipelines and automations so a lead keeps moving after the first touch. Our team books the appointments.
Attribution is what makes that system improve. When the source of a lead is known, the follow-up can be matched to it, and the next month’s budget can follow the campaigns that book. For personal injury and MVA firms, we take it further: you pay only for signed retainers, not leads.
The question to ask about any tracking setup is simple. Does the source data reach the person or system that follows up, and does it reach them in seconds?
MediaBloom
Put attribution and follow-up in one system
MediaBloom is a Tampa, Florida agency that has served 300+ businesses since 2022 and holds a 4.8-star Google rating. We build and manage ads management, speed-to-lead AI and CRM automation with GoHighLevel setup, so the traffic you pay for turns into booked appointments without gaps between vendors. If your calls are going unanswered or your CRM follow-up is leaking leads, start at mediabloom.us.

If you run paid search, our Google Ads solution is built around capturing high-intent demand and turning it into qualified appointments.
FAQ
What does dynamic number mean?
It means a phone number that changes on your page depending on who views it. A script swaps your regular number for a tracking number tied to the visitor’s source, and calls to that number forward to your real line.
What is the difference between static and dynamic numbers?
A static tracking number stays assigned to one source, such as a billboard or a business listing. A dynamic number comes from a pool and changes per visitor, so it can capture details like the keyword and landing page. Most businesses use static numbers offline and a pool online.
Does DNI work with Google Ads and GA4?
Yes, with the right connection. Most platforms can report calls as conversions to Google Ads and GA4, but Google Ads needs a usable Google click ID, and the link between systems is a separate setup step. Test it with a tagged ad URL before relying on the numbers.
Do I need DNI if most of my leads come from forms?
If calls are a meaningful share of your leads, yes, because form tracking misses them entirely. For businesses where customers phone first, such as roofing, HVAC, personal injury and insurance, call attribution often explains why ad reports and real lead volume do not match.
Sources
- Dynamic number insertion overview, call tracking help center
- Dynamic Number Insertion (DNI): What It Is and How It Works, Nimbata
- Dynamic Number Insertion for call tracking, Nimbata
- How does dynamic number insertion work, CallTracker
- How Does Dynamic Number Insertion Work, CallTrackingMetrics help article
- Understand Call Tracking, WhatConverts help center
- Call tracking integrations, 800.com
- DNI overview, Marchex developer documentation
- Call Tracking and Dynamic Number Insertion, KaiCalls
- Dynamic Number Insertion, Funnel developer docs
- Google Ads integration, ServiceTitan help
- Tracking traffic sources in Google Analytics 4



