Adding Analytics Code to WordPress

If you want to run a successful website, it’s very important to know what your visitors are expecting and what the expect from your site. Yhe best way to achieves this is to analyze your traffic. That’s exactly Google Analytics. This is free software from Google allows you to track your website’s walks, analyze habits, traffic sources, social metrics and many more. By analyzing statistics, you can plan and create better content for your followers. This guide will show you how to add Google Analytics code into WordPress website.

There are several ways to add the Google Analytics code to your WordPress website. You can use plugin, write new function on function.php file and insert header.php file. We will add your header.php file.

  1. Log in to your WordPress admin domain and enter Appearance > Editor.
  2. Open header.php to edit it.
  3. Before </head> closing tag past Google Analytics tracking code and save the file.

Notice: I recommend that you take the backup of the file before making a change. If you change WordPress Theme you will do this steps again.

Leave a Reply

Your email address will not be published. Required fields are marked *