matelso Script Improve Performance

The “getNumberbySearchtext” method #

If you have a website with a lot of pools/search texts (>400) and/or with much content (DOM Elements) our script will need more computing cycles to complete the search & replace. In some cases this can lead to unwanted behavior.

To get ahead of this issue you can use the “getNumberBySearchtext” method within the matelso script. Using this method you can fetch a call-tracking number by it’s search text from a script within the page. After fetching the number the user script has to place the number within the DOM. Using this method we can skip the search within the website content, which can increase the performance.


How to use the “getNumberBySearchtext” method? #

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

In order to be able to use the “getNumberBySearchtext” method, the Matelso script must be implemented on the page and I also have to define a callback method. This callback method is called by the Matelso script as soon as the call tracking number is available. If an error occurs when retrieving the phone number, the error message is passed to the callback method. .

Two parameters are passed to the callback method :

– numberObject: This object contains the call tracking number in different formats. (e164, formatted according to CP configuration and as Tel-Link)
– errorString: A text containing the error message should an error have occurred.
Following is an example of the callback method:

var callback = function(numberObject, errorString){
console.log('getNumberBySearchtext failed:', errorString);
// Do something with the number here

Missing within this example is the logic to place the number within the DOM. This needs to be implemented by the website administrator.

After fulfilling those requirements you can call the method using the following example snippet:

window[window.CallTrackingObject]("getNumberBySearchtext", "{SUCHTEXT}", callback);

Within this example you can see {SEARCHTEXT} as a placeholder for the search text you want to use to fetch the call-tracking number.

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.