Testing dynamic number insertion

After you’ve installed the dynamic number insertion JavaScript snippet on your web page, use the test dynamic number insertion feature to ensure that your snippet has been installed in the correct location and your tracking numbers are swapping on your site.

You must test each web page individually where you’ve installed the snippet to ensure the code is correctly installed on that page. Testing a landing page, for example, will not test your entire site for dynamic code insertion.


If you've installed the JavaScript snippet using our WordPress plugin or if you've installed the snippet on an AMP page using our AMP instructions, the auto-test feature will not work, and you will receive a false negative result. In these cases, we recommend manually testing your web page instead.

Getting started

First, install CallRail’s snippet on every landing page and page of your site with a phone number. Each company in your CallRail account has its own, unique script for tracking.

Please Note: There are sometimes false negatives in this auto-test where your tracking number is actually swapping on your page. If you've checked all the troubleshooting items and still receive an error message, we recommend manually testing your web page to simulate a visit and see if your tracking number is swapping on your page. When you manually test dynamic number insertion, be sure to test your website as the type of visitor you're tracking with that phone number.

Testing dynamic number insertion

This test has two parts. First, it validates that your code snippet is installed in the correct location on your web page. Then, it checks that your tracking numbers are dynamically swapping on your page.

  1. Click the Settings icon on the left navigation bar.

  2. Choose the company whose dynamic number insertion code you’re testing.

  3. Click Integrations at the top of the page.

  4. Choose JavaScript Snippet from the list of integrations.

  5. Scroll down to the section titled Test JavaScript Snippet, at the bottom of the page.

  6. Copy and paste the web page URL that you’d like to test and click Start Test.

  7. Repeat the test as necessary with each page of your website where you’ve installed the JavaScript snippet.

Code snippet status

The first part of the test checks that your company’s code snippet has been installed in the correct location before the </body> tag and has no formatting errors. Without the code snippet installed correctly, your tracking numbers cannot swap.

  1. If your code snippet is properly installed, you’ll see a green checkmark in the Code Snippet Status section.

  2. If your code is not found or not properly installed, you’ll see a yellow alert with instructions on how to fix your code installation and a date stamp of your test.

  3. If the code snippet is not in the correct location, your numbers can’t swap so the second part of the test will not be performed.

Tracking number status

If your code snippet is in the correct location, the second part of the test will check that your numbers are swapping correctly.

It’s important to note that we’re testing all the tracking numbers in your company in this part of the test. So, some numbers that show up as “not found” are not a problem. Only troubleshoot tracking numbers you expected to swap on the page you are testing.

  1. Tracking numbers that are properly swapping on the page you’re testing will show a green checkmark in the Status column.


  2. Click the eyeball icon in the View column to see a live swap example of the tracking number swap on your page.

  3. This screen will show a screen capture of the tracking number swap that happened with a date and time stamp of when the swap occurred.  


  4. There will be a yellow alert message in the Status column for numbers that aren’t swapping on the web page you’re testing.

    Remember, we’re testing all the tracking numbers in your company. This alert isn’t a problem for tracking numbers that won’t be used on the specific web page you’re testing.<

  5. If it’s a tracking number you expected to swap on the page, click the Troubleshoot link to view a help article on troubleshooting common errors that will prevent a number from swapping.

    We also recommend manually testing your web page. Sometimes, the auto-test will provide a false negative so the manual test is a good way to check if your tracking number is actually swapping on the page. 

  6. You can also select the Number Name to be sent directly to the edit page for that number so you can make any configuration changes needed.


I'm seeing a 403 error when I use the auto-test tool. What should I do?
If you receive a 403 error while testing dynamic number insertion via our auto-test feature, we recommend manually testing your web page(s) instead.

Does dynamic number insertion work with caching plugins?
Certain plugins can cause the Javascript snippet to fail. Plugins like WP Rocket work by removing code that is deemed unnecessary to improve a page’s load time. This can often cause our JavaScript snippet to be removed from your website.

Learn more in this help article: Dynamic number insertion and caching plugin. 

What should I do if I keep getting error messages?
If you keep getting error messages for numbers you expect to swap, try troubleshooting common dynamic number insertion errors.

I’ve tried troubleshooting, but my number still isn’t swapping. What should I do?
Reach out to our Support team if you continue receiving errors for tracking numbers you expected to swap on your page. They’ll be able to double-check additional settings for your tracking number to see why it might not be swapping.

Was this article helpful?
1 out of 2 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 9:00am - 9:00pm EST