Skip to main content

Add Google Analytics Tracking Code in Default WordPress Theme without Plugin

In this post, I will explain the simple and uncomplicated method of adding the Google Analytics Tracking Code in the Default WordPress Themes without using a Plugin.

This method works in the Default WordPress Twenty Twenty One Themes and other similar default WordPress Themes without any difficulty, It should also work in the latest upcoming Twenty Twenty Two Themes, which have been released recently. However, I will keep you updated after I try the Tracking Code on them.

Go to Google Analytics and copy the Tracking Code as shown in the image given below:

There are two easy methods of adding the Tracking Code in your WordPress Theme, I have described both these methods in this post. 

1] Adding Google Analytics Tracking Code in WordPress Themes:

Go to Appearance – Editor - header.php

And paste the code as shown in the image given below. 

2] Adding Google Analytics Tracking Code in WordPress through the CPanel: This method is useful if your security plug-in has blocked access to the Theme Editor. In such cases you can easily add the Tracking Code by following the simple steps given below:

Go to CPanel - File Manager – public_html – wp-content – Themes - Twenty Twenty One – header.php

Paste the Tracking Code in the same manner as shown in the first method. In both cases do not forget to back up your Theme.

Note: In case you manually update your WordPress Themes you will most likely lose the Tracking Code, so save it before manually updating your Themes.

Click on the images to enlarge them, in case you cannot view them properly. 


Popular posts from this blog

3d images of Sai baba of Shirdi

These are some more 3d images created out of photographs of the great Indian saint Sai Baba of Shirdi.

3d photos of Shirdi Sai Baba

These are 3d photos of the great Indian Saint Sai Baba of Shirdi

3d Photo-frames Shree Swami Samarth

Shree Swami Samarth Maharaj of Akkalkot in Sholapur District of Maharashtra is a very popular saint.Numerous miracles are attributed to him.He is considered to be an Avatar of the Hindu God Dattatreya. Related articles Gayatri Aarti English-Hindi (

Shirdi Sai Baba 3d images

This is a beautiful template of six 3d images of the same photo of Sai Baba of Shirdi

3d Photos of Shirdi Sai Baba 2

These are more 3d photos made from the same photo of the great Indian Saint Sai Baba of Shirdi