2

I would like to add this script to my header-

 <script>
!function(){var x=document.createElement("script");x.src="https://cdn.slaask.com/chat.js",x.type="text/javascript",x.async="true",x.onload=x.onreadystatechange=function(){var x=this.readyState;if(!x||"complete"==x||"loaded"==x)try{

_slaask.identify({
  email: "john@company.com",
  utm_source: "user utm source data",
  utm_medium: "user utm medium data",
  utm_campaign: "user utm campaign data",
  utm_term: "user utm term data",
  utm_content: "user utm content data",
  kind: "user kind data"
});

_slaask.init('4942661a612935c280f5')

}catch(x){}};var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(x,t)}();
</script>

I have tried adding it through Google Tag Manager or through the backend in the header section. No matter what I do I get Require.js errors. Is there an easy way to add this without using Require.js? If the only way to add it is with Require.js how can I do that? Everything in my current requirejs-config.js looks like a link to js and not script itself.

0

Rémy from Slaask here!

We recently introduced RequireJS compatibility improvements, which might help you to use Slaask on your website.

In any case, we'll be happy to talk with you at https://get.slaask.com/#chat-open using our chatbox! 🙂

  • You guys fixed it. Everything is working well now. – tjjen Nov 5 '18 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.