BOT Detection
how to configure Trustfull's JS SDK
Prior to installing our JavaScript SDK, we recommend reviewing your project and environment setup and considering any data privacy legislation you may need to comply with. This will help you make implementation decisions after installing that will best match your business needs.
Use this guide for complete steps to install Trustfull on the web. Trustfull is currently not available for mobile applications (iOS and Android).
Installation
To get started with Trustfull, paste the following code javascript before your website's closing tag. When using this JS, remember to replace YOUR-JS-KEY with the ID of the environment to which you want to send data. You can find this ID on your dashboard.
<script type="text/javascript">
(function(f,i,d,o,c,od,e){f['FidoObject']=c;f[c]=f[c]||function(){
(f[c].q=f[c].q||[]).push(arguments)},f[c].l=1*new Date();od=i.createElement(d),
e=i.getElementsByTagName(d)[0];od.async=1;od.src=o;e.parentNode.insertBefore(od,e)
})(window,document,'script','https://code.fido.id/fd.js','fido');
fido("create","YOUR-JS-KEY");
fido("auto_capture", false);
</script>
Note that the JS SDK is always loaded over SSL.
If you're installing Trustfull on both production and staging versions of your site, be sure to use the JS-KEY that corresponds to the environment in Trustfull you want to send data to. If you send data to the wrong environment, it will pollute the data in that environment.
Sending your session-id
An additional requirement to use the BOT Detection solution is to provide the session-id via JS SDK.
The session-id is a unique identifier attached to an identity, it can even be a token or cookie id in case the user is not logged in or still needs identification.
To provide the JS SDK with your session-id you can make the following call:
<script type="text/javascript">
(function(f,i,d,o,c,od,e){f['FidoObject']=c;f[c]=f[c]||function(){
(f[c].q=f[c].q||[]).push(arguments)},f[c].l=1*new Date();od=i.createElement(d),
e=i.getElementsByTagName(d)[0];od.async=1;od.src=o;e.parentNode.insertBefore(od,e)
})(window,document,'script','https://code.fido.id/fd.js','fido');
fido("create","YOUR-JS-KEY");
fido("auto_capture", false);
fido("customer_id", "YOUR-SESSION-ID");
</script>
Example:
fido("customer_id", "287e24ef-b67c-40ef-8ca5");
Troubleshooting
Have trouble installing The JS SDK? Here's a list of some typical things to look out for. If your issue isn't addressed here, please email us at [email protected]
Typos in the JS SDK
If you received the Javascript copy/pasted it into an email or another document, it's easy for typographical elements in the JS SDK to get reformatted. For example, you may end up with curly double quotes instead of straight quotes, or + signs may have been stripped. When in doubt, copy/paste the javascript directly from the developer documentation into your app.
Other
If you've double-checked all of the reasons above and are still having trouble, reach out to [email protected] with full-screen screenshots of the developer console on both tabs or a video of what you are experiencing.
What is "auto_capture"
It's a legacy parameter, just set its value to false. It won't have any effect on the integration.
Data Latency
We open your Trustfull dashboard once data from your users hit our servers so you're not faced with an empty page. Usually, this happens in a matter of minutes, but sometimes it's longer. We call this latency. Normal latency is under 30 minutes. Anytime beyond this, please feel free to contact us at [email protected]
Missing JS-KEY
When copying/pasting the JS SDK, be sure you have code that includes your JS-KEY in the Trustfullinit call.
If you get the javascript from the install page after you sign up, or from our developer docs while logged in, this won't be a problem. However, if you copy a version while logged out, you might end up with a code that won't work.
Example:
fido("create", "YOUR-JS-KEY");
Updated about 2 months ago