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
- Ad clickVisitor lands on mobile page with campaign parameters
- DNI script runsSwaps desktop header number
- Tap tel: linkSticky button still has default number
- Call attributedShown as direct or unknown
- Ad conversionNever sent to Google Ads
The visitor arrives from an ad, but the tapped link keeps the default number.
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
| Cause | What happens |
|---|---|
| Link added after the script runs | Sticky bars, popups and menus are built later, so the swap never sees them |
| Mobile-only duplicate element | The theme has a separate mobile header or button with its own hard-coded number |
| Number format mismatch | The link uses +1 555 123 4567 or 5551234567 while the script looks for another format |
| Script limited to certain selectors | The tool only swaps numbers in specific classes or the page body |
| Number set by JavaScript or a plugin | A click-to-call widget writes its own href after the swap |
| Consent or script blocked on mobile | The call tracking script does not load, so nothing swaps at all |
How to check if your site has it
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.
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.
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.
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.Place a test call
Call from the phone and check that the call appears in your call tracking dashboard with the right source.
[...document.querySelectorAll('a[href^="tel:"]')].map(a => ({href: a.getAttribute('href'), text: a.textContent.trim(), visible: a.offsetParent !== null}))How to fix it
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.
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.
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.
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.
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.
Retest on a phone
Repeat the check with a campaign URL and confirm the dialer shows the tracking number.
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.
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.
Check theme sections
In Online Store > Themes > Customize, look for header, announcement bar and floating call buttons that hold a phone number, and use the default number everywhere.
Add the script to theme.liquid
Place the call tracking snippet in the head of theme.liquid or through a tag manager so it loads on all templates.
Fire the tag on all pages
Use the All Pages trigger rather than a trigger tied to a desktop-only element or specific URLs.
Re-scan after late elements
If your tool offers a re-scan call, fire it from a trigger such as a custom event after the sticky bar or popup renders. Follow your tool's documentation for the exact call.
Check tablet and mobile breakpoints
In the Designer, switch to mobile views and look for separate call buttons or hidden elements with their own phone link.
Install the snippet in site settings
Add the script under Project Settings > Custom Code > Head Code, then publish.
Check funnel and website elements
Open each page in the builder and look at mobile view. Use the default number in every button or text link.
Add the tracking code
Add the call tracking snippet in the funnel or site tracking code area so it loads on every page.
Check the mobile editor
Wix has a separate mobile layout. Look for phone buttons or click-to-call bars that exist only there.
Add the script
Add it under Settings > Custom Code, set to all pages, in the head.
Check mobile and announcement elements
Look at the header, announcement bar and any button blocks with a phone link, and use the default number.
Add the script
Add the snippet under Settings > Advanced > Code Injection > Header.
Use one source for the number
Keep the default number in one template variable so every tel: link matches what the tool swaps.
Re-run the swap after rendering
If links are added by JavaScript, trigger the tool's re-scan after you insert them, per its documentation.
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 script runs, but the sticky call button is created after it and never gets the tracking number.
How to confirm it's fixed
- 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
- 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.
Related issues
- TRK-249Dynamic number insertion (DNI) script not swapping numberFix guide
- TRK-251DNI swaps the number in visible text but not the tel: hrefFix guide
- TRK-252DNI pool exhausted, everyone sees default numberFix guide
- TRK-254CallRail/CallTrackingMetrics script blocked by consentFix guide
- TRK-255Call conversions not sent back to Google AdsFix guide
- TRK-253Call tracking number disconnectedFix guide