How to Get and Insert Google Analytics Tag Manually

Last update:

“Installing another plugin on my WordPress website…” And why? Just to insert 9 lines of code. Now, you can skip this and go manual. How?

First watch the video on how to extract Google Analytics (GA) Tag code from the GA platform. Than insert the code snippet below to the functions.php of your website; or to Code Snippets plugin if it is already there; or to your theme’s code snippet area.

The Video

I don’t want to collect cookies of you, and I don’t want Google do that on my website, thus the video is available only on Youtube here:

The Code

function add_googletagsnippet() { ?>

// Paste your Google Analytics Tag snippet here.

<?php }
add_action('wp_footer', 'add_googletagsnippet');