Troubleshooting dynamic number insertion

CallRail’s JavaScript snippet allows you to integrate call tracking on your website using dynamic number insertion (DNI).

If you expect a tracking number to swap on your website and are not experiencing the swap behavior, you can use the articles in this section to help you test and troubleshoot.

Getting started

You must test each page where you’ve installed your JavaScript snippet separately. For example, entering a landing page URL will not test the entire website.

Note: If you're running an automated test using CallRail's auto-test feature, each test will check the web page for all tracking numbers in your company. In this case, you may see some tracking numbers show as “not found.”   

Troubleshooting dynamic number insertion

Next, we’ve collected the most common errors that cause your numbers to stop swapping. If one of the sections below describes the specific issues you are experiencing, you can use the guide linked in that section to help you troubleshoot.

Where is the swap script placed?

It’s important that our swap script is as close as possible to `</body>` tag in your site's code. You can follow this guide for additional troubleshooting steps.

Is your site cached on your browser?

Try accessing your website in a private browsing session (like "incognito" mode on Google Chrome). If you suspect this to be the case, we strongly recommend testing your website on a computer that has not been to the site previously. Alternately, if no computer is available, please contact our Support team and we’ll be happy to verify your number’s swapping for you.

Is your swap target correct?

The swap target is the telephone number CallRail looks for on your website to dynamically replace with a tracking number. If the swap target is incorrect, your numbers won't swap. You can follow this guide for additional troubleshooting steps.

Is your swap target formatting correct?

If you notice your numbers are not swapping, check your swap target formatting. You can follow this guide for additional troubleshooting steps.

Is another tracking number swapping instead of a tracking number from your website pool?

If your numbers are not swapping, make sure you read through CallRail's swap precedence rules to make sure you’re not accidentally overriding your website pool with other tracking numbers.

Are you using caching plugins?

Certain plugins, like WP Rocket, can cause the JavaScript snippet to fail. You can follow this guide for additional troubleshooting steps.

If you are still having issues after following the troubleshooting steps in the guides provided, please contact our Support team.


Are there other ways to test dynamic number insertion?
Yes, you can manually test dynamic number insertion and simulate different kinds of web visits.

How do I prevent a number from swapping?
If you don’t want your numbers to swap, you can follow the instructions in this support article.

Preventing a Number From Swapping on a Website.

Why isn't my number swapping in the click-to-call button on my website?

If there is a click-to-call button on your website, make sure you format the button with our recommended HTML rather than any other type of button formatting. Our recommended formatting for the HTML is: <button> {swap_target} </button>

We won't swap a swap target coded as the following: <input type="button" value="{swap_target}">

You can also make the swap target a link inside of a flex-box; or some element to wrap the number in a box so it looks like a button.

Was this article helpful?
1 out of 6 found this helpful

Articles in this section

See more
Ask the Community
Find best practices, post, and learn from CallRail users.
CallRail Support Hours
Weekdays 8:00am - 8:00pm EST