Reputation: 21
I keep getting this error: Error at line 5, character 2: Parse error. primary expression expected
This is what the custom HTML looks like:
<script type="text/javascript">
//paste your Tawk embed code here, without Script tags
<script type="text/javascript">
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/5a2863145d3202175d9b6c41/default';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
Can anyone help me out?
Upvotes: 2
Views: 614
Reputation: 44115
You have a second <script>
tag inside your original code, which is invalid. It should look like this:
<script type="text/javascript">
//paste your Tawk embed code here, without Script tags
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/5a2863145d3202175d9b6c41/default';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
Upvotes: 0