Skip to main content

AgentJS Script

In CloudFront and Manual mode, IntelliFend cannot automatically inject the AgentJS script into your websites. Consequently, once the integration is configured successfully, you must manually add the AgentJS script shown on the Integration Details page to your HTML source code.

Example of an AgentJS script:

AgentJS script
!(function (a, b, c, d, e, f, g, h) {
a.sikey = e;
a.fpendpoint = f;
a.siendpoint = g;
a.csignaluri = h;
var m = b.createElement(c), n = b.getElementsByTagName(c)[0];
m.async = 1, m.src = d, n.parentNode.insertBefore(m, n);
})(window, document, 'script', 'https://app.intellifend.com/agentjs/latest/tags-fast.js', ['{client_token}', '', []], 'https://tls-fp.intellifend.com/', 'https://app.intellifend.com', '');

About AgentJS

AgentJS is a set of Javascript codes that run in the background of the webpage to collect the user's browser events and generate Visitor IDs for tracking and monitoring. Here’s a breakdown of its functionalities:

  • Collect browser information: Gather browser details such as screen size, GPU, operating system, and user-preferred settings like languages, time zone, etc. This collected data is compiled into informative data for monitoring and tracking.
  • Evaluate if the browser is running in headless mode: Detects whether a browser is running in headless mode. Normal users must use a GUI browser to interact with the webpage, while bots typically use headless browsers to execute tasks automatically. Whether they are good bots or bad bots, their information must be collected to monitor, and give a response based on their behaviors.
  • Collect user events: Any user events such as click, copy, paste, scroll, select, login attempt, motion, etc. will be collected to analyze user behavior on the webpage.
  • Generate & set Visitor IDs for user session: Each browser that accesses the webpage with the AgentJS behind will be assigned a Visitor ID to track user behaviors.

Reference Code

Please refer to events-collector.js for more information. This is the primary script used to initialize the state of AgentJS, register actions on events, and create Visitor IDs. The collected events will be sent to IntelliFend to detect and analyze the visitor behaviors on your site.