← Back to blog

Dynamic Number Insertion Setup: A Step-by-Step Guide

November 10, 2026
Dynamic Number Insertion Setup: A Step-by-Step Guide

To set up dynamic number insertion (DNI), you do five things. Create a pool of tracking numbers, install one JavaScript snippet on every page that shows your phone number, tell the platform which traffic sources to track, connect it to Google Ads, and test it from several sources on desktop and mobile. Most small business sites can finish the technical part in an afternoon. The part that decides whether your data is trustworthy is pool size and testing, so we cover both in detail below.

This guide is for business owners and marketers who get calls from their website and want to know which ad, keyword or page caused each one. It also covers how to report those calls to Google Ads as conversions.

Digital Marketing All
Make Every Call Easier to Trace
Digital Marketing All helps local businesses improve online visibility through SEO, PPC, and conversion-focused digital marketing.
Explore digital marketing services

TL;DR

  • DNI swaps the phone number on your site for a tracking number assigned to each visitor session. The call is then logged against that visitor's source, campaign and keyword.
  • You need a visible number in a standard format, a pool of tracking numbers, a snippet on every page with a number, and access to edit your site or tag manager.
  • Pool size is the most common cause of bad data. Size it to peak concurrent visitors, then watch utilization and adjust.
  • For Google Ads, turn on auto-tagging, create a call conversion action and make sure the number format you enter matches your page exactly.
  • Test every source, every device and a live call before you trust a report or change a bid.

Table of Contents

What dynamic number insertion does

Without call tracking, every phone call looks the same. A call from someone who clicked a Google ad, a map listing or an email link all arrive on the same line. DNI fixes that. It replaces the phone number on your website with a unique tracking number based on traffic source, keyword, campaign or session, so an inbound call can be linked to the channel that produced it.

Here is how it works in practice:

  1. A visitor lands on your site.
  2. A script reads where they came from and assigns a number from your pool.
  3. The script swaps the number shown on the page.
  4. The visitor calls that number.
  5. The platform forwards the call to your real business line and logs it against the visitor's original source.

The session data behind this is richer than most people expect. According to one platform's documentation, session records can hold UTM parameters, landing page, referrer, Google, Facebook and Microsoft click IDs, visitor IP and user agent. That is what lets you see not just "paid search" but which campaign, ad group and keyword produced the call.

DNI versus a single tracking number

A single tracking number per channel (one for your Google Business Profile, one for a print ad) tells you the channel and nothing deeper. DNI gives you visitor-level detail on your website. Most businesses use both: static numbers for places where a script cannot run, DNI for the site itself.

Why this matters for ad spend

If you run paid search and a meaningful share of your leads arrive by phone, form-fill data alone hides the keywords that drive calls. Feeding call data back to the ad platform means it can optimize toward the terms that produce calls, not only the terms that produce form fills. For service businesses such as plumbers, dentists, law firms and HVAC companies, that is often where the real revenue sits. If calls are your main goal, our comparison of call-only ads and standard search ads for service leads shows how to think about the campaign side.

Before you start: what you need

Gather these items first. Missing one is the usual reason a setup stalls halfway.

RequirementWhy it matters
A visible phone number in a standard formatThe script finds the number to replace by matching its format
A tracking number poolThe numbers that get assigned to sessions
Edit access to your site or a tag managerYou must install the snippet
A Google Ads account (for ad call conversions)Needed to report calls as conversions
A list of the sources you want to separatePaid, organic, direct, referral, email, social

One call tracking platform's help documentation says the page needs a visible telephone number in HTML or an image in one of three formats: 111-222-3333, 111.222.3333 or (111) 222-3333. Check your own platform's list, but standardize on one of those common formats across your site. It also means the number must be real text on the page. A number baked into a banner image is a number the script cannot swap.

For Google's own forwarding-number option, you need a Google Ads account, a business in an eligible country, a site you can put the tag on, and the ability to add a JavaScript snippet that replaces your number.

Audit your site's phone numbers first

Before you touch any code, walk through your site and list every place a number appears:

  • Header and footer
  • Contact page
  • Landing pages
  • Service pages
  • Sticky mobile call buttons
  • Click-to-call links (tel: links)
  • Embedded forms or widgets
  • Images and PDFs

Note which are plain text, which are links and which sit inside an iframe or image. Those last two are where swaps most often fail, and you want to know that before launch, not after a week of missing data.

Step 1: Choose and size your number pool

The pool is the set of tracking numbers the platform hands out to live sessions. Too few and two visitors may see the same number at the same moment, which breaks attribution. Too many and you pay for numbers you never use.

How a pool behaves matters for sizing. In one platform's documentation, each pool has active tracking numbers, a session timeout and optional fallback behavior. When a visitor arrives and has no session, a random available number is picked, and the tracking script sends heartbeat updates every 60 seconds to keep active sessions alive.

Rules of thumb for pool size

There is no official standard, and vendors give different figures. Treat these as starting points:

  • One provider's guide suggests, for a site under 500 daily unique visitors, 8 to 20 numbers. It lists 20 to 60 for 500 to 2,000 daily visitors, 60 to 175 for 2,000 to 10,000, and 175 to 550 for 10,000 to 50,000.
  • Another vendor's setup guide takes a different approach for small sites, advising that under 5,000 monthly visitors you start with 5 tracking numbers plus an overflow number.
  • A third guide says pool size should be about a quarter of peak hourly concurrent traffic, doubled if you run multiple campaigns or landing pages that need isolation and tripled for seasonal spikes.

The figures differ because the vendors count different things: daily visitors, monthly visitors or concurrent sessions. The idea behind all of them is the same. Size to your busiest moment, not your average day.

A simple way to pick your starting number

  1. Open your analytics and find your busiest hour of the week over the last quarter.
  2. Note how many visitors were on the site at once at that peak.
  3. Add a buffer of about 25 to 50 percent.
  4. If you run separate campaigns that must not share numbers, add separate pools or add numbers per pool.
  5. Add an overflow number for the moment the pool runs out.

Then watch it. The same provider that gave the sizing table says that if utilization regularly exceeds 80 percent you should add numbers, and if it stays below 30 percent you may be able to reduce the pool. Review it monthly for the first quarter and after any big campaign launch.

Local numbers or toll-free?

For a local service business, local area-code numbers usually feel more familiar to callers than toll-free ones. Whichever you choose, keep the visible format consistent with the formats your script recognizes, and keep the area code of the pool matched to the market you serve if you are running location-specific campaigns.

Step 2: Install the JavaScript snippet

The snippet is the piece of code that does the swapping. Where you paste it depends on your site.

The basic method

The usual instruction is to copy the snippet from your platform's integrations area and paste it into each website page before the closing body tag. The same help article says the snippet needs to be on the visitor's landing page and on every page that has a phone number or web form you want to track.

That last point is easy to miss. If a visitor lands on page A (no number), then moves to page B (number shown) and the snippet is only on page B, you lose the landing page and source data from the first page. Put the snippet site-wide.

Common installation routes

  • Site-wide template or theme footer. Best for most small business sites. One paste covers every page.
  • Google Tag Manager. Good if you already manage tags there. Add the snippet as a custom HTML tag that fires on all pages.
  • A plugin for your CMS. Some platforms offer plugins that insert the code for you. Confirm it covers every template, including landing pages.
  • Landing page builders. These often need the snippet added separately in each page's settings.

If your phone number sits inside a form tool, scheduling widget or chat plugin, check whether it renders inside an iframe. A script on your page cannot normally swap text inside a frame that belongs to someone else's page.

Mobile visitors often tap a button rather than read a number. Those buttons are usually tel: links. One guide lists click-to-call on mobile not firing tracking among the most common failures, because a tel: link can bypass a simple text swap. Test your mobile call buttons specifically. If you want to improve how people use those buttons once tracking works, see our 6 to 8 week click-to-call experiment.

Step 3: Configure traffic sources

A tracking number is only useful if it carries meaning. Set up your sources so the platform knows how to label each session. A typical setup includes:

  • Paid ads: Google Ads, Bing Ads and paid social
  • Organic search: Google, Bing and others
  • Direct traffic: people typing your address or using bookmarks
  • Referral traffic: other sites linking to you

This mirrors the source types in one provider's DNI setup guide, which also tells you to test by visiting from different sources and checking that the displayed number changes.

Add the sources your business actually uses beyond those basics: email campaigns, review sites, a Google Business Profile link, a partner site. The more precise your source list, the more useful your reports.

Use consistent UTM tags

The script reads click identifiers and UTM parameters to label each session. If your email or social links carry no UTMs, they land in "direct" or "referral" and you cannot tell them apart. Pick a naming convention (lowercase, no spaces) and apply it to every campaign link. Do not let redirects or link shorteners strip parameters. One guide names UTMs stripped by redirects or link shorteners as a frequent cause of wrong attribution.

Step 4: Connect Google Ads call tracking

This is the step most readers searching for call tracking on a website care about most, because it turns calls into something your campaigns can learn from.

Option A: Google forwarding numbers

Google's own method has two parts. You create a conversion action and set up your Google tag, then a phone snippet replaces the number on your site with a Google forwarding number. You then see how well your ads lead to phone calls.

In the Google Ads interface, the broad flow is:

  1. Go to the conversions area and create a new conversion action.
  2. Choose phone calls, then calls from your website.
  3. Set the count and value settings that fit your business.
  4. Install the Google tag on every page, then add the phone snippet to pages where your number shows.
  5. Enter the number exactly as it appears on the page.

Google's help for importing call conversions repeats a few conditions: for website calls you need at least one call asset applied to the campaign you want to track, the snippet on pages where your number appears, and the exact digits that show on your site entered in the snippet.

One thing to watch: match the number format on your page. If the page shows (555) 123-4567, enter it that way. Mismatches are a leading reason the snippet finds nothing to replace.

Option B: Send call data from your DNI platform

If you already use a third-party call tracking platform for DNI, you can pass calls to Google Ads from there. Call conversions captured by DNI can be imported into Google Ads as offline conversions or sent in real time through a forwarding number integration.

Option B: Send call data from your DNI platform

Two details matter here. First, auto-tagging must be on, because the platform uses the Google click ID to recognize Google Ads calls. One platform's help center says only Google PPC calls to visitor tracking numbers report as conversions. Second, be patient: the same article says the first conversion can take 24 to 48 hours to appear after initial setup.

Which option should you choose?

SituationLikely best fit
Only run Google Ads, want the simplest pathGoogle forwarding numbers
Run several channels and want one call reportA DNI platform feeding Google Ads
Need keyword-level call data across paid and organicA DNI platform
Need call recordings or call scoringA DNI platform

Do not run two number-swapping scripts on the same page without planning. Two scripts competing for the same number will produce unpredictable results.

Set a meaningful minimum call length

A call that lasts three seconds is rarely a lead. Most setups let you set a minimum duration before a call counts as a conversion. Choose a figure that reflects how long a real enquiry takes in your business, then review a sample of recordings or call logs to confirm it fits. If you also track calls that turn into booked jobs, our guide to tracking offline conversions explains how to connect the sale back to the click.

Step 5: Test before you trust it

Do not skip this. A setup that looks right can still misattribute for weeks.

The guidance from platform documentation is consistent: check key pages on desktop and mobile, place a live test call, and clear caches before assuming the change is live.

A practical test plan

  1. Open a private browser window and visit your site directly. Note the number shown.
  2. Visit through a tagged link. Add UTMs to a test URL and visit it. The number should differ from the direct visit.
  3. Click a real ad (or use a URL with a click ID if your platform supports it) to confirm paid sessions get a paid number.
  4. Check every template: homepage, service pages, contact page and any landing page.
  5. Check desktop and mobile. Tap the call button on a phone.
  6. Place a live call to each number you see and confirm it rings your real line.
  7. Look at the call log. The call should appear against the source you used.
  8. Return to the site in the same browser. The platform stores the visitor's source in a cookie, so the visitor keeps seeing the same number on return.
  9. Wait a day or two and confirm the first Google Ads call conversion appears.

Record the results in a simple sheet with the date, URL, device, number seen and source logged. When something changes on your site later, you can rerun the same test in minutes.

Troubleshooting common problems

Most issues fall into a handful of causes. Common reasons for numbers not swapping include a script loading too late, a number format mismatch, numbers in images or iframes, ad blockers and stale CDN cache.

SymptomLikely causeFix
Number never changesSnippet missing on that page, or format mismatchConfirm the snippet is on the page and the visible number uses a recognized format
Number flickers or swaps lateScript loads too low or too slowlyPlace it before the closing body tag and avoid heavy blocking scripts above it
Mobile button shows the original numbertel: link not handledTest mobile specifically and check how your platform treats tel: links
Number inside a form or widget is untouchediframe isolationMove the number outside the frame or use a static tracking number there
Calls attributed to the wrong sourcePool too small, so numbers are recycled too fastAdd numbers and review utilization
Everything shows as directUTMs stripped or cookies blockedFix redirects and keep UTMs intact
No keyword data from Google AdsAuto-tagging offTurn on auto-tagging
Old number still appears after a changeStale CDN or page cachePurge caches after any change
Swaps stopped after a redesignSelector or template changedRecheck the number markup after template updates

The most common cause sits in that table's attribution rows. One guide notes that pool exhaustion, template changes and iframe isolation are among the five most frequent failures. Another points out that the DNI session cookie may be blocked or cleared by browser privacy settings, so no setup captures 100 percent of visitors. Aim for data that is good enough to make decisions, and compare it with your own call log periodically.

Keep your numbers visible and consistent

If your business also depends on map listings and local search, the number you show on your site should match the one on your Google Business Profile and directories. Local ranking depends on consistent business details, so keep your main number as the one listed publicly, and use tracking numbers as the swappable layer on your site. Do not replace the primary number on your listings with a DNI number.

Perspective: why call data changes how we run campaigns

We look at every campaign from a return on investment point of view, and calls are where that view often gets blurry. A click report says a keyword is working. It rarely says whether the phone rang, who called or whether the call turned into a customer.

For local and service businesses, that gap is expensive. We see budgets drift toward the keywords that produce form fills because those are the ones that get measured, while the terms that drive high-value phone calls go unrewarded. Dynamic number insertion closes that gap, provided it is installed carefully and tested.

Our advice is to treat setup as the start of a loop. Install it, test it, review the call log against what actually happened in the business, then feed the findings into your ads, your landing pages and your local search work. Visibility in search and on the map brings people to your site. Clean call data tells you which of those visits are worth paying for.

The businesses that benefit most are the ones that act on the numbers every month rather than every year.

Diane O'Brien

Getting more from your call data

Once tracking runs cleanly, use it. A few habits make the difference between a dashboard and a decision.

  • Review calls by keyword monthly. Pause terms that produce only short or wrong-number calls. Give budget to terms that produce booked jobs.
  • Compare landing pages. If one page produces twice the calls from the same traffic, find out why and copy it.
  • Tag outcomes. Mark calls as lead, existing customer, spam or sale, so you measure cost per real lead, not cost per call.
  • Check call timing. If calls arrive when nobody answers, change ad schedules or add call handling.
  • Spot duplicate bidding. Multi-location businesses sometimes compete against themselves in the same auction. Our piece on wasted ad spend across locations explains how to find and fix it.

Also keep in mind that rules and platform features change. Check your platform's and Google's current documentation before major changes, and record any consent or call recording notice your state requires, in line with advice from your own counsel.

Need help with the campaigns behind the calls?

Tracking tells you what is working. The next step is getting more of the right calls. We manage Google Advertising and related paid and local services for small and mid-sized businesses, with every campaign judged on return. If local map visibility is your priority, our Local Domination service is published at $450 per month, and you can see the details on the Local Domination page. If you want a wider package across search and AI platforms, Be Found Everywhere is listed on the same page at $1,595 per month.

FAQ

Does dynamic number insertion work with a number in an image?

No, not by itself. The script looks for a phone number in the page's text in a recognized format, so a number inside an image is not replaced. Put the number in real text, or use a separate static tracking number for that image.

How many tracking numbers do I need?

It depends on your busiest period, not your monthly total. Vendor guidance ranges from a handful of numbers for a low-traffic site to dozens for a few thousand daily visitors, so start with a modest pool, then watch utilization. If it regularly passes 80 percent, add numbers.

Why is my Google Ads call conversion not showing up?

Check that auto-tagging is on, that the conversion action is set to calls from your website, and that the number you entered matches the page exactly. Then allow time: after first setup, the first conversion can take 24 to 48 hours to appear.

Will DNI slow down my website?

It adds one script, so keep it light and place it before the closing body tag. Test page speed before and after installation and make sure nothing blocks it from loading.

Can I use DNI and Google forwarding numbers together?

It is better to choose one swapping method per page. Two scripts that both try to replace the same number can conflict, so decide which tool owns the swap and send its data to Google Ads.

Sources