UNPKG

posthog-js

Version:

Posthog-js allows you to automatically capture usage and send events to PostHog.

24 lines (23 loc) • 1.02 kB
type IsCapturedDomId = (id: string) => boolean; type MaskJsonLdUrl = (url: string) => string | undefined; export declare const JSON_LD_EVENT_TAG = "$json_ld"; export declare function sanitizeJsonLd(text: string, isCapturedDomId?: IsCapturedDomId, maskUrl?: MaskJsonLdUrl): [unknown, string] | null; type JsonLdPrivacyOptions = { maskUrl?: MaskJsonLdUrl; attributeFilter?: string[]; blockClass?: string | RegExp; blockSelector?: string | null; isRecordedElement?: (element: Element) => boolean; maskAllElementAttributes?: boolean; maskAttributeFn?: ((name: string, value: string, element: Element) => string) | null; maskTextClass?: string | RegExp; maskTextSelector?: string | null; }; export declare function startJsonLdCapture(doc: Document, MutationObserverClass: typeof MutationObserver, options: JsonLdPrivacyOptions & { emit: (jsonLd: unknown) => boolean; getCaptureState?: () => boolean | null; }): { scan: (force?: boolean) => void; stop: () => void; }; export {};