Comparison of open-source CMS systems. Why is WordPress the most popular platform?
4 lutego 2026
The answer is simple, so we’ll address this question right at the beginning of this post. Analytics is an invaluable tool in the fight for customer attention in a world where every click and page scroll can translate into conversion. To effectively optimize analytical activities on WordPress, it’s crucial to start with clearly defined goals. They should align with our website’s objectives – whether we’re focusing on sales, increasing the number of subscribers, or building engagement. When we know our goals, we can appropriately select tools that will provide data on traffic, user behavior, their preferences, and the effectiveness of individual content.
Consistent monitoring of conversion rates, page views, and bounce rates allows for better understanding of user engagement and site performance. Through analysis of user interactions with our site, we can discover important behavioral patterns. For example, understanding how users navigate the site allows us to identify which content is most attractive and where problems may occur that cause engagement drops. Thanks to such data, we can effectively optimize our WordPress site’s design and content, adapting it to user needs and striving to achieve intended goals.
Google Analytics 4 is the latest version of the popular website traffic analysis tool that allows tracking user interactions and provides detailed information about their behaviors. GA4 is based on an event tracking model, which enables monitoring actions such as clicks, page scrolls, making purchases, or filling out forms. Thanks to advanced analysis features such as trend forecasting and integrated user reports, GA4 makes it easier to make business decisions based on real data.
Step 1: Log in to your Google Analytics 4 account and select the appropriate property.
Step 2: Obtain the GA4 tracking code:
Go to the Admin section (gear icon in the lower left corner).
In the Data collection and modification column, select Data streams. Click on your website, then copy the MEASUREMENT ID from the Stream details section.
Step 3: Log in to your WordPress site’s admin panel, then in the menu on the left side select Appearance -> Theme File Editor.
Step 4: In the Theme Files field on the right side, find the header.php file. The code editor will open.
Step 5: In the header.php file, find the section. Paste the copied GA4 measurement ID just before the closing tag.
Step 6: After pasting the code, Update the file to save changes to the file. After completing these steps, your WordPress site is integrated with Google Analytics 4.
When choosing this option, keep in mind that updating the template will overwrite the changes you made. In case of an update or template change, the code will need to be added again.
Step 1: Log in to your WordPress site’s admin panel, then in the menu on the left side select Plugins -> Add New.
Step 2: Find the GA Google Analytics plugin and click the Install button.
Step 3: After installation is complete, activate the plugin by clicking the Enable button. After activation, a list of all installed plugins will be displayed.
Step 4: Go to the plugin settings by clicking Settings under its name. Then click on the Plugin Settings tab.
Step 5: In the GA Tracking ID field, enter your Google Analytics 4 measurement ID (format: G-XXXXXXX). To do this, copy your identifier from your Google Analytics 4 account – the complete process of obtaining the tracking code is described in step 2 of subsection a) Manual addition of global site tag directly in the template.
Step 6: In the Tracking Method field, select the tracking method you want to use: Global Site Tag.
Step 7: Click the Save changes button to complete the configuration. Now Google Analytics will track traffic on your WordPress site.
Google Search Console is a free tool offered by Google that helps website owners monitor and improve their site’s visibility in search results. GSC provides information about keywords for which the site appears, indexing errors, and SEO-related issues. Thanks to reports and suggestions from Google Search Console, users can optimize their pages for search engines, which increases the chances of achieving higher positions in search results and attracting more traffic.
Step 1: Log in to your Google account and open Google Search Console. Click the Add property button.
Step 2: Add your website. Two methods are available for adding a property:
Step 3: Verify ownership (Verify ownership). GSC requires confirmation that you have rights to manage the site. You can do this in several ways:osobów:
In case of adding a property by domain:
In case of adding a property by URL prefix:
Step 4: After correctly completing the above steps, Google Search Console will display a successful verification message.
Step 5: After verification, go to the Sitemaps tab and add the URL of your sitemap. Regularly check reports on site status, indexing errors, and analyze keywords for which your site appears.
Hotjar is an analytics tool that enables analysis of user experiences on a website. Thanks to features such as heatmaps, session recordings, and user surveys, Hotjar allows you to see how users interact with the site, where they focus their attention, and where they may encounter difficulties. It’s a valuable tool for WordPress site owners who want to understand their users’ behaviors and optimize the site for better UX and higher conversions.
Step 1: Log in or register on the Hotjar platform and configure an account for your website by entering its name and URL address.
Step 2: Go to the Sites tab. In the Tracking column, click Install tracking code for the site you want to track. Copy the generated tracking code from the Hotjar panel.
Step 3: Log in to your WordPress site’s admin panel, then in the menu on the left side select Appearance -> Theme File Editor.
Step 4: In the Theme Files field on the right side, find the header.php file. The code editor will open.
Step 5: In the header.php file, paste the copied tracking code between the and tags in your site’s code. After pasting the code, Update the file to save changes to the file.
Step 6: After adding the Hotjar tracking code to the site, wait a few minutes for Hotjar to verify the correctness of its installation. The verification status can be checked in the Sites tab of the Hotjar panel.
When choosing this option, keep in mind that updating the template will overwrite the changes you made. In case of an update or template change, the code will need to be added again.
Step 1: Create a free account on the HotJar platform by entering basic information or logging in through your Google account.
Step 2: Click the Install on a platform button, then select WordPress from the displayed list.
Step 3: Log in to your WordPress site’s admin panel, then in the menu on the left side select Plugins -> Add New. Find the Hotjar plugin and click the Install button. After installation is complete, activate the plugin by clicking the Enable button.
Step 4: In the menu on the left side, select Settings -> Hotjar, then in the Hotjar ID field, enter the ID of your Hotjar service. The service ID will be displayed in the Hotjar service panel. After entering the ID in the plugin settings, save the changes, then click the Verify installation button in the Hotjar panel. After completing the above steps, Hotjar will verify the integration correctness and start collecting data that will then be available to you.
Matomo is an open-source alternative to Google Analytics, offering full control over user data and their privacy. Matomo can be installed locally on your own server or used in a cloud version, which provides flexibility and security compliant with GDPR requirements and other data protection regulations.
Step 1: Log in to the Matomo platform using an administrator account. Click the Administration button (gear icon) in the top menu.
Step 2: In the menu on the left side, select Websites -> Tracking Code. Click the JavaScript Tracking tab and select the site you want to track. Copy the JavaScript tracking code.
Step 3: Log in to your WordPress site’s admin panel, then in the menu on the left side select Appearance -> Theme File Editor.
Step 4: In the Theme Files field on the right side, find the header.php file. The code editor will open.
Step 5: In the header.php file, paste the copied JavaScript tracking code inside the section in your site’s code. After pasting the code, Update the file to save changes to the file. Your WordPress site is now configured to track visitor data using Matomo.
When choosing this option, keep in mind that updating the template will overwrite the changes you made. In case of an update or template change, the code will need to be added again.
The Matomo Analytics plugin installs Matomo directly in your WordPress. After installation, tracking occurs locally within WordPress. With this type of installation, data remains in your WordPress and is not transmitted externally.
Step 1: Log in to your WordPress site’s admin panel, then in the menu on the left side select Plugins -> Add New. Find the Matomo Analytics plugin and click the Install button. After installation is complete, activate the plugin by clicking the Enable button.
Step 2: Go to Matomo Analytics -> Get started and enable tracking by clicking the Enable tracking now button.
If you use ad-blocking software in your browser, it may be necessary to add an exception for your site.
This installation works independently of WordPress and runs on a separate server. If you already have a Matomo On-Premise account or use the Matomo Cloud service, it is recommended to install the Connect Matomo plugin.
Step 1: Log in to your WordPress site’s admin panel, then in the menu on the left side select Plugins -> Add New. Find the Connect Matomo plugin and click the Install button. After installation is complete, activate the plugin by clicking the Enable button.
Step 2: In the menu on the left side, select Settings -> WP-Matomo. In the Connect to Matomo tab, from the Matomo Mode dropdown list, select the Self-hosted (HTTP API, default) option. In the Matomo URL text field, enter the Matomo URL address. In the Auth token text field, enter your Matomo authentication token. To generate the token_auth, follow these steps:
Step 3: Check that the Auto config checkbox is selected, then click the Save changes button. If the provided information is correct, the message „Connect Matomo is successfully connected to Matomo” will appear.
Step 4: In the Enable Tracking tab, from the Add tracking code dropdown list, select the Default tracking option. Click the Save changes button.
It is not recommended to use both Matomo Analytics and Connect Matomo plugins simultaneously, as this can lead to conflicts and incorrect tracking data.
Effective integration of analytics tools with WordPress is a milestone toward better understanding and optimizing your site. In this post, we discussed detailed methods of implementing tools such as Google Analytics, Google Search Console, Hotjar, and Matomo, both using plugins and through manual code addition.
Plugins undoubtedly facilitate the entire integration process, making it quick and intuitive even for less technically advanced users. However, it’s worth remembering that an excess of plugins can lead to site performance issues and the need for regular updates to maintain security and compatibility.
On the other hand, manual integration can be a more stable and secure solution, although it requires some technical knowledge. If you don’t feel confident editing site code, using the help of an experienced specialist may be the best choice to avoid potential errors.
Regardless of the chosen method, it’s crucial to regularly monitor the operation of integrated tools and ensure that your site functions smoothly and that analytical data is accurate and useful in making decisions regarding site development.
Jakub Jadczak
Founder @ Esumo
In today’s world, a professional website is a business foundation. Presence alone is however not enough – the key is technology that truly supports your goals. To see how we can help your company, we’ll assess during a free consultation.
Fill out the form and we’ll get in touch with you. During a 30-minute, free conversation, we’ll assess what strategy and technology solutions will be most beneficial for you.