ngx-matomo-client
Version:
Matomo (fka. Piwik) client for Angular applications
34 lines (33 loc) • 1.45 kB
TypeScript
import { MatomoInstance, MatomoTracker } from 'ngx-matomo-client/core';
import * as i0 from "@angular/core";
/**
* No-op implementation of {@link MatomoTracker}
*
* All commands are memoized and can later be retrieved using
* {@link getAllCommands getAllCommands()} or {@link getCommand getCommand(index)}.
*
* All <i>getter</i> methods will immediately resolve to an <i>empty value</i>.
* This can be customized by setting a custom Matomo instance with {@link setMatomoInstance setMatomoInstance()}.
*/
export declare class MatomoTestingTracker extends MatomoTracker {
#private;
/** Retrieve the current Matomo instance */
getMatomoInstance(): MatomoInstance;
/**
* Set the current matomo instance
*
* @deprecated will be removed in a future version and injected from DI token `MATOMO_TESTING_INSTANCE` instead
* @see MATOMO_TESTING_INSTANCE
*/
setMatomoInstance(instance: MatomoInstance): void;
/** Retrieve all memoized commands */
getAllCommands(): unknown[][];
/** Retrieve nth memoized command */
getCommand(index: number): unknown[] | undefined;
/** Clear all memoized commands */
reset(): void;
protected push(command: unknown[]): void;
protected pushFn<T>(fn: (matomo: MatomoInstance) => T): Promise<T>;
static ɵfac: i0.ɵɵFactoryDeclaration<MatomoTestingTracker, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<MatomoTestingTracker>;
}