Configuration Options Reference
BotManager Browser Agent supports custom user settings in addition to default settings. The following are available configuration options.
Configuration Options List
| Item | Description | Type | Default |
|---|---|---|---|
cfg.networkTimeout | Network timeout time (milliseconds) for requests to detection server. | number | 3000 |
cfg.detectOnLoad | Sets whether to automatically send detection requests after page load. | boolean | true |
cfg.detectDevTools | Sets whether to enable developer tools detection. | boolean | true |
cfg.detectClickBehavior | Sets whether to enable user click detection. | boolean | true |
cfg.detectClickSampleSize | Sets the number of sample clicks to use for click detection. More samples enable more accurate analysis. | number | 10 |
cfg.detectClickThreshold | Value to adjust sensitivity in click pattern analysis. Lower values increase sensitivity, detecting even small changes. | number | 15 |
cfg.detectClickMaxTimeDiff | Resets the sample if the interval between two clicks exceeds this time (milliseconds). | number | 60000 |
Configuration Examples
Default Configuration
<script>
(function(cfg) {
cfg.tenantId = '{{ TENANT_ID }}';
cfg.domainName = '{{ DOMAIN }}';
cfg.serverUrl = '{{ ENGINE_URL }}/api/v1/macro';
})(window['BotManager-config'] || (window['BotManager-config'] = {}));
</script>
Custom Configuration
<script>
(function(cfg) {
cfg.tenantId = '{{ TENANT_ID }}';
cfg.domainName = '{{ DOMAIN }}';
cfg.serverUrl = '{{ ENGINE_URL }}/api/v1/macro';
// Custom settings
cfg.networkTimeout = 5000; // 5 second timeout
cfg.detectOnLoad = false; // Disable auto detection
cfg.detectDevTools = true; // Enable developer tools detection
cfg.detectClickBehavior = true; // Enable click behavior detection
cfg.detectClickSampleSize = 15; // Increase click sample size
cfg.detectClickThreshold = 10; // Increase sensitivity
cfg.detectClickMaxTimeDiff = 30000; // Reduce to 30 seconds
})(window['BotManager-config'] || (window['BotManager-config'] = {}));
</script>
Option Details
networkTimeout
Sets the network timeout time for requests to the detection server. It is recommended to increase the value in unstable network environments.
cfg.networkTimeout = 5000; // 5 seconds
detectOnLoad
Sets whether to automatically send detection requests when the page loads. If set to false, you must manually call BotManager.detectPage().
cfg.detectOnLoad = false; // Disable auto detection
detectDevTools
Sets whether to enable the feature that detects when developer tools are open.
cfg.detectDevTools = true; // Enable developer tools detection
detectClickBehavior
Sets whether to enable the feature that analyzes user click patterns to detect abnormal behavior.
cfg.detectClickBehavior = true; // Enable click behavior detection
detectClickSampleSize
Sets the number of sample clicks to use for click detection. Larger values enable more accurate analysis but require more clicks.
cfg.detectClickSampleSize = 15; // Use 15 clicks as sample
detectClickThreshold
Value to adjust sensitivity in click pattern analysis. Lower values increase sensitivity, detecting even small changes.
cfg.detectClickThreshold = 10; // Increase sensitivity
detectClickMaxTimeDiff
Resets the sample if the interval between two clicks exceeds this time (milliseconds). If the user does not click for a certain period, it starts collecting a new sample.
cfg.detectClickMaxTimeDiff = 30000; // 30 seconds