Call Rail Disappoints On Button Swap

I am so disappointed in Call Rail in that I have some very valid code for what I admit is an unconventional, but necessary approach on a client's website to use a button w/ a method. Call Rail support simply won't modify their system to make a swap work in the onclick event handler. 

<button onclick="'tel:513742444', '_self');"><span>Call An Expert</span><span>513 654 3455</span></button>



1 comment
Date Votes
  • Official comment

    Hi Thomas!

    Thank you for posting in Community! 

    So I wanted to let you know that I consulted our internal teams and for an answer regarding this. Unfortunately the way our product is built it is not compatible with onclick parameters. Our product is built to work based on href parameters, and our support team is unable to modify the way the product is built. 

    For performance reasons, we limit the DOM elements that our JS Snippet scans to look for phone numbers. 

    The onclick function is not included in the elements that we scan. We do our best to balance compatibility with speed to swap on our customer websites since that's vitally important. 

    ap.js is rarely the only script on the page, and the other scripts update the DOM. If we re-did the swap for any time an attribute changed it would probably be noticeably slower for customers with complex websites. 

    We do swap numbers in href attributes that have telephone protocols in them, so an example button format that we do support is : 

    <a href="tel:tel:5137424445">Call an Expert at 513 654 3455</a>

    I really hope this helps explain the reasoning in this. Feel free to reach out with any other questions. We value you as customer of CallRail. 


Please sign in to leave a comment.

Didn't find what you were looking for?

New post