WordPress Managed Hosting - 40% Off For 4 Months - Coupon Code: BFCM2021 Avail Now

How to Configure Google Analytics Tracking Code in WordPress

Moeez — February 1, 2017 3 Minutes Read
Add Google Analytics to WordPress Websites

Knowing the audience of a website is the most basic requirement for any search engine optimization strategy. Essentially, before proceeding any further, you must know about the audience, where they come from and how much time they spend on your website.

Google Analytics is one tool that could comprehensively answer all these questions and much more. The dashboard-based interface of the tool ensures that you could extract all information about your visitors in a matter of clicks.

The best news is that integrating Google Analytics into your website is free and a walk in the park. Let’s start.

Google Analytics

Sign up for Google Analytics

Visit the Google Analytics page and sign up for an account. If you already have a Gmail account, sign in to your account. Once you are logged in, you will see following options.

Sign up for Google Analytics

Select the option Website and then add all the requested information. Once done, click the Get Tracking ID button. A popup window with terms and conditions will appear. Accept the terms and go to the next screen.

On this screen, you will get the Tracking ID & Universal Analytic tracking code for your website as well.

Tracking ID for your website

Copy the tracking code from this screen and move to the next step.

Add Universal Analytics Tracking Code to WordPress Website Manually

Access the WordPress dashboard, go to Appearance > Editor. Next locate the header.php file and open it.

Add Tracking ID to WordPress Website

Now embed the tracking code into the <head> tag, and hit the Update file button. And you are done.

Add Tracking ID to WordPress Website

For many users, this method could prove to be too difficult. For such users, I recommend the plugin method that is both safe and easy!

The Plugin Method

Fortunately, WordPress offers several plugins that get the job done perfectly. Just pick one of the following plugins for your website. Install the plugin and then add the tracking code to start the tracking process.

  1. Google Analytics
  2. Google Analytics by Monster Insights
  3. Google Analytics dashboard for WP

Start Analyzing Your Audience

Google have done an amazing job with Google Analytics. The tool is a solid platform that provides accurate and diverse information about the traffic on your website. Although Google Analytics might have a steep learning curve for some users, the basic interface is quite user-friendly. If you want to know more about Google Analytics or would like to contribute to the discussion, do leave a comment below.

Create Faster WordPress Websites!

Free eBook on WordPress Performance right in your inbox.


    Create Faster WordPress Websites!

    Free eBook on WordPress Performance right in your inbox.

      Moeez is ‘The’ blogger in charge of WPblog. He loves to interact and learn about WordPress with people in the WordPress community. Outside his work life, Moeez spends time hanging out with his friends, playing Xbox and watching football on the weekends. You can get in touch with him at moeez[at]wpblog.com.

      THERE'S MORE TO READ

      Newsletter

        WordPress Help Zone - Ultimate WordPress Pit-Stop

        Learning WordPress? Or are you expert enough to help others? Join our WP Facebook group!