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


(1)I bow to that Ṣrî Hari (Vishṇu), the infinite bliss, the Teacher, the Supreme Lord, all-pervading, the prime-cause of all the worlds. Direct realisation is herein expounded as a means to liberation. It should be studied, again and again, with great effort, only by the wise. (2) By following the duties of one's own caste and order, by asceticism and by the propitiation of Hari, men will gain the four-fold requisite of freedom from desires, etc. (3) Spotless freedom from desires means such a dissatisfaction in respect of all objects from Brahman down to the inanimate as is felt in respect of the excrement of a crow. (4) Discrimination of the real means the determination that the nature of the self is eternal while, all that is perceptible is otherwise (5) The constant eradication of mental impressions is called control of mind. The restraint of external activities is called control of body. (6) Extreme abstention is the turning away from the objects of enjoyment. The

Symbol of the Indian Rupee

Udaya Kumar, a post graduate in Design from Indian Institute of Technology Bombay has designed the symbol of the Indian Rupee. This symbol has come into effect from 15th July, 2010.  The symbol is an amalgam of Devanagari "Ra" and the Roman Capital "R" with two parallel horizontal stripes running at the top representing the national flag and also the "equal to" sign.

National Emblem of India

The four lions which stand for power, courage, pride and confidence, these four lions resting on a circular abacus girded by four smaller animals who are the guardians of the four directions, lion of the north, the elephant of the east, the horse of the south and the bull of the west make up the National Emblem of India.  At the bottom is inscribed 'Satyameva Jayate' meaning’ truth alone triumphs'.