How to Properly Setup Google Analytics in WordPress

How to Add Google Analytics to WordPress (The RIGHT Way)

Want to know how people are finding your site, which blog posts are most popular, or how many of your visitors are using mobile devices? All of that and more can be easily found out using Google Analytics and MonsterInsights.

In this article, we’ll show you how to add Google Analytics to WordPress site using MonsterInsights, the best Google Analytics plugin for WordPress.

Step 1: Sign In to Google

The first thing you’ll need to do is log in or sign up for a Google account.

To get started, you’ll need to open the Google Analytics website and click the Sign in to Analytics link or Start for free button in the top right corner of the page.

Sign in to Google Analytics

Next, you can log in to your existing Google account if you have one, or click the Create account link to create a new Google account.

Sign In to Your Google Account for Analytics Account

Step 2: Sign Up For Google Analytics

After you’ve signed in to your Google account, you’ll need to sign up for Google Analytics. Click the Sign Up button on the right side of the page to get started.

Click to sign up for Google Analytics

Next, you’ll need to enter the settings for the site you want to start tracking.

Make sure the Website option is selected at the top.

Select Website tracking

Then you can scroll down to enter your website information. You’ll need to name your Google Analytics account, and enter your website name, URL, and industry, as well as your time zone.

Fill in the info needed to create a Google Analytics account

After filling in your website details, you can scroll down a bit to customize your data sharing settings. When you’re finished selecting your options, you can click the Get Tracking ID button at the bottom of the page.

Choose your Google Analytics data sharing options

In the popup window that appears, you’ll need to review and accept the Google Analytics Terms of Service and the Data Processing Terms as required by GDPR.

Accept Google Analytics Terms of Service and GDPR

After that, you should also review and accept the Measurement Controller-Controller Data Protection Terms. Check the box stating that you accept this term, and click on the I Accept button at the end.

Accept Measurement Controller-Controller Data Protection Terms for Data Sharing in Analytics

That’s it! You’re now signed up for Google Analytics. Next, we’ll add Google Analytics to WordPress.

Step 3: Set Up MonsterInsights

Normally, you’d have to insert your Google Analytics tracking code into your WordPress website’s code.

But with MonsterInsights, you don’t need to worry about using any code.

Instead, you can get started by downloading the MonsterInsights plugin. To do that, you’ll need to login to your MonsterInsights account and download the plugin zip file.

Once you have the zip file, navigate to the site where you want to install MonsterInsights and go to the WordPress admin dashboard.

Then navigate to Plugins » Add New and click the Upload Plugin button at the top.

Upload Plugin Button in WordPress

On the next screen, you can click the Choose File button to select the zip file you just downloaded. Then click the Install Now button to upload the file and install the plugin on your site.

Install MonsterInsights Google Analytics WordPress Plugin

Once the plugin has been uploaded and installed, you can click the Activate Plugin button to activate it on your site.

Activate MonsterInsights WordPress Plugin

After the plugin is activated, the plugin setup wizard will open to guide you through the setup process step by step.

At first, you’ll see ‘Welcome to MonsterInsights!’ message and options to choose the category of your website. There’re 3 options: Business website, Publisher (Blog), and Ecommerce.

MonsterInsights Setup Wizard - Choose Your Website Category

Select a category that best describes your website, and then click ‘Save and Continue’ button.

If you want to skip the setup wizard, for now, you can click ‘Exit Setup’ button at the top.

In the next screen, you’ll need to connect MonsterInsights plugin to your website by providing your license key.

Enter Your MonsterInsights License Key to Connect with WordPress

You can find your MonsterInsights license key in your email receipt or account area on the plugin website.

Once you enter your license key, it’ll verify your account, and then you can click on the ‘Connect MonsterInsights’ button.

After that, you’ll see an option to connect your Google Analytics with your MonsterInsights account. Select your account to continue authentication.

Choose Your Google Account to Connect with MonsterInsights

Next, you’ll need to allow MonsterInsights the proper permissions.

Allow MonsterInsights to Access Your Google Analytics Data

After that, you’ll need to pick a profile to complete the connection. If you’ve multiple websites connected to your Google Analytics account, then you’ll need to choose the right website property here.

Pick Your Google Analytics Property from Analytics Account to Connect with MonsterInsights

Choose your profile, and then click the ‘Complete Connection’ button.

After that, it’ll finalize the authentication process in a few seconds, and then take you back to your MonsterInsights setup page.

Now you can see recommended settings for the Google Analytics plugin.

MonsterInsights GA Plugin Recommended Settings

This page includes some of the most important settings as the following:

  • Events tracking – Enabled by default.
  • Enhanced Link Attribution – Enabled by default.
  • File Download Tracking – Most used file types (doc,exe,js,pdf,ppt,tgz,zip,xls) added by default.

As you scroll down, you’ll see more settings.

MonsterInsights GA Plugin Recommended Settings -second part

  • Affiliate Link Tracking – It has 2 affiliate link paths added by default, and lets you add more affiliate link paths.
  • Access to MonsterInsights’s Reports – You can choose who can see the MonsterInsights’s reports.
  • Automatic Plugin Updates – You can enable or disable the option to install updates automatically.

Review and configure these recommended settings, and then click the ‘Save and Continue’ button at the end.

On the next screen, it’ll recommend you to install a couple of addons.

MonsterInsights Plugin Recommended Addons

The MonsterInsights Forms addon helps you to track your form views, submissions, and conversions. And, the MonsterInsights Page Insights is great for tracking the metrics for individual posts/pages in your dashboard.

In the next step, you’ll see a recommendation for WPForms plugin. It’s the most beginner friendly WordPress form plugin created by the same team behind MonsterInsights.

MonsterInsights Recommended Plugin WPForms

Click on the ‘Continue & Install WPForms’ button if you want to use WPForms. Otherwise, you can click ‘Skip this Step’ link.

After that, you’ll see a new screen with this message ‘Awesome, You’re All Set!’. It means the setup process is complete, and you’ve successfully installed Google Analytics in your WordPress site.

Finish MonsterInsights Setup in WordPress to Add Google Analytics

This screen also notifies you about when you can start seeing your website reports. Depending on the size of your website, it can take between a few hours to 24 hours.

Don’t forget to click on the ‘Finish Setup & Exit Wizard’ button.

That’s it! You’ve successfully added Google Analytics to WordPress the right way.

View Your Google Analytics Metrics in Your Dashboard

As we mentioned above, it can take a few hours for Google Analytics to start collecting data. Wait for some time, and then you’ll be able to view your WordPress website reports right inside your WordPress dashboard.

A quick summary of the website analytics report is available in MonsterInsights’ dashboard widget.

Google Analytics Dashboard Widget for WordPress by MonsterInsights

To view the full reports, you’ll need to visit Insights » Reports from your dashboard. There, you’ll see the overview report first.

monsterinsights-overview-report

Then, you can view all the other reports by clicking on the tabs/links at the top of the report. Here’re just a few types of data you can track using MonsterInsights’ plugin:

  • Top landing pages: Which landing pages are most popular on your site
  • Link and button click tracking: Which links and buttons are getting the most clicks
  • Search console report: What keywords people are using to come to your site
  • Forms tracking: Which forms are getting the most impressions and submissions

Also, you can track advanced metrics like eCommerce transactions and custom dimensions easily with MonsterInsights.

In conclusion, MonsterInsights makes it super easy to add Google Analytics to WordPress, set up advanced trackings, and view reports.

We hope this tutorial helped you to set up Google Analytics with MonsterInsights. You may also want to see our guide on how to add a simple contact form to WordPress.

If you liked this article, then please follow us on Twitter and Facebook for more free tutorials.

Comments

    Neal Umphred

    Excellent! Easy to follow instructions—even for technically inept people like me.

    Reply

    I’m so glad I found this! I was getting very frustrated! Thanks

    Reply

      KeriLynn Engel

      Thank you, Candy! Glad you found it helpful 🙂 Feel free to check out WPBeginner for more beginner-friendly WordPress tutorials!

      Reply

    Kimberly

    Excited try this, but at the last step it won’t let me select my website. It’ll only let me select the alternative which is All Web Site…..

    Reply

      MonsterInsights Team

      Hi there,
      That’s the correct view. The default Google view for a website is called “All Website Data”. The heading name of the website is there for users who have more than 1 Google view per property and more than 1 property to help them separate their Google view/properties

      Reply

    G. P. Gautam

    Hello MonsterInsights Team,

    I just try this plugin and setup very well in my website by reading this tutorial. It is really useful and working correctly.

    Thank you.

    Reply

      KeriLynn Engel

      Thank you, G.P.! Glad you found it useful! You can follow us on Twitter and Facebook for more Google Analytics and MonsterInsights tutorials if you like 🙂

      Reply

    Christian Nelson

    I really appreciate this very complete step-by-step explanation…unusual to get something this good…thank you.

    Reply

      KeriLynn Engel

      Thanks so much, Christian! Glad you found it useful 🙂 If you like, you can follow us on Twitter and Facebook for more step-by-step tutorials.

      Reply

    Dilan

    Do i need to manually add google analytics tracking code script to my wordpress site ?

    Reply

      KeriLynn Engel

      Hi Dilan! Nope, if you follow this tutorial and use MonsterInsights, there’s no need to manually add the tracking code. MonsterInsights handles all that for you, so there’s no need to touch any code.

      Reply

        Rick L.

        What happens if you already have GA tracking code implemented on your site? Do you need to remove it? If so, do you lose your historical data?

        Reply

          MonsterInsights Team

          Hi there,
          Yes you’ll want to remove it. Your historical data is tied to your Google Analytics profile not the actual tracking code, so MonsterInsights will be reporting it’s Google Analytics data into the same place. Thus your historical data will be just fine, and from the point of view of Google Analytics’s reports, the newly collected data will go to the same place as your “historical” data, so on reports like session count it will appear as if nothing changed; the biggest change you will notice is you will be able to get more reporting out of Google, for example in the Top Events area we’ll start adding the outbound link click events (if you have that feature turned on) for example.

          -Chris

          Reply

    Perfect!!! So glad to have found this and as usual, you guys rocked it! Thanks 🙂

    Reply

    Thanks for the explanation, but I still have one concern, if you can help me out. After we successfully set up your plugin, can we normally add new pages on our website? I mean, is the tracking code automatically inserted in all pages that we create after we installed MI plugin?

    Thanks

    Reply

      MonsterInsights Team

      MonsterInsights automatically outputs the tracking code on all pages/posts created before and after install of the plugin.

      Reply

        And just one question. We have installed the code with MI plugin last week, and I thought that it worked normally. But now I see that we still can’t see age and gender reports. I clicked and confirmed all the needed things in property settings, but still nothing. In the code there is “displayfeatures” line, can this be the reason? I read that this line is not necessary anymore since it can just be toggled in property settings. Any help?
        Thanks

        Reply

    Deborah Kay

    If I already have Google Analytics setup on my website and am using another plugin for e-commerce tracking, can I just uninstall those plugins and install yours?

    Reply

      Shahzad Saeed

      Of course! Make sure to remove other Analytics plugin while using MonsterInsights. Otherwise, Analytics may double track your traffic.

      You should also try our eCommerce addon, which gives you all the data you need to optimize your eCommerce store for conversions.

      Reply

    Yaron Ofek

    If I use your plugin to acquire the tracking code, who owns the google tracking code? Would I have access to the data accumulated to that traffic code (on the google analytics website) if for any reason I choose to delete the plugin? Or would I only have access to the data through my WP dashboard, and only as long as I have your plugin active and installed?

    Reply

      Shahzad Saeed

      Hey Yaron,
      Thanks for your interest in MonsterInsights and letting us know your concerns. If you decide to uninstall the plugin in future, you can still access your previous tracking data in Google Analytics. It won’t disappear.

      If you want, you can then set up Analytics natively and continue tracking your site without any issues. But you’ll definitely miss the cool tracking features MonsterInsights provides.

      Reply

    I guess it took about 15 minutes before the code started to appear in the source code. It seems to be working now. Thanks for a great plugin guys!

    Reply

    I am setting Monster Insights up for a client now and would like to know what I need the client to do on his end in order for me to authenticate the account. I have full access to the WordPress dashboard but not his GA account.

    Reply

    Hi
    My administrator has installed MI on my Word Press website and I have set up Google Analytics and authenticated MI with my Google Account.

    I want to track outbound links clicked on my website. Do I simply look at the reports in Google Analytics or is there more that I need to do in MI on my website. Thanks

    Reply

      MonsterInsights Team

      Hi there,
      If you haven’t already you’ll want to turn on tracking for outbound links in MonsterInsights. Then you can view the results in Google Analytics following this guide if you’re a Lite user, and if you’re a Plus or Pro level MonsterInsights user, you can view the top links on on the brand new reporting dashboard for paid MonsterInsights users inside of WordPress on the Publisher Report.

      Reply

    I’m trying to authenticate my monsterinsight but the popup at authentication doesn’t show the lower buttons (cancel and next, hence I’m stuck.

    Reply

      MonsterInsights Team

      Hi there,
      This is caused by a plugin conflict. If you can get in touch with us on our contact page, we’ll be happy to get you sorted out

      -Chris

      Reply

Leave a Reply

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.