# Developer Guide

## Agent Javascript

FraudLabs Pro agent javascript is a lightweight javascript providing merchants the capability to have in-depth analysis of an order transaction. For example, the device validation feature, which will not function without the embedded javascript.

You do not need to place the script in every single web pages, but only the page where the payment or ordering taking place.

Please note that this Agent JavaScript only supports websites served over HTTPS.

### Agent Javascript Code

Copy the below javascript code and paste it to the _footer_ file or _checkout_ page.

```js
<script>
	(function(){
		function s() {
			var e = document.createElement('script');
			e.type = 'text/javascript';
			e.async = true;
			e.src = 'https://cdn.fraudlabspro.com/s.js';
			var s = document.getElementsByTagName('script')[0];
			s.parentNode.insertBefore(e, s);
		}
		(window.attachEvent) ? window.attachEvent('onload', s) : window.addEventListener('load', s, false);
	})();
</script>
```

The above javascript will automatically learn the device that your clients used to visit your website.
If you integrated our service using REST API, you are required to supply the **flp\_checksum**
information during the **[order/screen](/content/developer/api/screen-order/index.html)** API call for device validation.
The **flp\_checksum** can be retrieved from the client's **cookie** data under the cookie name **flp\_checksum**.

If you were using the ready made module in an e-commerce platform, such as Magento, please visit the respective module page for the Agent Javascript installation instructions.
