Events
To obtain data about the tool's usage, such as number of openings, translations, and loading, you can listen to the events triggered by the Hand Talk plugin.
The events triggered by the Hand Talk plugin are:
| Event | Description | Return |
|---|---|---|
| coreReady | Avatar loaded | true |
| activated | Text translator activated | undefined |
| deactivated | Text translator deactivated | undefined |
| signalized | Triggered when the text is fully signaled | undefined |
| errorOnAuth | Authentication error | string: message related to the error occurred |
| errorOnTranslate | Translation error on Hand Talk server | undefined |
| notCompatible | Browser or hardware not compatible | string: 'withoutCanvas' or 'withoutWebGL' |
Example of Event Listener
<body>
<!-- Fetches the latest version of the Hand Talk plugin -->
<script src="https://plugin.handtalk.me/web/latest/handtalk.min.js"></script>
<script>
var ht = new HT({
// Replace with your access token
token: "TOKEN"
});
// Listen for the signalized event
ht.on("signalized", function () {
console.log("New phrase translated!");
});
</script>
</body>
tip
For more details about the plugin's data on your site, use the dashboard provided by Hand Talk.