Skip to content
FunnelGuard

Fix guide by FunnelsGuard

DNI swap fails on mobile tel: links: how to find and fix it

TRK-250High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Call tracking tools such as CallRail or CallTrackingMetrics use dynamic number insertion (DNI). A script on your page replaces your normal phone number with a tracking number chosen for that visitor's source, for example Google Ads or organic search. When the visitor calls, the tool knows where the call came from.

Why it costs you leads or sales

Where a mobile call loses its source
  1. Ad clickVisitor lands on mobile page with campaign parameters
  2. DNI script runsSwaps desktop header number
  3. Tap tel: linkSticky button still has default number
  4. Call attributedShown as direct or unknown
  5. Ad conversionNever sent to Google Ads

The visitor arrives from an ad, but the tapped link keeps the default number.

Calls attributed to paid searchExample numbers
Calls attributed to paid search (example)Real paid calls: 100 calls per month; Tracked with broken mobile swap: 30 calls per month; Tracked after fix: 100 calls per month0387710030100Real paid callsTracked with broken m…Tracked after fixcalls per month

Example: 100 real paid calls, of which 70 come from mobile taps. If mobile tel: links are not swapped, only the desktop calls are tracked.

Common causes

Why a tel: link is missed on mobile
CauseWhat happens
Link added after the script runsSticky bars, popups and menus are built later, so the swap never sees them
Mobile-only duplicate elementThe theme has a separate mobile header or button with its own hard-coded number
Number format mismatchThe link uses +1 555 123 4567 or 5551234567 while the script looks for another format
Script limited to certain selectorsThe tool only swaps numbers in specific classes or the page body
Number set by JavaScript or a pluginA click-to-call widget writes its own href after the swap
Consent or script blocked on mobileThe call tracking script does not load, so nothing swaps at all

How to check if your site has it

Test the swap the way a mobile visitor sees it
  1. Open a campaign URL on a real phone

    Use a private tab and add the parameters your call tracking tool needs, such as a gclid or UTMs from a test ad link. Check your tool's help for what triggers a source-specific number.

  2. Look at the number you see

    Note whether the visible number in the header and in the sticky bar is the tracking number or your default number.

  3. Tap the call button, but do not call yet

    On most phones the dialer opens with the number filled in. Read it and compare it with your default number, then cancel.

  4. Inspect the links on desktop with mobile emulation

    In Chrome, open DevTools, switch on device mode, reload with the campaign URL, then search the Elements panel for tel:. Check every href.

  5. Place a test call

    Call from the phone and check that the call appears in your call tracking dashboard with the right source.

Paste in the browser console after the page loadsjavascript
[...document.querySelectorAll('a[href^="tel:"]')].map(a => ({href: a.getAttribute('href'), text: a.textContent.trim(), visible: a.offsetParent !== null}))

How to fix it

Fix the swap
  1. List every place your number appears

    Check the header, footer, sticky call bar, mobile menu, popups, forms and contact blocks. Note which are mobile-only.

  2. Use the default number your tool expects

    Call tracking tools swap numbers that match the default (target) number you set. Make every link use that exact number and format, or add the other formats as additional numbers to swap.

  3. Load the script early and keep it on every page

    Install the call tracking snippet in the head, or through your tag manager on all pages. Avoid loading it only on desktop templates.

  4. Handle late-loaded links

    Check whether your tool supports swapping in dynamically added content, and turn it on. If not, trigger a re-scan after the element renders, using the method in your tool's documentation.

  5. Remove duplicate hard-coded numbers

    If a plugin or widget writes its own number, point it at the default number your tool swaps or let the tool control that element.

  6. Retest on a phone

    Repeat the check with a campaign URL and confirm the dialer shows the tracking number.

Where to change it by platform
  1. Find mobile-only elements

    Check your theme's header settings, the Customizer or site editor, and any sticky call button or click-to-call plugin. Replace their numbers with your default number so the script can swap them.

  2. Check caching and script optimisation

    If a caching or optimisation plugin delays or combines JavaScript, exclude your call tracking script from it and clear the cache.

Mobile tel: link before and after

Broken

  • Header number swaps on desktop
  • Sticky mobile button keeps the default number
  • Tapped calls show as direct or unknown
  • No call conversion reaches ad platforms

Fixed

  • Every tel: link uses the default number the tool swaps
  • Sticky button shows the tracking number on mobile
  • Tapped calls carry the right source
  • Call conversions can be sent to ad platforms
The swap script misses the mobile link

The script runs, but the sticky call button is created after it and never gets the tracking number.

How to confirm it's fixed

Confirmation checklist
  • On a real phone with a campaign URL, the sticky call button opens the dialer with the tracking number
  • The console snippet lists no tel: link with your default number
  • Header, footer, menu and popup links all match
  • A test call appears in the call tracking dashboard with the expected source
  • The same check passes on both iPhone and Android
  • The call conversion shows in Google Ads or your analytics after the tool syncs

How to prevent it happening again

Prevention habits
  • Add a mobile phone test with a campaign URL to your release checklist for every theme, plugin or page builder change
  • Keep one default number across the site, with no hard-coded variants
  • Retest after adding a sticky bar, popup or new header
  • Retest after changing caching, script optimisation or consent settings
  • Place a test call each month and check the source in your dashboard
  • Document which elements are mobile-only so new team members do not add unmanaged numbers

How FunnelGuard handles this

Questions people ask

Why is my call tracking number not showing on mobile?

Usually the swap script runs before a mobile-only element exists, or that element has its own hard-coded number. Other causes are a number format that does not match, a blocked script or a caching plugin delaying it. Inspect the tel: links on a phone with a campaign URL to see which one still has the default number.

Why does DNI work on desktop but not on mobile?

Mobile layouts often include extra elements such as sticky call bars, hamburger menus and mobile-only buttons. These may be built later or contain a different number from the desktop header, so the script does not replace them.

How do I test dynamic number insertion on a phone?

Open your site in a private tab on a real phone using a campaign URL with the parameters your call tracking tool expects. Tap each call button and read the number in the dialer before calling. Then place a test call and check the source in the dashboard.

Does a tel: link need to match the default number exactly?

Often yes, or at least it must match a format your tool is set to swap. A link written as +15551234567 may be missed if the tool looks for (555) 123-4567. Use one consistent number across the site or add the extra formats in your tool.

How do I make DNI work on a sticky call button?

Use your default number in the button, load the call tracking script on all pages and make sure the tool can swap content added after load. If it cannot, trigger a re-scan once the button renders, following your tool's documentation.

Can I see this problem in analytics?

Sometimes. Phone calls from mobile ad traffic may be low or show as direct or unknown in your call tracking report, while click and mobile traffic numbers look healthy. A phone test is the reliable way to confirm it.

Does FunnelGuard check if my tel: links are swapped?

No, not yet. It is a possible future check. FunnelGuard currently checks journeys such as forms, checkouts and booking and chat buttons, plus tracking hits and test lead delivery, so you need to test phone links manually for now.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: dni_swap on mobile device runs (tel: links) (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.