public function getEmbedHtml () : string
    {
        if (null === $this->assetHelper && null === $this->packages)
        {
            throw new AssetIntegrationFailedException("No asset integration extension found. Please either install `becklyn/assets-bundle` or `symfony/asset` to use this bundle.");
        }

        $trackJsToken = $this->hostingConfig->getTrackJsToken();

        // only embed if token is set, in production and not in debug
        if (null === $trackJsToken || $this->isDebug || "prod" !== $this->environment)
        {
            return "";
        }

        $assetUrl = null !== $this->assetHelper
            ? $this->assetHelper->getUrl("@hosting/js/trackjs.js")
            : $this->packages->getUrl("bundles/becklynhosting/js/trackjs.js");

        return \sprintf(
            '<script src="%s"></script><script>window.TrackJS && TrackJS.install(%s)</script>',
            $assetUrl,
            \json_encode([
                "token" => $trackJsToken,
                "application" => $this->hostingConfig->getProjectName(),
                "version" => $this->hostingConfig->getGitCommit(),
                "console" => [
                    "display" => false,
                ],
            ])
        );

    }
public function getEmbedHtml () : string
    {
        if (null === $this->assetHelper && null === $this->packages)
        {
            throw new AssetIntegrationFailedException("No asset integration extension found. Please either install `becklyn/assets-bundle` or `symfony/asset` to use this bundle.");
        }

        $trackJsToken = $this->hostingConfig->getTrackJsToken();

        // only embed if token is set, in production and not in debug
        if (null === $trackJsToken || $this->isDebug || "prod" !== $this->environment)
        {
            return "";
        }

        $assetUrl = null !== $this->assetHelper
            ? $this->assetHelper->getUrl("@hosting/js/trackjs.js")
            : $this->packages->getUrl("bundles/becklynhosting/js/trackjs.js");

        return \sprintf(
            '<script src="%s"></script><script>window.TrackJS && TrackJS.install(%s)</script>',
            $assetUrl,
            \json_encode([
                "token" => $trackJsToken,
                "application" => $this->hostingConfig->getProjectName(),
                "version" => $this->hostingConfig->getGitCommit(),
                "console" => [
                    "display" => false,
                ],
            ])
        );

    }
public function getEmbedHtml ( ) : string { if ( null === $ this -> assetHelper && null === $ this -> packages ) { throw new AssetIntegrationFailedException ( "No asset integration extension found. Please either install `becklyn/assets-bundle` or `symfony/asset` to use this bundle." ) ; } $ trackJsToken = $ this -> hostingConfig -> getTrackJsToken ( ) ; // only embed if token is set, in production and not in debug if ( null === $ trackJsToken || $ this -> isDebug || "prod" !== $ this -> environment ) { return "" ; } $ assetUrl = null !== $ this -> assetHelper ? $ this -> assetHelper -> getUrl ( "@hosting/js/trackjs.js" ) : $ this -> packages -> getUrl ( "bundles/becklynhosting/js/trackjs.js" ) ; return \ sprintf ( '<script src="%s"></script><script>window.TrackJS && TrackJS.install(%s)</script>' , $ assetUrl , \ json_encode ( [ "token" => $ trackJsToken , "application" => $ this -> hostingConfig -> getProjectName ( ) , "version" => $ this -> hostingConfig -> getGitCommit ( ) , "console" => [ "display" => false , ] , ] ) ) ; }
Returns the embed HTML for TrackJS

@return string
Returns the embed HTML for TrackJS