-
-
Notifications
You must be signed in to change notification settings - Fork 0
Google Analytics 4
There are so many plugins for implementing Google Analytics 4, and they get installed on a lot of websites that don't really need them. Most website owners need to insert Google Analytics tracking code, and use all default tracking settings, and make things work without the huge overhead some plugins bring. Many plugins integrate some of the Analytics reports into WordPress administration, but that always is missing some data, so you need to go to the full Analytics website, making the feature unusable. The only way to really analyze the data collected is on the Google Analytics website.
Some plugins currently available load tons of JavaScript of their own, slowdown website loading, infest admin side with banners, and messages all over the place. Most of these plugins are too invasive, and they really don't do much that is needed by most users. Most users need to enable tracking in Analytics and that's it.
This plugin helps you to insert your Google Analytics tracking code, it inserts tracking code, and you are all set.
- Tracking JavaScript code is automatically added to the header of all your website pages
- It doesn't track super administrator activities (main administrator of the website)
- Extremely light-weight with no overhead, just a few lines of code
- Loads Google Analytics ASYNC version using Tag Manager
- It doesn't offer an interface to set up plugin visually
- It can't connect to Google Analytics, you need to insert the tracking ID
- No dashboard integration between Analytics and WordPress website
The script runs on the frontend only, and by default, it doesn't load for the main website administrator (super admin). Line 24 controls the conditions for inserting the tracking script, so you can expand that if you want with more conditions. And, the core offers 2 filters that you can use to change the condition for display of the tracking script and tracking code.
You need a Google Analytics 4 tracking code in format G-A12B3C4DE5. Insert your tracking code into the plugin code on line 18, and replace the placeholder G-A12B3C4DE5 with your real tracking code. That's all you need to do.