WordPress has become one of the most popular platforms for building websites thanks to its simplicity, flexibility and wide range of available plugins. When implementing web analytics on a WordPress site, it is important to understand the advantages, disadvantages and the tools needed for collecting data.
Advantages of Collecting Data from WordPress Sites
Simple implementation
With plugins such as Metronet Tag Manager or Google Analytics WordPress Plugin by GA4WP you can easily integrate tracking of traffic and user behaviour without the need for major code changes.
A wide choice of plugins
There are many plugins that provide a variety of analysis options – from conversion tracking to a detailed view of visitors' demographic data.
User interface
Thanks to the available plugins, data can be presented clearly in the user-friendly environment of the WordPress dashboard.
Optimisation options
By analysing data you can identify the weaknesses of your pages and optimise them for better performance and user experience.
The simplest way to "switch on" web analytics on a WordPress site is to create an account in Google Tag Manager and then copy the code into the website using the Metronet Tag Manager plugin. This way you have all the measurement under control thanks to the container in Google Tag Manager and you decide yourself which data, and with which parameters, you send to Google Analytics 4 .
In some cases, however, the measurement will not be completely accurate because of a conflict between plugins or the WordPress code itself, which is still somewhat robust. For more accurate measurement you cannot avoid using JavaScript, or turning to professionals.
If it is a simpler content website (without an e-shop), the only pitfall will be measuring a submitted form, or measuring calculators on the website. Even that can be overcome.
For Submitting an Enquiry Form You Can Basically Take 3 Routes.
- Basic measurement setup after clicking the "send" button. – This solution is very simple and takes only a few minutes. The problem is that the event is sent even if the form is filled in incorrectly, so one person can send several form_send events. But only one of them is a genuine enquiry. In the statistics you then see many times more enquiries than you actually have. Another problem is that this way you get no detailed data into GA4 .
- The event can be sent only if the form is submitted successfully. This approach uses so-called Element visibility, where the event is sent only when the confirmation message that the form has been sent appears, or the event can be tied to the display of a so-called thank-you page. Here the number of submitted enquiries will already match reality.
- The last method uses the approach of the 2nd method, but together with the event it also sends data about the user and the service they are enquiring about. Here, however, we cannot avoid using JavaScript and CSS selectors. So if these are unfamiliar to you, turn to professionals.
Disadvantages of Collecting Data from WordPress Sites
Limited functionality of free plugin versions
Many basic analysis functions may be available only in the paid versions of plugins, which can limit advanced analysis options.
Possible slowing down of page loading
Using too many plugins for analysis and tracking can negatively affect the loading speed of a website. We therefore recommend limiting yourself only to those that are really needed, or paying for one that will replace 5 plugins in the free version, or turning to professionals who will set up the measurement for you using Google Tag Manager.
Plugins Needed for Collecting Data from WordPress Sites
Metronet Tag Manager
A simple plugin for integrating Google Tag Manager. It only requires copying two codes and pasting them into the prepared text editors.
WP Statistics
This plugin provides basic traffic statistics, such as the number of visits, pages, referrers and visitors' countries.
Integrate GA4 Google Analytics
This plugin needs only the measurement ID from your GA4 account and then starts measuring basic interactions on the website.
The Pitfalls of the Data Layer in WordPress
The data layer in WordPress can be problematic if the data is not implemented correctly or if there are conflicts between different plugins. Errors in implementation can lead to incorrect interpretation of the data and thus affect the quality of the analysis.
It is important to make sure that the plugins for web analytics are configured correctly and do not collide with other functions of the website. Regular maintenance and checking of the data layer are key to obtaining reliable information for optimising the pages and improving the user experience.
WordPress itself has no data layer, and when it does, it is usually unusable for common cases. On the other hand, it has countless plugins, both paid and free, that can replace it to some extent.
If you use WooCommerce, that is, the tool for building an e-shop, you can use the plugin Datalayer for WooCommerce, which provides the basic data layer needed for basic e-shop measurement. It will of course never be as good as a manual implementation of the data layer directly in the code, but for basic purposes it will do.
