updated plugin Connect Matomo version 1.1.5
This commit is contained in:
2
wp-content/plugins/wp-piwik/libs/matomo-php-tracker/.gitattributes
vendored
Normal file
2
wp-content/plugins/wp-piwik/libs/matomo-php-tracker/.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
tests/ export-ignore
|
||||
run_tests.sh export-ignore
|
||||
5
wp-content/plugins/wp-piwik/libs/matomo-php-tracker/.gitignore
vendored
Normal file
5
wp-content/plugins/wp-piwik/libs/matomo-php-tracker/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
/.idea/
|
||||
/vendor/
|
||||
.phpunit.result.cache
|
||||
/tests/.phpunit.result.cache
|
||||
composer.lock
|
||||
@ -0,0 +1,30 @@
|
||||
# Matomo PHP Tracker Changelog
|
||||
|
||||
This is the Developer Changelog for Matomo PHP Tracker. All breaking changes or new features are listed below.
|
||||
|
||||
## Matomo PHP Tracker 3.3.2
|
||||
### Changed
|
||||
- Support for formFactors client hint parameter, supported as of Matomo 5.2.0
|
||||
|
||||
## Matomo PHP Tracker 3.3.1
|
||||
### Fixed
|
||||
- closed curl connection
|
||||
|
||||
## Matomo PHP Tracker 3.3.0
|
||||
### Removed
|
||||
- support for PHP versions lower than 7.2
|
||||
### Changed
|
||||
- all `MatomoTracker` class constants are now explicitly public
|
||||
- all `MatomoTracker` dynamic properties are now explicitly public
|
||||
|
||||
## Matomo PHP Tracker 3.0.0
|
||||
|
||||
Attention: This version of Matomo PHP Tracker is no longer compatible with Matomo 3.x or earlier
|
||||
|
||||
- Support for new page performance metrics (added in Matomo 4) has been added. You can use `setPerformanceTimings()` to set them for page views.
|
||||
- Setting page generation time using `setGenerationTime()` has been discontinued. The method still exists to not break applications still using it, but it does not have any effect. Please use new page performance metrics as replacement.
|
||||
- Sending requests using cURL will now throw an exception if an error occurs in a request.
|
||||
- Matomo does not longer support tracking of these browser plugins: Gears, Director. Therefor the signature of `setPlugins()` changed.
|
||||
- Implementation of ecommerce views changed from custom variables to raw parameters
|
||||
- It is now possible to configure cookie options for Secure, HTTPOnly and SameSite.
|
||||
- Add method setRequestMethodNonBulk() to allow (non bulk) POST requests.
|
||||
27
wp-content/plugins/wp-piwik/libs/matomo-php-tracker/LICENSE
Normal file
27
wp-content/plugins/wp-piwik/libs/matomo-php-tracker/LICENSE
Normal file
@ -0,0 +1,27 @@
|
||||
Copyright (c) 2014, Matomo Open Source Analytics
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the {organization} nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace WP_Piwik {
|
||||
/**
|
||||
* Matomo - free/libre analytics platform
|
||||
*
|
||||
* For more information, see README.md
|
||||
*
|
||||
* @license released under BSD License http://www.opensource.org/licenses/bsd-license.php
|
||||
* @link https://matomo.org/docs/tracking-api/
|
||||
*
|
||||
* @category Matomo
|
||||
* @package MatomoTracker
|
||||
*/
|
||||
if (!\class_exists('\\WP_Piwik\\MatomoTracker')) {
|
||||
include_once 'MatomoTracker.php';
|
||||
}
|
||||
/**
|
||||
* Helper function to quickly generate the URL to track a page view.
|
||||
*
|
||||
* @deprecated
|
||||
* @param $idSite
|
||||
* @param string $documentTitle
|
||||
* @return string
|
||||
*/
|
||||
function Piwik_getUrlTrackPageView($idSite, $documentTitle = '')
|
||||
{
|
||||
return \WP_Piwik\Matomo_getUrlTrackPageView($idSite, $documentTitle);
|
||||
}
|
||||
/**
|
||||
* Helper function to quickly generate the URL to track a goal.
|
||||
*
|
||||
* @deprecated
|
||||
* @param $idSite
|
||||
* @param $idGoal
|
||||
* @param float $revenue
|
||||
* @return string
|
||||
*/
|
||||
function Piwik_getUrlTrackGoal($idSite, $idGoal, $revenue = 0.0)
|
||||
{
|
||||
return \WP_Piwik\Matomo_getUrlTrackGoal($idSite, $idGoal, $revenue);
|
||||
}
|
||||
/**
|
||||
* For BC only
|
||||
*
|
||||
* @deprecated use MatomoTracker instead
|
||||
*/
|
||||
class PiwikTracker extends MatomoTracker
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
# PHP Client for Matomo Analytics Tracking API
|
||||
|
||||
The PHP Tracker Client provides all features of the [Matomo Javascript Tracker](https://developer.matomo.org/api-reference/tracking-javascript), such as Ecommerce Tracking, Custom Variables, Event Tracking and more.
|
||||
|
||||
## Documentation and examples
|
||||
Check out our [Matomo-PHP-Tracker developer documentation](https://developer.matomo.org/api-reference/PHP-Piwik-Tracker) and [Matomo Tracking API guide](https://matomo.org/docs/tracking-api/).
|
||||
|
||||
|
||||
```php
|
||||
// Required variables
|
||||
$matomoSiteId = 6; // Site ID
|
||||
$matomoUrl = "https://example.tld"; // Your matomo URL
|
||||
$matomoToken = ""; // Your authentication token
|
||||
|
||||
// Optional variable
|
||||
$matomoPageTitle = ""; // The title of the page
|
||||
|
||||
// Load object
|
||||
require_once("MatomoTracker.php");
|
||||
|
||||
// Matomo object
|
||||
$matomoTracker = new MatomoTracker((int)$matomoSiteId, $matomoUrl);
|
||||
|
||||
// Set authentication token
|
||||
$matomoTracker->setTokenAuth($matomoToken);
|
||||
|
||||
// Track page view
|
||||
$matomoTracker->doTrackPageView($matomoPageTitle);
|
||||
```
|
||||
|
||||
## Requirements:
|
||||
* JSON extension (json_decode, json_encode)
|
||||
* cURL or stream extension (to issue the HTTPS request to Matomo)
|
||||
|
||||
## Installation
|
||||
|
||||
### Composer
|
||||
|
||||
```
|
||||
composer require matomo/matomo-php-tracker
|
||||
```
|
||||
|
||||
### Manually
|
||||
|
||||
Alternatively, you can download the files and require the Matomo tracker manually:
|
||||
|
||||
```
|
||||
require_once("MatomoTracker.php");
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Released under the [BSD License](https://opensource.org/licenses/BSD-3-Clause)
|
||||
@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "matomo\/matomo-php-tracker",
|
||||
"description": "PHP Client for Matomo Analytics Tracking API",
|
||||
"keywords": [
|
||||
"matomo",
|
||||
"piwik",
|
||||
"tracker",
|
||||
"analytics"
|
||||
],
|
||||
"homepage": "https:\/\/matomo.org",
|
||||
"license": "BSD-3-Clause",
|
||||
"authors": [
|
||||
{
|
||||
"name": "The Matomo Team",
|
||||
"email": "hello@matomo.org",
|
||||
"homepage": "https:\/\/matomo.org\/team\/"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"forum": "https:\/\/forum.matomo.org\/",
|
||||
"issues": "https:\/\/github.com\/matomo-org\/matomo-php-tracker\/issues",
|
||||
"source": "https:\/\/github.com\/matomo-org\/matomo-php-tracker"
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2 || ^8.0",
|
||||
"ext-json": "*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-curl": "Using this extension to issue the HTTPS request to Matomo"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"."
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"\\": "tests\/"
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit\/phpunit": "^8.5 || ^9.3 || ^10.1"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="true"
|
||||
verbose="true">
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="UnitTests">
|
||||
<directory>./tests/Unit</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
Reference in New Issue
Block a user