@ima/plugin-analytic-fb-pixel
Version:
Seznam IMA.js analytic plugin for Facebook Pixel
67 lines • 1.99 kB
TypeScript
import type { Dependencies } from '@ima/core';
import { AbstractAnalytic } from '@ima/plugin-analytic';
export type AnalyticFBPixelSettings = {
id: string | null;
};
/**
* Facebook Pixel Helper.
*
* @class
*/
export declare class FacebookPixelAnalytic extends AbstractAnalytic {
#private;
static get $dependencies(): Dependencies;
/**
* Creates a Facebook Pixel Helper instance.
*/
constructor(config: AnalyticFBPixelSettings, ...rest: ConstructorParameters<typeof AbstractAnalytic>);
_applyPurposeConsents(): void;
/**
* Gets the identifier for Facebook Pixel.
*
* @returns The identifier for Facebook Pixel.
*/
getId(): string;
/**
* Hits an event.
*
* @override
* @param eventName Name of the event.
* @param eventData Data attached to the event.
* @returns TRUE when event has been hit; otherwise FALSE.
*/
hit(eventName: string, eventData?: Record<string, any> | null): boolean;
/**
* Hits a page view event (optionally with page view data).
*
* @override
* @param Page view data (containing path etc.).
* @returns TRUE when event has been hit; otherwise FALSE.
*/
hitPageView(viewContentData?: Record<string, any> | null): boolean;
/**
* Hits a search event (optionally with page name or other event data).
*
* @param Search query / event data.
* @param queryOrData
* @returns TRUE when event has been hit; otherwise FALSE.
*/
hitSearch(queryOrData?: Record<string, any> | string | null): boolean;
/**
* @override
* @inheritdoc
*/
_configuration(): void;
/**
* @override
* @inheritdoc
*/
_createGlobalDefinition(window: globalThis.Window): void;
/**
* Processes an error.
*
* @param error An error to be processed.
*/
_processError(error: Error | TypeError | string): void;
}
//# sourceMappingURL=FacebookPixelAnalytic.d.ts.map