How Can I use TawkTo on specific components only in react

Viewed 35

I am using the Tawkto script in my index.html file in my react project but I don't want it to be accessible in all components. How do I do this.

This is all I know so far.

<!--Start of Tawk.to Script-->
    <!-- <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/propertyId/tawkId'
        s1.charset = 'UTF-8'
        s1.setAttribute('crossorigin', '*')
        s0.parentNode.insertBefore(s1, s0)
      })()
    </script> -->
    <!--End of Tawk.to Script-->

Please anyone should help me

0 Answers
Related