Add Analytics integration with MixPanel

This commit is contained in:
Tautvidas Sipavičius
2015-11-09 18:11:06 +02:00
parent 0199e2c7e1
commit dfec34eda9
4 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace MailPoet\Analytics;
class Reporter {
private $fields = array(
'Plugin Version' => 'pluginVersion',
);
function __construct() {}
function getData() {
$_this = $this;
$analytics_data = array_map(function($func) use ($_this) {
return $_this->$func();
}, $this->fields);
return $analytics_data;
}
private function pluginVersion() {
return MAILPOET_VERSION;
}
}