Skip to content

A small Wordpress plugin to send events, pageviews and e-commerce transactions to Google Analytics, using PHP / Google Measurement Protocol and a few WP functions..

License

Notifications You must be signed in to change notification settings

blegrand/google-analytics-php-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

google-analytics-php-library

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/

Setup & Configuration

  • 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

Pull request

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.

About

A small Wordpress plugin to send events, pageviews and e-commerce transactions to Google Analytics, using PHP / Google Measurement Protocol and a few WP functions..

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages