HOW TO ADD GOOGLE ANALYTICS TO WORDPRESS

Adding Google Analytics to WordPress is like putting a CCTV system on your website, it lets you see who is visiting where they are coming from and what they are doing. Without it you are essentially running your site blindfolded. The good news is that setting it up is quick and easy even if you are not a tech wizard.

 

The first step is to create a Google Analytics account if you have not already. Go to Google Analytics sign in with your Google account and set up a new property for your website. Once your account is ready Google will provide you with a tracking ID or a Global Site Tag (gtag.js) which is what you will use to connect Google Analytics to WordPress.

 

There are two main ways to add Google Analytics to WordPress: using a plugin or manually adding the tracking code to your site.

The easiest method is using a plugin. Popular options like Monster Insights and Site Kit by Google allow you to connect Google Analytics without touching a single line of code. Simply install the plugin from your WordPress dashboard activate it and follow the setup instructions. You will be asked to sign into your Google account and select your analytics property. Once connected the plugin will automatically add the tracking code to your site and even provide basic analytics reports directly in your WordPress dashboard.

 

If you prefer a more hands-on approach, you can manually add the tracking code. To do this copy the Global Site Tag (gtag.js) from your Google Analytics account and paste it into the <head> section of your WordPress theme. You can do this by going to Appearance > Theme Editor and adding the code to the header file just before the closing </head> tag. If you are using a child theme or a theme that updates frequently a better approach is to use the Insert Headers and Footers plugin which allows you to add tracking scripts without editing theme files.

 

Once the tracking code is added Google Analytics will start collecting data, but it may take a few hours before you see results. To check if it is working go to Google Analytics > Realtime and visit your website in another tab. If you see an active user from your location everything is set up correctly.

 

Adding Google Analytics to WordPress is essential for understanding your audience and making data-driven decisions. Whether you use a plugin or add the tracking code manually once it is set up you will have access to valuable insights that can help grow your website and improve its performance.

Other Google Analytic Guides

Become a Master of Analytics and a Sensei of SEO

CREATE A GOOGLE ANALYTICS ACCOUNT

Maximise Your Reach With Our Local SEO

At Lillian Purge, we understand that standing out in your local area is key to driving business growth. Our Local SEO services are designed to enhance your visibility in local search results, ensuring that when potential customers are searching for services like yours, they find you first. Whether you’re a small business looking to increase footfall or an established brand wanting to dominate your local market, we provide tailored solutions that get results.

We will increase your local visibility, making sure your business stands out to nearby customers. With a comprehensive range of services designed to optimise your online presence, we ensure your business is found where it matters most—locally.

Strategic SEO Support for Your Business

Explore our comprehensive SEO packages tailored to you and your business.

Local SEO Services

From £550 per month

We specialise in boosting your search visibility locally. Whether you're a small local business or in the process of starting a new one, our team applies the latest SEO strategies tailored to your industry. With our proven techniques, we ensure your business appears where it matters most—right in front of your target audience.

SEO Services

From £1,950 per month

Our expert SEO services are designed to boost your website’s visibility and drive targeted traffic. We use proven strategies, tailored to your business, that deliver real, measurable results. Whether you’re a small business or a large ecommerce platform, we help you climb the search rankings and grow your business.

Technical SEO

From £195

Get your website ready to rank. Our Technical SEO services ensure your site meets the latest search engine requirements. From optimized loading speeds to mobile compatibility and SEO-friendly architecture, we prepare your website for success, leaving no stone unturned.

With Over 10+ Years Of Experience In The Industry

We Craft Websites That Inspire

At Lillian Purge, we don’t just build websites—we create engaging digital experiences that captivate your audience and drive results. Whether you need a sleek business website or a fully-functional ecommerce platform, our expert team blends creativity with cutting-edge technology to deliver sites that not only look stunning but perform seamlessly. We tailor every design to your brand and ensure it’s optimised for both desktop and mobile, helping you stand out online and convert visitors into loyal customers. Let us bring your vision to life with a website designed to impress and deliver results.