Preventing a Number From Swapping on a Website

If there is a specific place on your website where you don't want a number to swap, you can use one of the methods below to update the telephone number in your source code so that our swap script doesn't recognize it. When you run the DNI test, it will show these swap targets as “not found."

  1. Add a <span> in the middle of a number that you don’t want to swap. For example,  555-<span>444<span>-3333. The number won’t be recognized as a swap target. When setting this up, we recommend placing "<span>" within the middle of the phone number (as illustrated above). With those additional HTML tags, our JavaScript snippet will not find the number that you'd like to appear as static.

  2. Add the attribute data-calltrk-noswap to an element containing the phone number. When this is added, nothing inside that element or its child elements will be swapped. For example, if you have a text message link on your site and don’t want it to send a text to the tracking number, add the attribute to the anchor tag like this: `<a data-calltrk-noswap href="sms:14045551234">`
Was this article helpful?
2 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