How To Add Google Analytics Tracking Code In WordPress Website

After you create a WordPress website, you can add google analytics tracking code to your WordPress website to track your website browsing action. This article will tell you two methods about how to add google analytics tracking code to your WordPress website.

1. Use WordPress Plugin MonsterInsights.

  1. Login to your WordPress manager website.
  2. Click Plugins —> Add New menu item in the left navigation panel.
  3. Search MonsterInsights in the search plugins text box.
  4. Then click Install Now button to install the MonsterInsights plugin.
  5. After installing the MonsterInsights plugin, click Insights —> Settings menu item in the left navigation panel.
  6. Then click the Launch Setup Wizard button to integrate your google analytics code into your WordPress website.

2. Add Google Analytics JS Code In Theme header.php File.

  1. Register google analytics with your Google account.
  2. Login to google analytics and click the Admin menu item on the bottom left corner of the left menu panel.
  3. Then click Create Account button in the right panel, input related website information until the get google analytics tracking code page.
  4. Copy your website google analytics tracking js code.
  5. Then paste the above js code into the WordPress website header.php file. Please read the article How To Modify WordPress Header & Footer to learn more.

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.