How To Add Google Analytics To WordPress 2022 Tracking Code Install WordPress Tutorial For Beginners

by | May 18, 2022 | 0 comments

How To Add Google Analytics To WordPress 2022 Tracking Code Install WordPress Tutorial For Beginners

by | May 18, 2022 | Free Wordpress Plugins | 0 comments



This WordPress tutorial for beginners explains how to add google analytics to wordpress 2022 including the steps for Google Analytics account creation, getting the tracking code, and inserting the tag into website header. Likewise, this guide contains instructions for both Universal Analytics (UA) and the new Google Analytics 4 (GA4) properties.

Moreover, to complete this demonstration, I have used a simple, lightweight, and 100% free plugin that works without any complications, nothing fancy, and super easy to use. You will have to watch the complete video to reveal the plugin, as I am not affiliated with the plugin, nor I am getting paid to promote it. This video is meant for information purpose.

Important: The reason why I am not sharing tutorial about how to add google analytics to wordpress manually without a plugin is because the tracking code has to be inserted either in the header or footer division tags. To do that, we need to edit the header.php or footer.php files in our wordpress installation directory by accessing our server through either FTP or directly logging via hosting cpanel.

Now, these header.php and footer.php files are stored in the theme folders. Whenever there’s an update of the theme, all the changes will be gone. The child theme allows us inserting codes into the functions.php file only. Moreover, never play with the php codes of any wordpress theme files unless you have knowledge about how PHP functions work.

If anything goes wrong, your entire site may crash and you might have to fresh start wordpress installation over again. So, these are some of the reasons why I am not publishing tutorials related to how to add google analytics to wordpress without a plugin.

Also, I forgot to mention in the video that, at one point in the clip, the WordPress firewall known as WordFence blocks the activity. This is not because the plugin contains any malwares, bugs, or viruses. The plugin is updated plus tested regularly and it is found in the official WordPress repository. Plugins that are infected are not allowed or found in the official WP repository, as it is the trusted source for millions.

The only reason WordFence firewall blocked the activity and we have to whitelist it is because WordFence finds inserting codes in the header and footers fishy. The tracking code that we will insert on our website header is provided by the official Google Analytics portal, owned by Google itself.

Therefore, both the plugins and the tracking codes are 100% safe to use. I am writing this just to ensure transparency and let you know what was going on there for extra information.

I hope that you find this tutorial about how to add google analytics to wordpress website helpful. Kindly upvote this video to let youtube know that you are enjoying what you are watching and if you can, please smash that subscribe button.

If you have any problems or questions or just want to say “hi”, feel free to let me know in the comments. Thank you for watching and I will see you in the next video.

source