Giter Club home page Giter Club logo

Comments (7)

tsteur avatar tsteur commented on June 3, 2024

@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.

tsteur avatar tsteur commented on June 3, 2024

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.

 avatar commented on June 3, 2024

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.

thd-fox avatar thd-fox commented on June 3, 2024

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.

tsteur avatar tsteur commented on June 3, 2024

@thd-fox do you know what exactly blocked it in mod_security?

from matomo-php-tracker.

thd-fox avatar thd-fox commented on June 3, 2024

@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.

tsteur avatar tsteur commented on June 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.