Browsed by
Category: Javascript

Custom Google Analytics plugin for WordPress

Custom Google Analytics plugin for WordPress

There are many plugins available on the web, but you can also create your own ‘simple’ Google Analytics plugin. Create new PHP file in /wp-content/plugins folder, for example: examplegoogleanalytics.php Add the following code in the PHP file Enter the WordPress Admin and activate the plugin. If this solution is not working check if your theme have the wp_head hook in the header.php¬†available.