How can I retrieve a call tracking number in a single page application?

Due to the dynamic nature of single-page applications, a normal “search & replace” approach is not sufficient. In this case there are two ways to implement it.


Manual scan #

The first and easiest way is to use the “scan” method of the Matelso script. This will trigger a new scan of the website for search text. This method is called manual scan. In this case, a script call is still set to an event or like page_view or in case of reloaded content.


// Test if the tracking library is already loaded

if (mtls.loaded) {

// run the website scan




More information about manual scan: manual scan


“getNumberBySearchtext” method #

This method allows you to retrieve a call tracking number based on its search text from a Matelso script on the page. After retrieving the number, a custom script from you/the user must place the number in the DOM. This method can be used to skip the search in the website content, so there are no problems with a single page application.


How to use the method “getNumberBySearchtext”? #

We recommend that this method is set up by a person with appropriate knowledge of websites and scripts.

To use the “getNumberBySearchtext” method, the Matelso script must be implemented on the page and a callback method must also be defined. This callback method is called by the Matelso script as soon as the call tracking number is available. If an error occurs while requesting the call tracking number, the error message is passed to the callback method.

More information on how to set up this method can be found here:

matelso platform
matelso optimally connects telephony, chat, email or contact forms. Our intelligent lead management simplifies communication and enables you to achieve better marketing results.
matelso platform in detail
Call Tracking

MarTech phone call analysis software for companies, agencies & portals to get valuable data from inbound calls.

Call Tracking in detail
Marketing Use Case
How the matelso platform boosts your marketing.
Sales Use Case
How the matelso platform boosts your sales process.
E-Commerce Showcase

Showcase of the matelso platform in E-Commerce

What capabilities does our matelso platform offer? All features at a glance.
Do-it-with-me instead of DIY: Work with our consultants to really get the most out of the platform.
Do-it-with-me instead of DIY: Achieving more together with our consultants.
Use Cases

Three industries that should rely on call tracking: B2B, automotive and agencies!

Blog Through our blog, we share knowledge and insights with our readers - always useful, always interesting.
Webinars With our matelso webinars, you can experience our MarTech technologies and solutions and get valuable tips for your online marketing.
Knowledge Base On our matelso Knowledge Base you can delve deep into the engine room of our Call Tracking and MarTech technology.


Career Creating a new data-based era of communication - if you share this vision, we should get to know each other.
Partner model Help your customers better understand and manage their customer journey - while also generating a new revenue stream.


About Us The MarTech company matelso - we stand for innovative and simple solutions that make your marketing more efficient.
Newsroom News, press releases and more - all news about matelso at a glance.