// https://blog.jenyay.com/building-javascript-widget/
(function(window, document, scriptTagName, scriptAddress, globalName, scriptElement, otherScriptElement,globalCity,embedfilter_id){

// store the name of the global variable
window[’BusinessFinderObject’] = globalName;
window[’globalCity’] = globalCity;
window[’embedfilter_id’] = embedfilter_id;

// creates a global variable to delegate, so it will be available before script loaded
window[globalName] = window[globalName] || function () {
// pushes arguments that were passed to delegate into queue
// so they can be accessed later from the main script
(window[globalName].q = window[globalName].q || []).push(arguments)

// epoch timestamp when the SDK was initialized
window[globalName].l = 1 * new Date();

// dynamically create a script tag element with async execution,
scriptElement = document.createElement(scriptTagName);
otherScriptElement = document.getElementsByTagName(scriptTagName)[0];
scriptElement.async = 1; // it is just a shorter version of `true`
scriptElement.src = scriptAddress;

window.embedfilter_id = ’c8f3023b-c0a5-494e-be93-72a97d1ace86’;
window.pagetitle = ’companyregister’;

// inject the script tag before first script tag found within document
otherScriptElement.parentNode.insertBefore(scriptElement, otherScriptElement);

})(window, document, ’script’, ’https://yritystietokanta.artcloud.fi/api/embed/v1/script.js?v’+ new Date().getTime(), ’businessfinder’,’ArtCloud’);

businessfinder(’results’, ’results’);


Jaakko Salmi


044 7449280