Logo

How can we help?

Troubleshooting - Number replacement with NinjaTrack

This article is meant for any users who have a website that is loading dynamically and the NinjaTrack script runs before the phone numbers to replace have fully loaded on the page.

The following script can be used in such cases so that the NinjaTrack replacement script will be put in a loop and keep running until a number replacement has been found:

<script>
      document.addEventListener("nt_done", checkReplacement);

      function checkReplacement(){
            if (jQuery('[ninjatrack_orig]').length == 0)
            window.setTimeout('retryReplacement()', 250);
     }
     function retryReplacement(){
            doneSent = false; getReplacementNumber();
     }
</script>

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request