MediaWiki:Common.js: Difference between revisions

No edit summary
Tag: Reverted
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
// Matomo Tracking Code
var _paq = window._paq || [];
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
Line 12: Line 15:




$(document).ready(function() {
// Mautic Tracking Code
     var imageUrl = 'https://mintarc.com/img/logo_with_name.png'; // URL of your image
(function(w,d,t,u,n,a,m){w['MauticTrackingObject']=n;
     var imgElement = $('<img>').attr('src', imageUrl).css({
     w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t),
        'display': 'block',           // Ensure it's a block-level element
     m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)
        'margin': '0 auto',            // Center horizontally
})(window,document,'script','https://matomo.mintarc.com/mautic/mtc.js','mt');
        'max-width': '200px',          // Adjust as needed
 
        'max-height': '50px'           // Adjust as needed
mt('send', 'pageview');
    });
  $('.skin-minerva .header-chrome').append(imgElement);
});