Google Analytics

$wgHooks['BeforePageDisplay'][] = function( OutputPage &$out, Skin &$skin ) { $code = << window.dataLayer = window.dataLayer || []; function gtag{dataLayer.push(arguments);} gtag('js', new Date);

gtag('config', 'UA-151018458-1'); HTML;

$out->addHeadItem( 'gtag-insert', $code ); return true; };