Giter Club home page Giter Club logo

Comments (2)

nonsenz avatar nonsenz commented on June 13, 2024

After some more testing I'm not sure how to handle this because curl behaves not the way I want it to. On some systems CURLOPT_NOSIGNAL => 1 is needed to get the _MS stuff to work. More info about the can be found here. To have really short timeouts, the CURLOPT_TIMEOUT should be changed to CURLOPT_CONNECTTIMEOUT, because we still want to get the request send to piwik. I still have problems with timeouts < 100ms and I don't understand why.
ATM I think it's better to track actions in the frontend only. I could write data from the backend in the DOM and process it with some js-code in the frontend.
After all I would like to hear how you handle this in your projects.

from matomo-php-tracker.

mattab avatar mattab commented on June 13, 2024

@nonsenz you can customise the requestTimeout attribute and set it to 1 second. If that's not good enough, then don't use the doTrack* methods (which will use CURL or Fopen streams), and instead fetch the URL with calling getUrl* method and call yourself using your favorite flavor).

There's also the possibility to bulk requests using enableBulkTracking() which can sometimes be useful

Enables the bulk request feature. When used, each tracking action is stored until the doBulkTrack method is called. This method will send all tracking data at once.

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.