Diferencia entre revisiones de «MediaWiki:Common.js»

De Casiopea
Sin resumen de edición
Sin resumen de edición
 
Línea 1: Línea 1:
/* Cualquier código JavaScript escrito aquí se cargará para todos los usuarios en cada carga de página */
/* Cualquier código JavaScript escrito aquí se cargará para todos los usuarios en cada carga de página */
;(function(doc){
;(function(){
   var script = doc.createElement('script');
   var script = document.createElement('script');
   script.async = 1;
   script.async = 1;
   script.src = 'https://www.googletagmanager.com/gtag/js?id=G-NV4DJZZR27';
   script.src = 'https://www.googletagmanager.com/gtag/js?id=G-NV4DJZZR27';
doc.querySelector('head').insertBefore(script, doc.querySelector('title'));
document.querySelector('head').insertBefore(script, document.querySelector('title'));
window.dataLayer = window.dataLayer || [];
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('js', new Date());
gtag('config', 'G-NV4DJZZR27');
gtag('config', 'G-NV4DJZZR27');
})(document);
})();

Revisión actual - 10:47 2 ago 2022

/* Cualquier código JavaScript escrito aquí se cargará para todos los usuarios en cada carga de página */
;(function(){
  	var script = document.createElement('script');
  	script.async = 1;
  	script.src = 'https://www.googletagmanager.com/gtag/js?id=G-NV4DJZZR27';
	document.querySelector('head').insertBefore(script, document.querySelector('title'));
	window.dataLayer = window.dataLayer || [];
	function gtag(){dataLayer.push(arguments);}
	gtag('js', new Date());
	gtag('config', 'G-NV4DJZZR27');	
})();