Skip to main content
Version: 1.1.4.1

Installation and Initialization

BotManager Browser Agent can be installed in two ways.

Prerequisites

Before installing the agent, check the following information in the BotManager console:

  1. Select Domain: Select the domain where you want to install the agent.
  2. Check Configuration Values: Check the following values provided in the console:
    • TENANT_ID: Customer identification ID
    • DOMAIN: Domain name
    • ENGINE_URL: Detection server URL
    • AGENT_URL: Agent file URL

Installation Methods

Method 1: Direct Insertion in HTML File

Insert the installation code directly into the <head> tag of the page. This is a simple and quick method to apply.

Below is example code. Values within {} brackets are automatically generated and provided in the customer-specific console.

<script>
(function(cfg) {
cfg.tenantId = '{{ TENANT_ID }}';
cfg.domainName = '{{ DOMAIN }}';
cfg.customId = '{{ USER_CUSTOM_ID }}'; // optional
cfg.serverUrl = '{{ ENGINE_URL }}/api/v1/macro';
})(window['BotManager-config'] || (window['BotManager-config'] = {}));
</script>
<script src="{{ AGENT_URL }}/agents/client/javascript/botmanager-browser-agent.js" async></script>

Method 2: Insertion in Common JavaScript File

You can apply the installation code by adding it to a JavaScript file commonly used across the site. This method is efficient for maintenance and management.

// Insert in common JavaScript file
(function(cfg) {
cfg.tenantId = '{{ TENANT_ID }}';
cfg.domainName = '{{ DOMAIN }}';
cfg.customId = '{{ USER_CUSTOM_ID }}'; // optional
cfg.serverUrl = '{{ ENGINE_URL }}/api/v1/macro';
})(window['BotManager-config'] || (window['BotManager-config'] = {}));

// Download and execute library
var scriptBM = document.createElement('script');
scriptBM.src = '{{ AGENT_URL }}/agents/client/javascript/botmanager-browser-agent.js';
scriptBM.async = true;
document.head.appendChild(scriptBM);

customId Configuration

customId is an optional configuration value that can be specified as a value that can identify users in the service page.

Examples:

  • User ID when logged in through login authentication
  • Session value when logged in through login authentication

Key Features and Benefits

  1. BotManager Accessor Management Console Integration:

    • When customId is set, you can check detection information based on specific users identifiable within the service.
  2. Multi-Device Blocking:

    • When a user using the same customId accesses through multiple devices, blocking settings are applied equally to those devices.
    • This prevents blocked users from using multiple devices.

Initialization Verification

After installation is complete, you can check the following in the browser console:

// Check if BotManager object is loaded globally
console.log(window.BotManager); // BotManager object should be output

Next Steps

After installation is complete, refer to the following documents: