code: public function hookTemplateRender($templates, $data, $rendered, $controller)
      {
          $template = reset($templates);
  
          if (strpos($template, '/modules/ga_report/templates/panels/') !== false
              && isset($data['content']['data']['report']['data'])
              && isset($data['content']['data']['handler']['id'])) {
  
              $handler_id = $data['content']['data']['handler']['id'];
              $controller->setJsSettings("ga_chart_$handler_id", $data['content']['data']['report']['data']);
  
              $controller->setJs(__DIR__ . "/js/handlers/$handler_id.js");
              $controller->setJs(__DIR__ . "/js/common.js");
          }
      }
docs: Implements "template.render"
  @param array $templates
  @param array $data
  @param string| null $rendered
  @param \gplcart\core\Controller $controller