Integrating Tawk.to onto an Elgg platform

I was looking to see if anyone could provide insight on how to implement a Tawk.to Widget or button onto a pre existing Elgg community. If appears all that needs to be done is the copy and paste of
You can add the Tawk.to widget to your website by simply adding the JavaScript code as directed below. Can anyone offer some advice as to how/where in the file tree or theme this should implemented in order to get it up and running.

Follow These Steps

1. Sign up (If you don’t already have a Tawk.to account)

2 Log in to the dashboard: https://dashboard.tawk.to

3. Click “Sites & Pages”

manage-sites-pages

4. Click “Manage Sites”

5. Click Manage in the “Widget” column.

Widget-Manage

6. Copy the Widget Code

7. Add it to your site HTML (just before the tag)

  • Create a file at mod/tawkto/manifest.xml and put this content:

    <?xml version="1.0" encoding="UTF-8"?>
    <plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
            <name>Tawk.to</name>
            <id>tawkto</id>
            <author>Snahw</author>
            <version>1.0</version>
            <description>Basic integration with www.tawk.to</description>
            <requires>
                    <type>elgg_release</type>
                    <version>1.8</version>
            </requires>
    </plugin_manifest>
    

    Put this in mod/tawkto/start.php:

    <?php
    namespace Tawkto;
    
    function init() {
      // This tells Elgg to insert the widget code just before </body>
      elgg_extend_view('page/elements/foot', 'tawkto/widget');
    }
    
    elgg_register_event_handler('init', 'system', 'Tawkto\\init');
    

     

    Put the code snippet they give you in mod/tawkto/views/default/tawkto/widget.php.

    Then go to /admin/plugins#tawkto and activate your new plugin!

  • Evan, 

    Thanks for the quick response. Works just as explained above. 

  • Forgive my ignorance, but what is Tawk.to?? I like to see what a site is about before i register etc...

  • @vextah Google is your friend in this case