Home Forums Support Custom script for frontend

This topic contains 2 replies, has 2 voices, and was last updated by  ausswe 2 weeks, 1 day ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #22694

    ausswe
    Participant

    Hi,
    I have just installed the self-hosted version as a test for some clients.

    I’ve noticed that Custom CSS in the settings for Customer Portal – is there a way to also add custom script (apart from Google Analytics).
    I’m looking to add Tawk.to code snippet so that the public visitors have the option of receiving direct support/interaction when they are viewing their invoices etc.

    I found a previous thread referring to place the code in:
    resources/views/public/header.blade.php

    It seems like that file location has moved and I tried placing the code in:
    resources/views/header.blade.php but was unsuccessful.

    Any ideas?

    Thanks in advance.

    #22698

    Hillel Coren
    Keymaster

    It should be the /public file, the other file is for the admin section.

    #22700

    ausswe
    Participant

    Great, thank you Hillel.

    For other who might find this thread, the correct file location were:
    resources/views/public/header.blade.php

    I added the Tawk.to script at the bottom (just before the closing tag </script>):

    <!--Start of Tawk.to Script-->
    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/xxxxxxxxxx/default';
    s1.charset='UTF-8';
    s1.setAttribute('crossorigin','*');
    s0.parentNode.insertBefore(s1,s0);
    })();
    <!--End of Tawk.to Script-->
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Posted in: