What Is Dynamic Number Insertion?
Dynamic Number Insertion (DNI) is a call tracking technology that automatically swaps the phone number displayed on your website based on how the visitor arrived. Each visitor sees a unique tracking number tied to their session, enabling you to attribute phone calls to specific traffic sources, campaigns, keywords, and even individual ad clicks.
Why DNI Matters
Without DNI, website call tracking is limited to a single static tracking number that tells you "this call came from the website" but nothing more. With DNI, you know:
- Which traffic source brought the visitor (Google organic, Google Ads, Facebook, direct, referral)
- Which specific campaign or ad group they clicked
- Which keyword they searched (via gclid for Google Ads)
- Which landing page they entered on
- Which pages they viewed before calling
- How long they browsed before picking up the phone
This visitor-level attribution transforms your understanding of what drives phone calls.
Set Up DNI in 5 Minutes
One JavaScript snippet. Every visitor gets a unique number. Full attribution.
How DNI Works Technically
The Number Pool
DNI uses a pool of tracking numbers rather than a single number. When a visitor arrives at your website, a number from the pool is assigned to their session. As long as they're on your site, they see that specific number. After their session expires (typically 30 minutes of inactivity), the number returns to the pool for the next visitor.
Pool size depends on your traffic volume — you need enough numbers to cover concurrent visitors, not total visitors. A site with 500 daily visitors but an average of 15 concurrent visitors only needs about 20 numbers in the pool.
The JavaScript Snippet
The DNI system runs via a lightweight JavaScript snippet added to your website. When a page loads:
- The script fires and identifies the visitor (using cookies for return visitors or creating a new session)
- It reads traffic source information from URL parameters (UTMs, gclid, fbclid) and the HTTP referrer
- It requests a number assignment from CallScaler's API
- It replaces all instances of your business phone number on the page with the assigned tracking number
- It updates both visible text and click-to-call href attributes
This entire process happens in under 100 milliseconds, making it imperceptible to visitors.
Session Management
DNI sessions use cookies to maintain consistency. If a visitor sees number (555) 123-4567 on your homepage, they'll see the same number when they navigate to your services page. This prevents confusion and ensures attribution remains accurate even if the visitor browses multiple pages before calling.
Sessions typically expire after 30 minutes of inactivity. If the same visitor returns the next day, they may get a different number — but the new session is tracked independently with its own source attribution.
Setting Up DNI with CallScaler
Step 1: Create a Number Pool
In your CallScaler dashboard, create a new number pool. Select your desired area code and choose how many numbers to include. Start with the guidelines:
- Small sites (under 100 daily visitors): 4-6 numbers
- Medium sites (100-1,000 daily visitors): 8-15 numbers
- High-traffic sites (1,000+ daily visitors): 15-30+ numbers
Step 2: Configure the Swap Target
Tell CallScaler which phone number on your website to swap. You can specify the number directly (e.g., "swap all instances of (555) 000-1234") or use a CSS selector to target specific elements.
Step 3: Install the Snippet
Copy the JavaScript snippet and add it to your website. The snippet goes just before the closing body tag. For WordPress sites, you can use a header/footer plugin. For custom sites, add it directly to your template. For single-page apps (React, Next.js, etc.), integrate it into your layout component.
Step 4: Verify Installation
Visit your website from different sources (or use UTM parameters) and confirm that the phone number changes. CallScaler's debug mode shows which number is assigned and what source was detected, making verification easy.
DNI and SEO
A common concern is whether DNI affects SEO. The answer is no, when implemented correctly. Because DNI operates via JavaScript, search engine crawlers see your original business phone number in the HTML source. The number swap only happens in the browser for human visitors with JavaScript enabled.
CallScaler's implementation specifically ensures your real number remains in the DOM initially, with the swap occurring after JavaScript execution. This protects your NAP consistency for search engines while enabling full call attribution for visitors.
Advanced DNI Features
- Source-specific pools — Use different number pools for different traffic sources (e.g., local numbers for organic visitors, toll-free for paid traffic)
- Multi-location support — Swap different numbers on different location pages
- Conditional swapping — Only swap numbers for certain traffic sources or visitor segments
- Real-time availability — The API ensures only available (non-assigned) numbers are distributed
The Bottom Line
DNI is the difference between knowing "we got 50 calls from our website" and knowing "we got 23 calls from Google organic, 15 from Google Ads (including 8 from the keyword 'emergency plumber'), 7 from Facebook ads, and 5 from direct visits." That level of detail transforms how you optimize your marketing. If you have a website and phone number, you should be using DNI.