import * as Plausible from 'plausible-tracker'; import Plausible__default, { PlausibleOptions } from 'plausible-tracker'; import { App } from 'vue'; type IPlausible = typeof Plausible__default; type ReturnUsePlasuible = Omit, 'enableAutoPageviews' | 'enableAutoOutboundTracking'>; interface OptionPlugin { /** * Plausible options * @type PlausibleOptions */ init: PlausibleOptions; /** * Plausible Settings * @type InstallOptions */ settings: InstallOptions; /** Partytown support * @default false * @type boolean * @link https://partytown.builder.io/how-does-partytown-work */ partytown?: boolean; } interface InstallOptions { /** * Enables automatic page view tracking for SPAs * @default false * @see https://github.com/plausible/plausible-tracker * @type boolean */ enableAutoPageviews?: boolean; /** * Outbound link click tracking * @default false * @see https://plausible.io/docs/outbound-link-click-tracking * @type boolean * */ enableAutoOutboundTracking?: boolean; } declare const createPlausible: (options: OptionPlugin) => { install(app: App): void; }; declare const usePlausible: () => { trackEvent: (eventName: string, options?: Plausible.EventOptions | undefined, eventData?: PlausibleOptions | undefined) => void; trackPageview: (eventData?: PlausibleOptions | undefined, options?: Plausible.EventOptions | undefined) => void; }; declare module '@vue/runtime-core' { interface ComponentCustomProperties { $plausible: ReturnType; } } export { IPlausible, InstallOptions, OptionPlugin, ReturnUsePlasuible, createPlausible, usePlausible };