Google Analytics is a web analytics suite that helps you find out and analyzes your web traffic. Using Google Analytics to optimize traffic sources, improve your content and content strategy, track marketing campaigns, and also find worst-performing pages and take steps to make them better. In this way, Google Analytics is most useful for site tracking. But many WordPress users struggle to add Google Analytics to WordPress and start tracking their site. To help with that, we are going to show you how to add Google Analytics to WordPress with or without a plugin.
Add Google Analytics in WordPress Without a Plugin
The setting up Google Analytics on your site involves the following steps:
- Add your GA property ID to the tracking-code snippet
- Include the tracking snippet on your web page.
Add Google Analytics
just open your theme’s footer.php file and paste the snippet just before the closing </body> tag. Upload the file to the server and done. The GA tracking code will now be included on all of your public WP pages (posts, archives, pages, et al).
To add the code via the functions.php file, just add the following code to your active theme’s functions.php file.
Add Google Analytics in WordPress With a Plugin
To use Google Analytics data, you’ll have to add a tracking code to your site. This can be difficult for a lot of people unless they’re very technically confident. However, if you’re using WordPress, you can use a plugin that installs and adds Google Analytics tracking code to your site.
The Best Google Analytics Plugins for WordPress
MonsterInsights is the most popular Google Analytics plugin for WordPress.This wildly popular plugin lets you set up Google Analytics to track your site traffic easily. And the good news is you don’t have to touch a single line of code. It’s easy to double your traffic and sales when you know exactly how people find and use your website. MonsterInsights get access to all that awesome Google Analytics data. Like that provides you to track your form views, submissions, and the form conversion rate to help you with form abandonment.
ExactMetrics is one of the most popular Google Analytics plugins for WordPress. Lets you track the visitors to your website and get the analytics reports in your WordPress dashboard. So you can view essential details like page views, bounce rate, mobile analytics stats, organic searches, and traffic from social media sites.
You can also check the real-time number of visitors, traffic sources, and acquisition channels. ExactMetrics plugin provides all reports for each page and post. Thus you can analyze the data and optimize your content to get better results. You can also enable event tracking for AMP.
Analytify is a premium Google Analytics plugin and offers simple installation process to add the tracking code to your site. It is a premium WordPress plugin with pricing plans starting from $29 for a single site license. Just like MonsterInsights, the analytics reports inside your WordPress admin area. You can also check the statistics of individual posts, pages, and custom post types. Analytify plugin offers different add-ons to enhance its functionality like sales, transactions, and income.