public function getTag()
    {
        $piwikUrl = $this->getPiwikUrl();

        $tag = <<<'EOT'
<script type="text/javascript">
var _paq = _paq || [];
(function(){ var u=(("https:" == document.location.protocol) ? "%s/" : "%s/");
_paq.push(['setSiteId', %s]);
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.defer=true; g.async=true; g.src=u+'piwik.js';
s.parentNode.insertBefore(g,s); })();
</script>
<!-- End Piwik Code -->
EOT;

        return sprintf(
            $tag,
            $this->convertUrl($piwikUrl, true),
            $this->convertUrl($piwikUrl, false),
            $this->getSiteId()
        );
    }