Re: Moving on from Google Universal Analytics

Posted by skenow on 1687645817

Here's a patch, if anyone wants to implement this and already haven't found a way to do it. I've bundled the files for both v1.3.11 and v1.4.4 into a single file.

There are 2 files to be concerned with - /libraries/icms/view/theme/Object.php and /plugins/preloads/googleanalytics.php. Make a backup of the first and replace with the file from the package for your version. Add the 2nd to the preloads folder.

Without any other changes, you should still be gathering data with the Universal Analytics tag. To us the new GA4 tag, you'll need to create a new property in Google Analytics to get your new tag. When you have it, update the value in your admin control panel of your site - Admin / Preferences / Meta + Footer. When you put in the new tag, include G- with the value. This is how ImpressCMS will know whether to use the UA version or the GA4 version.



Attach file:


zip GA4.zip Size: 19.22 KB; Hits: 56

This Post was from: https://www.impresscms.org/iforum/viewtopic.php?topic_id=5930&post_id=50890