Skip to content Skip to main navigation Skip to footer

How to Set Up Google Analytics on WordPress Website? 2 Easy Ways

Google Analytics is a powerful analytics platform used by webmasters to analyze traffic to their websites. This article explains how to set up Google Analytics on WordPress Website or blog. This Google-owned service is free and you can sign up and add your website using your Google account.

Set Up Google Analytics on WordPress Website.

To sign up for Google Analytics:

  1. Open and click Start for free.
  2. Log in to your Google Account.
  3. On the Welcome to Google Analytics page, click Set up for free.
  4. In the Account name field, enter a name for your Google Analytics account.
  5. Click Next.
  6. Select Web if you have only a website.
Select Web in Analytics

7. Click Next.

8. On the Property setup screen:

1. Website Name: Enter your website’s name.

2. Website URL: Enter your website’s URL. (Note: Select https:// from the dropdown if your website uses HTTPS.)

3. Industry Category: Select a category that matches your website’s topic.

4. Reporting Time Zone: Select your country and the timezone.

9. Click Create.

Enter website details here

10. Review and click I Accept to accept Google’s terms and conditions.

11. Select your email preferences and click Save.

Email preferences for Google Analytics

12. On the next page, you will see the tracking ID and tracking code for Google Analytics. Copy and save both.

We can now use this code to set up Google Analytics on WordPress.

Where To Add Google Analytics Code to WordPress?

You can add Google Analytics tracking code to your WordPress theme manually by editing the theme files. The following example shows how to do this using the default Twenty Twenty WordPress theme.

  1. On your WordPress dashboard, click Appearance > Theme Editor.
Select Theme Editor

2. From the theme files list, select header.php.

We make changes to the header.php file

3. Paste the copied Google Analytics tracking code before the </head> tag.

Add Analytics code before the </head> tag

4. Click Update File.

You have now added the Google Analytics tracking code to your theme.

Plugin For Google Analytics WordPress.

Google recently launched an official plugin that you can use to connect your WordPress site to Analytics and Google Search console. If you use AdSense, you can use the same plugin to set up this service as well.

To set up Google Analytics using Site Kit:

  1. On your WordPress admin dashboard, click Plugins > Add New.
Add new plugins

2. In the Keyword field, enter Site Kit and press Enter.

Search for Site Kit here

3. Click Install Now next to Site Kit by Google. The plugin will download and install on your WordPress site.

Site Kit installation screen

4. Click Activate. You will be redirected to the Plugins page with a Site Kit welcome message.

Activate Site Kit

5. Click Start Setup.

Get started with Site Kit

6. Site Kit will now redirect you to your Google account. Click Sign in with Google. Login using the Google account where you have added your website.

Site Kit welcome screen

7. On the Choose an account screen, select the Google account where you added your website.

8. Click Allow to give Site Kit permission to manage websites for you.

Site Kit permissions screen

9. On the Confirm your choices screen, review your permissions and click Allow.

Confirm access to Google account

10. On the Welcome to Site Kit screen, click Proceed.

11. Click Allow to give Site Kit permission to access Google Account data.

Permissions for Google Site Kit

12. Click Add site to add your site to Google Search Console.

Site Kit Set Up Continues

13. Click Go to my dashboard to go back to your WordPress dashboard where you will start seeing your website stats.

Set Up Google Analytics on WordPress Website
Site Kit ready to use

You should now have a new section on your WordPress dashboard to view stats from Analytics, and insights from Google Search Console.

To learn more on this topic watch this video.

icons icons icons icons icons icons icons

Stuck Somewhere?
Connect With JustHyre

Hire WordPress Engineers for custom jobs like Website Customization, SEO Optimization, Clearing a Hacked Website, Installation & Configuration & more.

Connnect with JustHyre

There are no comments yet

Leave a comment

Your email address will not be published.