Skip to content

Latest commit

 

History

History
41 lines (22 loc) · 753 Bytes

trackEvent.md

File metadata and controls

41 lines (22 loc) · 753 Bytes

@mbinjamil/matomo-client / trackEvent

Function: trackEvent()

trackEvent(category, action, name, value): void

Logs an event of interest

Parameters

category: string

An event category (Videos, Music, Games...)

action: string

An event action (Play, Pause, Duration, Add Playlist, Downloaded, Clicked...)

name: string

An optional event name

value: number

An optional numeric value

Returns

void

Example

import { trackEvent } from "@mbinjamil/matomo-client";

trackEvent("ecommerce", "checkout", "total_amount", 1010);

Source

index.ts:76