Sign in

How can we help?

How can I add an event listener?

Topic: , Updated:

You may register event listeners in order to execute code when the Freespee script successfully replaces numbers on the page. Each listener will be executed once for each successful number replacement. See example below.

var listener = function(element, number, replacedWith) {
  console.log(number + " was replaced with " + replacedWith + " in element " +;
  //tell user about the number replacement
__fs_conf.push(['setAdv',{'id': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'}]);
__fs_conf.push(['addNumberReplacedListener', listener]);
Was this article helpful?
0 out of 0 found this helpful


Not the answer to your question?

Powered by Zendesk