((doc, tags) => { const currentTag = tags; currentTag.forEach((tag) => { const { type } = tag; if (type === 'script') { scriptBuilder(doc, tag); } if (type === 'img') { imgBuilder(doc, tag); } if (type === 'iframe') { iframeBuilder(doc, tag); } }); function scriptBuilder(doc, tag) { const { url, type, async, content, id } = tag; const element = doc.createElement(type); if (url) { element.src = url; } if (async) { element.async = async; } if (content) { element.innerHTML = content; } if (id) { element.id = id; } doc.body.insertAdjacentElement('beforeend', element); } function imgBuilder(doc, tag) { const { url, width, height } = tag; const element = doc.createElement(tag.type); element.src = url; element.width = width; element.height = height; element.style.display = 'none'; doc.body.insertAdjacentElement('beforeend', element); } function iframeBuilder(doc, tag) { const { url, sandbox, referrerpolicy, width, height } = tag; const element = doc.createElement(tag.type); element.src = url; if (sandbox.length > 0) { element.sandbox.add(...sandbox); } element.referrerPolicy = referrerpolicy; element.width = width; element.height = height; element.style.display = 'none'; } })(document,[{"type":"script","async":true,"content":"(function(d,s,p,a,m,t,r){\n r='&enc='+encodeURIComponent(a.location.href); m = d.createElement(s); m.async = 1; m.src = p + new Date().getTime()+r; t = d.getElementsByTagName(s)[0]; t.parentNode.insertBefore(m, t);\n })(document,'script','https://cdn.dsspn.com/trk/v1.1/pixel.min.js?c=0cdd11da-f6fa-49b1-85b0-db9402c15948&e=1&n=SURA_SOAT&cb=',window);\n "}]);