Asynchronous loading

Onload queue

If you need to deploy SmartPoint asynchronously (for example in GTM), the onload queue may be used.

var _yottlyOnload = _yottlyOnload || []
_yottlyOnload.push(function () { console.log("yottly is ready") })

 

You need to use the push method only (and not other means of manipulating arrays), because upon initialization the _yottlyOnload variable will be substituted with object with push method which calls the callback function immediately.

 

Was this article helpful to you? Yes No