If you’re looking for a plugin-free approach to adding Google Analytics to WordPress. Well, you are in the right place. In this article, we will show you “How to Add Google Analytics to WordPress Without a Plugin”
Google Analytics is a good tool to have on your website to help you track and monitor the traffic to your website and provide useful information about your users.
Google Analytics Is Important For Your WordPress Website:
The following are a few key advantages of including Google Analytics code on your WordPress website:
- With the integration of Google Analytics into your WordPress site, you can better understand your audience.
- Track the websites and blogs to see what kinds of material bring in the most visitors.
- Determine the countries from which the traffic originates and its sources.
- Track the conversions and revenue generated
- Improve the user experience on your website
Let’s examine how to integrate Analytics tracking code into WordPress without using a plugin.
How to Add Google Analytics to Website
1. Create a Google Account/Login: Create a Google account if you haven’t, then log in to Google analytics
2: Get Your Google Analytics Tracking ID & Copy Tracking Code:
- Scroll down the menu on the left until you find the gear icon for the admin section. Toggle this section on.
- By choosing the drop-down box next to the property section, you may choose the asset (website) that you want to track.
- You can choose “Tracking Info” from the menu that appears beneath the column. Select Tracking Information.
- Another set of possibilities will then appear as a result. Choose the one marked “Tracking Code” and click.
- Your Tracking ID, Status, and a section for website tracking will be displayed in a text column on the right. A window with the Global Site tag will appear (gtag.js) Go to your WordPress website after you have copied this text.
- 9 Best Free Web Hosting Services you can trust
- Complete Guide To the Google Penguin Algorithm
- [SOLVED] Updating or Publishing failed. The response is not a valid JSON response in WordPress
- On-Page SEO Guide
- How SEO can help Startups and Small Businesses
Add Google Tracking Code to the header of the WordPress Website.
- Log In To WordPress And Add The Code
- Click on the Appearance and then click on Editor.
- A Theme Header is a common feature in WordPress themes (header.php). Click on the file link after finding this file in the list to the right. The editor will open the file. If your theme’s file doesn’t appear to contain a header.php file, get help from the theme’s developer.
- Before the “</head>” tag in the header.php file, paste the Global Site Tag (gtag.js) code that you copied before.
Save the code changes by Clicking on Update File.
Test Your Connection To Google Analytics
It takes between 24 and 48 hours after adding Google Analytics code to WordPress for fresh data to appear.
You can therefore retest the connection that you have made even if you won’t see any visitors to your site right away.
Check by going back to Google Analytics’ Tracking Code tab. Your Tracking ID is followed by a Status Update. Click Send Test Traffic to make sure everything is operating as it should.
Your website will open in a small window as a result.
You just discovered how to integrate Google Analytics without a plugin to WordPress.