You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

angular-matomo-tag-manager

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-matomo-tag-manager

Simple integration of Matomo Tag Manager with Angular (>= 11).

1.0.2
latest
npmnpm
Version published
Maintainers
1
Created
Source

Matomo Tag Manager for Angular

Simple integration of Matomo Tag Manager with Angular (>= 11).

Getting started

Installing

Simple execute npm install angular-matomo-tag-manager or yarn add angular-matomo-tag-manager

Quick Start

Don't forget to configure first your container in Matomo.

// In module

import { MatomoTagManagerModule } from 'angular-matomo-tag-manager';


imports: [
  MatomoTagManagerModule.forRoot({
    containerId: CONTAINER_ID,
    host: MATOMO_HOST
  })
]

Then, you can use by injecting service in any controllers :

import { MatomoTagManagerService } from 'angular-matomo-tag-manager';

contructor(private service: MatomoTagManagerService) { }

Send tag via sendTag method :

this.service.sendTag({
  event: 'TrackView' // event field required
  page: {
    title: '...'
  }
})

A tag is a type of MatomoTag:

interface MatomoTag {
    event: string;
    [key: string]: any;
}

FAQs

Package last updated on 27 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts