WP Manifestindependent plugin directory
manifest / unclassified / google-analytics-wordpress-plugin

Add Google Analytics MpH GitLab

Very, very simple plugin to paste in Google Analytics tracking code

by Mark Hahn · gitlab.com/markphahn/google-analytics-wordpress-plugin · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://gitlab.com/markphahn/google-analytics-wordpress-plugin/-/archive/master/google-analytics-wordpress-plugin-master.zip

From the readme

Simple Google Analytics Plugin So you want to add Google Analytics to your Wordpress site and don't want it to get overwritten with the next update. The quickest way is to create a simple plugin. This is that plugin. Approach The idea is to build a 20-30 line plugin which you manage. The plugin is not very complicated and easy if you have coding skills. My aproach works is you have access to the filesystem and can add the plugin file to the Wordpress folder. (I could upskill this to be a marketplace solution, but I don't want to ahve to create a admin UI.) Step by Setp Directions Google Analytics Sign up for Google Analytics Find the tracking code snippit. It somewhere under the admin UI. It will look a lot like this: Create the plugin file In the directory wpcontent/plugins create a file for your plugin. Name it with your initials followed by -google-analytics.php. In my case my initials are MpH so I called the file mph-google-analytics.php. The reason to pre-pend your initials is that the file name is the identification for the plugin. As in global identification. If you choose a filename that matches another plugin's name on the marketplace, you may see notices tha

Read the full README on GitLab →