How to Add Google Analytics to WordPress

June 10, 2021

Google Analytics is one of the most powerful tools in marketing. It is really important if you want to show up on Google. It gives the data you need to see how your content is performing and gives you insights on how to improve it. That being said, not everyone has it set up on their website. We wanted to show you how to add Google Analytics to WordPress. Below you’ll see step by step instructions of how to add Google Analytics to WordPress.

1. First, you go to and sign up using a Google account.

How to Add Wordpress Google Analytics Tracking Code Example

2. After clicking “Sign Up” you’ll see the new account section where you enter in basic information like the name of the account, website info and industry.

Adding Google Analytics to Wordpress Example

3. Once completed, select “Get Tracking Code” and you’ll be prompted to agree to Google’s terms. Afterward, you’ll be directed to your admin page where you’ll see the tracking script that you’ll copy.

Add Google Analytics Tracking Code to Wordpress

4. Once you have that copied, go to your WordPress dashboard and to the plugins section.

Wordpress SEO is Important Example Plugin

5. Add a new plugin called Insert Headers and Footers and activate it.

Wordpress Adding Analytics Google

6. From there, navigate to Settings > Insert Headers and Footers to view the plugin options.

Adding Google Analytics to Wordpress

7. That’s where you’ll paste in your Google Analytics script into the footer section and save.

How to Wordpress SEO

You now know how to add Google Analytics to WordPress.

That’s it!  Now you’ll wait for the traffic to start coming in.  You can test to see if it’s working by going to the site yourself and seeing if it shows up in Analytics as someone on the site.  After you have some data you can start mining it for information.  You can learn what content works, what appears to break on mobile, load times, demographics- basically anything.  Google Analytics is used by all types of companies to improve their websites and deliver better content to viewers.  Now you’re one of them!

About the Author: David Bell

Founder of Diving Bell Creative a growth marketing agency for startups. David's a growth marketer, advisor, and investor.