Client-side SDK

Sensfrx integrates smoothly into your existing systems using modern REST APIs, iOS and Android SDKs, and Javascript snippets. Additionally, Sensfrx offers Workflows, a powerful framework for rules sautomation, and Review Queues. These enable users to build a completely secure web application and halt fraud on their marketplace platforms.  


To utilize Sensfrx for marketplace platforms, tell us about the transactions and events that happen on your website and/or mobile apps, and the actions you take in response to them. This includes: 

  • Information on how visitors are interacting with your website and/or mobile apps, including which pages they are viewing, what devices they are using, and how long they spend on each page. We immediately obtain this data when you incorporate our JavaScript snippet into your website and our Mobile SDKs into your app.  

  • What actions are significant events in the user lifecycle that your users are taking, such as creating an account, placing an order, sharing content with other users, etc. You will send this data from your application to Sensfrx over our REST API.  

  • How your business is responding to customers (for example, authorizing a transaction, preventing an event due to fraud, canceling an order due to a chargeback, etc.). Additionally, you will send Sensfrx this data from your application via our Decisions API.  

You can jump start the integration by filling in a few months' worth of historical data. 

Below are two phases for the client side integration of Sensfrx into the web application.

Phase I – Pixel Integration  

Users need to include the following script in the web application: 

The Below JavaScript snippet needs to be included in the <head> tag just before the head closing tag </head>.   

JavaScript code:   

<script src="https://p.sensfrx.ai/as.js?p={PROPERTY ID}"></script> 

 Note:   In the script, replace the PROPERTY ID with your Property ID value. Click here to know how to generate property ID and secrete key.  

<script> 
_sensfrx("userInit", <userid>);
</script> 

 Note:   This line needs to be called only when the user is logged in, the rest of the time it does not need to be called and can be ignored.   

Phase II – Getting Request String

Execute the following JavaScript integration script to get request string.   

<script>   
var as_request_string = _sensfrx("getRequestString");  
</script>  

Note: The above request string is required in all the api requests. _sensfrx() is a global function and can be called anywhere after the library is included in the code. 

On this page