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 Dynamic Number Insertion 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?
8 out of 16 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
CallRail Classroom
Your go-to resource for brief, expert-led video tutorials.