function widget($args, $instance)
 {
     $extraWatchPluginDir = realpath(dirname(realpath(__FILE__)) . DS . ".." . DS . ".." . DS . ".." . DS . ".." . DS . ".." . DS . ".." . DS);
     include_once $extraWatchPluginDir . DS . "modules" . DS . "mod_extrawatch_agent" . DS . "mod_extrawatch_agent.php";
     echo renderExtraWatchAgent();
 }
        ///
        try {
            $extraWatch->visit->insertVisit();
        } catch (ExtraWatchIPBlockedException $e) {
            die($this->config->getConfigValue('EXTRAWATCH_BLOCKING_MESSAGE'));
        }
        /*
         * The following piece of code identifies the userAgent and inserts the backlink to extrawatch.com  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
         * I would really appreciate, that you would keep the this unchanged.  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
         * It took me some time to create and maintain this component and to share it with everyone.  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
         * This is the least you could kindly do. Thank you.  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
         *
         * CodeGravity.com  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
         */
        $output = "";
        // reset output;
        $title = "";
        if (!_EW_CLOUD_MODE) {
            $title = "Heatmap, Real-time analytics, Conversion tracking and anti-spam for Joomla, Wordpress, Drupal, Magento and Prestashop";
        }
        $output .= $extraWatch->helper->renderHTMLCodeSnippet(_EW_PROJECT_ID);
        return $output;
    }
}
try {
    if (!defined('ENV') | $env->getEnvironmentName() == "nocms") {
        echo renderExtraWatchAgent();
    }
} catch (ExtraWatchInputException $e) {
    ExtraWatchLog::error($e->getMessage());
}
 function extrawatch_frontend_agent()
 {
     include_once getExtraWatchPath() . "modules" . DS . "mod_extrawatch_agent" . DS . "mod_extrawatch_agent.php";
     echo renderExtraWatchAgent();
 }