CaptchaGuard

Get started with CaptchaGuard

  1. Get an API key
  2. Get an API key via the M for Developers API manager.

  3. Install the API key*
  4. To install the API key, set window.captchaguardApiKey (case sensitive) to your API key. E.g:

    				
    				window.captchaguardApiKey = "your_api_key";
    				
    			
  5. Add the CaptchaGuard library
  6. Add this line to your <body>:
    <script src="https://m.vueno.es/moduleflow/main.min.js" type="text/javascript"></script> then add this line to your <head>:
    <import module="captchaguard" as="js"></import>

Now CaptchaGuard is ready! Here's how to use it:

Let's say you want to show an alert and log the console if the visitor is a human:
			
			// Add an Event listener to handle situations:
			document.addEventListener("captchaguard_isHuman", (event) => {
			    // Add bot-specific logic here
			    console.log("Custom action for bots! User-Agent: ", event.detail.userAgent);
				
				alert("User is a bot!");
			});
			
		
If you want to redirect and log the console if the visitor is a bot:
			
			// Add an Event listener to handle situations:
			document.addEventListener("captchaguard_isBot", (event) => {
			    // Add bot-specific logic here
			    console.log("Custom action for bots! User-Agent: ", event.detail.userAgent);
				
				window.location.href = "example.com";
			});
			
		
You can also integrate both:
			
			// Add Event listeners to handle situations:
			
			// Bot
			document.addEventListener("captchaguard_isBot", (event) => {
			    // Add bot-specific logic here
			    console.log("Custom action for bots! User-Agent: ", event.detail.userAgent);
				
				window.location.href = "example.com";
			});
			
			// Human
			document.addEventListener("captchaguard_isHuman", (event) => {
			    // Add bot-specific logic here
			    console.log("Custom action for bots! User-Agent: ", event.detail.userAgent);
				
				alert("User is a bot!");
			});
			
		

Result goes here