Troubleshooting Dynamic Number Insertion

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

If you received a “swap target not found” status for a tracking number you expected to swap, check these items on your web page to make sure your swap target can be located.

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.”   

 Swap Target Formatting 

First, make sure the swap target number (the number you have assigned to swap with the tracking number) is present on the web page you’re testing. Then, check that the tracking number marked “not found” is a tracking number you intend to use on that page.

Read this help article for information on swap targets.

Once you've confirmed your swap target is on the page and you're troubleshooting the correct tracking number, continue by checking your swap target number formatting.

  1. Check for <span> tags that break up the swap target number. Sometimes this is intentional to prevent the number from swapping. If you’d like the number to swap, remove any <span> tags.

  2. Ensure the script is not nested inside another element such as an <iframe>, <header>, or <noscript> tag.

  3. Double-check that the swap target is present in the source code of your URL in one of the following formats:

    111-222-3333, 111.222.3333, and (111) 222-3333.

  4. To check this, view the source code on the web page and search the last 4 digits of the swap target to see if the swap target is on the page.

  5. If your swap target is a vanity number (ex. 888-CALL-NOW), please contact our support team to configure the vanity number to properly swap.

If you've followed these instructions and still don't see your number swapping, here's a few other things you can check: 

Your site may be cached on your internal network. 

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.

The swap target may be incorrect.

The swap target is the telephone number CallRail looks for on your website to dynamically replace with a tracking number. By default, the swap target is the destination number, but you can specify a different swap target for each tracking on the number configuration page. Use our instructions on Swap Targets to verify or change your swap settings.

CallRail's swap code may not be placed correctly in the site's code. 

It’s important that our swap script is as close as possible to `</body>` tag in your site's code. This helps ensure that our swap code is one of the final things on the page to load. If you have placed it too far above the `</body>` tag, other pieces of code from other sources could be conflicting with our swap functionality. While uncommon, if you suspect that another website's JavaScript could be interfering with CallRail, we recommend removing or rearranging your other JavaScripts to see if this solves your problem. 

FAQs

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.

Was this article helpful?
1 out of 3 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 & Lead Center Support available Saturday 9:00am - 6:00pm EST