Hey Sebastian , hope you've had a great weekend! Thanks for your reply!
I've checked your site and saw you are using the deprecated custom JavaScript-editor (you can read more about that here). It's easier to edit JavaScript outside the editor as it performs better.
You get this error as the script probably not initialized yet. Unfortunately it's not possible to load JavaScript files via the custom JavaScript-editor inside Buttonizer (and I don't recommend it as it will include the files every time you click on the button which will make the webpage slow).
Is it possible to move the scripts outside the editor and use a header-footer plugin for that? You'll need to execute something like this to only load the Tawk widget as soon the compliance widget says it's ready (in some header-footer plugin):
jQuery(document).on("cmplzEnableScripts", function() {
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/......';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
});
(disclaimer, I am not sure if it's the jQuery(document).on("cmplzEnableScripts", function() {
you need to use, I wasn't able to find enough information at the moment)
Where did you paste the script I mentioned here? Jasper ? Also in a headers-footers plugin?
Let me know!
Cheers,
Jasper