This is a small Wordpress plugin I cooked up in order to be able to send hits to Google Analytics, server-side, using Google Measurement Protocol. With that i'm able to send events, pageviews and transactions.
I claim no ownership on this code, as it's largely based on the work of Stu Miller : http://www.stumiller.me/implementing-google-analytics-measurement-protocol-in-php-and-wordpress/
- Author : Baptiste Legrand
- Mail : baptiste.legrand@gmail.com
- Twitter : @Baptiste_L
- download the file and put it in the wp-content/plugins/ directory.
- make sure you use the correct value for the GA_PROPERTY_ID constant : it has to be your Google Analytics property ID
I'd like to keep it simple.
- If you want to make this plugin more complete ( = add more features), then maybe fork it and make it an other project.
- Otherwise, do not hesitate to fork / pull request if you think there are improvements to be done.