Comments (7)
@sgiehl I suppose not much changed? Basically people can install it same way, or using composer install? And they use MatomoTracker now which is probably the biggest change?
from matomo-php-tracker.
An authentication error should actually not happen I would say. Doubt we changed anything there?
@thd-fox was the token auth maybe reset in the Matomo UI?
from matomo-php-tracker.
I agree, there are no code samples for someone new to copy/paste and get things moving quickly.
Here is something that could be posted on the main readme:
// 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);
from matomo-php-tracker.
Thank you @tsteur and @robo2bobo I figured out that with your new version of the tracking library all requests are blocked by apache mod_security. I changed my server configuration and now it's working fine.
I suppose your new version will work as expected then. I can't verify it by now. I will soon update and report back to you :)
@robo2bobo's code sample would be very helpful! With this I can confirm I'm using the library correctly :)
from matomo-php-tracker.
@thd-fox do you know what exactly blocked it in mod_security?
from matomo-php-tracker.
@tsteur I suppose it could be related to your different call method. The old version, which I use right now did not conflict with mod_security. There were standard filters activated, which let all old requests through. The new ones were completely blocked. I couldn't figure out the reason. I simply disabled mod_security.
from matomo-php-tracker.
Cheers @robo2bobo
Took your example and added it to the readme, also added basic install instructions. Feel free to suggest more or edit readme directly and create a PR 👍
from matomo-php-tracker.
Related Issues (20)
- Get current visitors channel and campaign params HOT 1
- More virtualization of MatomoTracker class HOT 6
- Uncaught RuntimeException when Matomo host DNS couldn't resolve HOT 5
- Goals attribution only show 'direct' attribution HOT 4
- PHP Deprecation warning when running tracker on PHP 8.1
- PHP 8.2: Creation of dynamic property NNN is deprecated HOT 3
- Generate a download in Behavior > Downloads HOT 2
- Drop support of older php versions? HOT 4
- new release HOT 1
- How to connect this with Matomo for Wordpress?
- Minor edit to documentation HOT 1
- Owner of this project? HOT 1
- How can I used this with cloudflare? HOT 3
- How to know if site ID or auth token are incorrect HOT 1
- Curl Connection remaining open.
- Creation of dynamic property MatomoTracker::$currentTs is deprecated HOT 5
- Strict types for arguments and return types
- Speedup Curl-Request with various Parameters
- Licence Mismatch HOT 4
- No tracking since 1st of October HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matomo-php-tracker.