Share your code.
This package has been deprecated
WARNING: Because of the recent renaming from Piwik to Matomo this package is now called matomo-tracker. Please update your dependencies and code accordingly.
A wrapper for the Piwik Tracking HTTP API
piwik-tracker as a dependency:
npm install --save piwik-tracker
Then, use it in your project:
var PiwikTracker = ;// Initialize with your site ID and Piwik URLvar piwik = 1 '';// Optional: Respond to tracking errorspiwik// Track a request URL:// Either as a simple string …piwik;// … or provide further options:piwik;
That's it. For a complete list of options, see Piwik's Tracking HTTP API Reference.