The following code will add Google analytics tracking code to your WordPress site’s header. Simply replace “UA-000000000-1” with your analytis UA tracking code and insert the snippet into functions.php.

// Insert Google Analytics into the site header
function mwx_google_analytics() { ?>%MINIFYHTML63a90011bde8ab27fe2dae227044af185%%MINIFYHTML63a90011bde8ab27fe2dae227044af186%<?php
add_action( 'wp_head', 'mwx_google_analytics', 10 );

Leave a Reply

Get in Touch

Please fill out the form below and we will get back to you ASAP