bitandblack-matomo-tracking
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Codacy Badge npm version

Matomo Tracking

Allows to include the Matomo Tracking by JS.

Installation

This library is made for the use with Node. Add it to your project by running $ npm install bitandblack-matomo-tracking or $ yarn add bitandblack-matomo-tracking.

Usage

Import the library and initialize like that:

import { MatomoTracking } from "bitandblack-matomo-tracking";

const matomoTracking = new MatomoTracking(
    99, 
    "https://www.yoursite.com/matomo",
    {
        trackPageView: true,
        enableLinkTracking: true
    }
);

The parameters are:

  1. The page id. This one is required.
  2. The URL of your Matomo instance. This one is also required.
  3. Tracking options. These are optional.

Note: You don't need to add piwik.php or matomo.php in the url.

Help

If you have any questions feel free to contact us under hello@bitandblack.com.

Readme

Keywords

Package Sidebar

Install

npm i bitandblack-matomo-tracking

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

10.8 kB

Total Files

15

Last publish

Collaborators

  • tobiaskoengeter