|
|
@@ -1,6 +1,6 @@ |
|
|
|
<?php |
|
|
|
/** |
|
|
|
* Plugin name: socos.io adaptions |
|
|
|
* Plugin name: sandbox adaptions |
|
|
|
* Plugin URI: https://www.netzgestaltung.at |
|
|
|
* Author: Thomas Fellinger |
|
|
|
* Author URI: https://www.netzgestaltung.at |
|
|
@@ -22,8 +22,8 @@ |
|
|
|
* You should have received a copy of the GNU General Public License |
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
|
|
*/ |
|
|
|
define('SOCOS_IO_STATS_PATH', plugin_dir_path(__FILE__)); |
|
|
|
define('SOCOS_IO_STATS_URL', plugin_dir_url(__FILE__)); |
|
|
|
define('SANDBOX_STATS_PATH', plugin_dir_path(__FILE__)); |
|
|
|
define('SANDBOX_STATS_URL', plugin_dir_url(__FILE__)); |
|
|
|
|
|
|
|
/** |
|
|
|
* Plugin setup hook |
|
|
@@ -64,15 +64,15 @@ function sandbox_setup_stats() { |
|
|
|
* License: GNU General Public License v2.0 |
|
|
|
*/ |
|
|
|
function sandbox_get_matomo_tracker(){ |
|
|
|
include_once(SOCOS_IO_STATS_PATH . '/config.php'); |
|
|
|
include_once(SOCOS_IO_STATS_PATH . '/MatomoTracker.php'); |
|
|
|
include_once(SANDBOX_STATS_PATH . '/config.php'); |
|
|
|
include_once(SANDBOX_STATS_PATH . '/MatomoTracker.php'); |
|
|
|
|
|
|
|
MatomoTracker::$URL = SOCOS_IO_STATS_TRACKER_URL; |
|
|
|
$matomoTracker = new MatomoTracker(SOCOS_IO_STATS_SITE_ID); |
|
|
|
MatomoTracker::$URL = SANDBOX_STATS_TRACKER_URL; |
|
|
|
$matomoTracker = new MatomoTracker(SANDBOX_STATS_SITE_ID); |
|
|
|
|
|
|
|
// Specify an API token with at least Write permission, so the Visitor IP address can be recorded |
|
|
|
// Learn more about token_auth: https://matomo.org/faq/general/faq_114/ |
|
|
|
$matomoTracker->setTokenAuth(SOCOS_IO_STATS_AUTH_TOKEN); |
|
|
|
$matomoTracker->setTokenAuth(SANDBOX_STATS_AUTH_TOKEN); |
|
|
|
|
|
|
|
// You can manually set the visitor details (resolution, time, plugins, etc.) |
|
|
|
// See all other ->set* functions available in the MatomoTracker.php file |
|
|
|