Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Dynamic number insertion not swapping for ad traffic: fix it

DLV-225Medium impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Call tracking tools such as CallRail show each visitor a different phone number depending on their source. A small script runs in the browser, finds your phone number in the page and replaces it with a tracking number from a pool. This is called dynamic number insertion, or DNI.

The problem here is that the swap does not happen for ad traffic. The visitor sees your normal "default" number. They may still call, but the call is logged as direct or unknown, so you cannot see which campaign produced it.

Where the swap breaks
  1. Ad clickVisitor lands with gclid or UTMs
  2. Page loadsCall tracking script should run
  3. Number swapDefault number stays on the page
  4. Call madeDialled on the default number
  5. AttributionCall not linked to the ad

The visitor arrives from an ad, but the script never replaces the number, so the call is not tied to the campaign.

Why it costs you leads or sales

The calls still arrive, so this issue is easy to miss. The cost is in the data. Without a source on each call, you cannot tell which keywords or campaigns drive phone leads. Call conversions are not sent back to Google Ads, so bidding learns only from form fills and under-values campaigns that produce calls.

You may then cut budget from campaigns that are actually working, or keep funding ones that are not. If your reports show calls as direct, this is a likely cause.

Calls credited to the right sourceExample numbers
Calls credited to the right source (example)Swap broken: 10 %; Swap working: 90 %034691090Swap brokenSwap working%

Example: share of ad-driven calls that show a campaign source before and after fixing the swap. Numbers are illustrative.

How to check if your site has it

Test it as an ad visitor would. Use a private browser window with extensions off, so cookies and blockers do not interfere.

Test the swap by hand
  1. Build a tagged URL

    Add the parameters your tool uses to your landing page URL, for example ?utm_source=google&utm_medium=cpc&utm_campaign=test. For Google Ads sources, many tools also look for gclid, which only real ad clicks carry. Check your tool's source rules.

  2. Open it in a private window

    Load the page and look at every place your number appears: header, footer, hero, buttons and contact page.

  3. Compare with the default number

    If the number matches the one you normally publish, it did not swap. A swapped number should be one from your tracking pool.

  4. Inspect the page

    Right-click the number, choose Inspect, and see whether it is plain text, an image, or a link. Then open the Network tab and look for the call tracking script request. A blocked or failed request means the script is the problem.

  5. Check the tool's own log

    Most call tracking tools show recent sessions and the number assigned to each. If your test visit is missing, the script did not run.

How to fix it

These are the usual causes. Work through them in order.

Common causes of a failed number swap
CauseWhat you seeFix
Script missing or blockedNo tracking script request in the Network tabInstall the snippet in the site-wide header, or fix the tag in your tag manager
Number on page does not matchScript loads but number stays the sameMake the published number match the default number set in the tool, exactly
Number is an image or inside a widgetNumber looks right but cannot be selected as textUse real text or a tel: link
Source rules do not match ad URLsOrganic visits swap, ad visits do notAlign the tool's source rules with your UTMs and gclid
Redirect strips parametersURL in the browser has no UTMsKeep the query string through redirects
Consent banner blocks the scriptSwap works only after accepting cookiesReview the tool's consent settings with your legal advice
Number pool exhaustedSwap fails at busy timesAdd more numbers to the pool
Make sure the script loads on every page
  1. Add the snippet site-wide

    Use your theme's header scripts option or a header and footer plugin to paste the snippet from your call tracking tool. Avoid adding it to one page only.

  2. Clear caches

    Purge your caching plugin and CDN, then retest. Some optimisation plugins delay or combine scripts, so exclude the call tracking script if the swap runs late or not at all.

Then fix the number and source rules
  1. Match the default number

    In your call tracking tool, check the number it is set to replace. Compare it character by character with the one on the page, including spaces, dashes and country code. Many tools match formatted variants but not all.

  2. Use text and tel: links

    Make sure phone numbers are real text. For click-to-call, use a link like the example below so the number inside and the href both get swapped.

  3. Check the source rules

    Open the pool or tracker settings for paid search. Confirm it is set to match Google Ads traffic by gclid or UTM medium, and that your ad final URLs use the same values.

  4. Keep parameters through redirects

    If your ad URL redirects, test that the final URL still includes the query string. Remove or fix redirects that drop it.

  5. Add numbers if the pool is small

    If many visitors are on the site at once, a small pool may run out. Add numbers according to your tool's guidance.

Click-to-call link and visible numberhtml
<a href="tel:+15551234567">(555) 123-4567</a>

How to confirm it's fixed

Confirmation checks
  • A tagged URL in a private window shows a tracking number, not the default one, in every place the number appears
  • The click-to-call link uses the swapped number in its tel: value
  • The call tracking script request succeeds in the Network tab
  • Your test visit appears in the tool's session log with the right source
  • Placing a test call to the swapped number connects and is logged with the campaign source
  • The default number still shows for visitors with no matching source
  • Checks pass on mobile and desktop and on several landing pages

How to prevent it happening again

Habits that keep the swap working
  • Retest the swap after theme changes, new landing pages, redesigns or a switch of page builder
  • Keep one default number and update the tool whenever the published number changes
  • Exclude the call tracking script from script delay and minify settings if it breaks
  • Test every new ad final URL once before launch
  • Review call sources monthly and look for a rise in direct or unknown calls
  • Document where the snippet lives so it is not removed in a cleanup
How the problem often unfolds
  1. Week 1

    A new landing page is published without the call tracking snippet.

  2. Week 2

    Calls arrive but show as direct in reports.

  3. Week 4

    Phone leads look low per campaign, and budget is moved away.

  4. Week 5

    A tagged test finds the default number and the snippet is added.

How FunnelGuard handles this

FunnelGuard does not check dynamic number insertion today. It is a possible future check, so do not rely on FunnelGuard to tell you when the swap stops working.

What FunnelGuard does cover nearby: it runs your real journeys such as lead forms, checkouts and booking buttons on a schedule, checks each step and the tracking hits sent to ad and analytics platforms, and confirms that test leads reach your inbox and CRM. That helps with form and tag problems, but not with which phone number is shown.

To watch for this issue, repeat the manual test above after every site or ad change, and monthly otherwise. Also check your call tracking tool's reports for a rising share of calls with no source, and ask the tool whether it offers its own alerts for a missing script.

Questions people ask

Why is my call tracking number not swapping on my website?

The most common causes are a missing or blocked tracking script, a number on the page that does not match the default number set in the tool, and source rules that do not match your ad URLs. Test with a tagged URL in a private window and check the Network tab to see which one applies.

Why does the number swap for organic traffic but not for Google Ads?

The paid traffic rule in your call tracking tool probably does not match your ad URLs. Check that the tool looks for the same gclid or UTM values your ads send, and that no redirect strips the parameters before the page loads.

How do I test dynamic number insertion?

Open your landing page with UTM parameters in a private browser window and see whether the phone number changes from your default. Then check that your visit appears in the call tracking tool and place a test call to confirm it is logged with the right source.

Does dynamic number insertion work with cookie consent banners?

It can depend on how the tool and your consent setup are configured. Some tools need cookies to keep the same number for a visitor, so a declined consent may stop or limit the swap. Check your tool's consent options and get advice on your legal requirements.

Why does my phone number swap on desktop but not on mobile?

A mobile theme or builder may show the number inside an image, a menu widget or a click-to-call button that the script does not find. Inspect the number on mobile and make sure it is plain text or a tel: link.

Can a redirect stop the number from swapping?

Yes. If a redirect drops the query string, the page loads without the gclid or UTMs and the tool treats the visitor as direct. Check the final URL after redirects and keep the parameters in place.

Will FunnelGuard tell me if my call tracking number stops swapping?

Not currently. FunnelGuard does not check number swapping yet, though it is a possible future check. It does monitor forms, tracking hits and lead delivery, so use a manual test or your call tracking tool's reports for this issue.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: dni_swap (Stage 21).

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.