This example is taken from the Hello World example in the contrib folder of Wasabi. That example uses the wasabi.js library that is available from the same server as this Admin UI. In order to use the library, you would add the following to your index.html (or equivalent initial load page):

    <script src="https://code.jquery.com/jquery-1.12.3.min.js"></script>
    <script src='{{webServingUrl}}scripts/wasabi.js'></script>

Of course, you can choose whatever version of jQuery works for you and your Wasabi server may be running on a different host or port.

In order to record an action for a user for an experiment using the library, you would make a call like this:

    // Set up properties that will be the same on all Wasabi calls.
    WASABI.setOptions({
        'applicationName': '{{experiment.applicationName}}',
        'experimentName': '{{experiment.label}}',
        'protocol': '{{serverProtocol}}',
        'host': '{{serverHostAndPort}}'
    });

    // Check Wasabi to record an action for this user.
    WASABI.postAction(
        'MyEventName',
        '{\\\"myPayloadKey1\\\":\\\"payloadKey1Value\\\"}',
        {
            'userID': 'UserName'
        }
    ).then(
        function(response) {
            console.log('postAction: success');
            // Note: there is no response from posting an Action.
        },
        function(error) {
            console.log('postAction: error');
        }
    );

In order to see and run locally a working example using JavaScript, AngularJS and node, go to:
https://github.com/intuit/wasabi/tree/develop/contrib/hello-world