Añadir Tag Manager en el funtions de WordPress
Para añadir el código de Tag Manager en WordPress, si lo queremos hacer con código sin plugins, debemos editar el funtions.php de nuestro tema y poner el siguiente código:
/* ------------------------------------------------ */ /* ------------------------------------------------ */ /* TAG MANAGER */ /* ------------------------------------------------ */ /* ------------------------------------------------ */ function add_gtm_head(){ ?> PEGA AQUÍ TU CÓDIGO DE TAG MANAGER DEL HEAD <?php } add_action( 'wp_head', 'add_gtm_head', 10 ); function add_gtm_body(){ ?> PEGA AQUÍ TU CÓDIGO DE TAG MANAGER DEL BODY <?php } add_action( 'wp_body_open', 'add_gtm_body' );