Bot Management
Bot Management provides bot detection and analytics functionality for web applications running in browsers. This SDK helps protect your application from malicious bots, collect analytics data, and enhance overall security.
Installation
To use the SDK directly in an HTML file, add the following script tags to your <head>
and <body>
sections:
In the <head>
section:
<script src="https://botmanagement.mncdn.com/botmanagement-latest.js" type="module" defer></script>
In the <body>
section:
<script type="module">
import { init } from 'https://botmanagement.mncdn.com/botmanagement-latest.js';
async function runSDK() {
const clientKey = "your-client-key-here";
const monitoringMode = true; // Set to true if you want to use monitoring only
try {
await init(clientKey, { monitoringMode });
console.log('Medianova Client SDK initialized successfully.');
} catch (error) {
console.error('SDK initialization or operation failed:', error);
}
}
runSDK();
</script>
Notes
Replace
"your-client-key-here"
with the client key provided to you by Medianova.Setting
monitoringMode
to `true the SDK will only collect the visit data but not apply the bot prevention.
Configuration Options
The init
function accepts the following parameters:
clientKey
(string): Required. Your unique client key provided by Medianova.options
(object): Optional. Configuration options for the SDK.monitoringMode
(boolean): When set to `true, the SDK runs in monitoring mode only, without applying bot mitigation.
Example:
await init('your-client-key-here', { monitoringMode: true });