Skip to Content
Reference<PlausibleAnalytics>

<PlausibleAnalytics> initializes the Plausible tracker. It uses the same configuration as the official Plausible.

<PlausibleAnalytics domain="yourapp.com" />

Properties

You can find all supported properties on the Plausible NPM package reference page .

PropertyValueDescription
domainstring

Your site’s domain as declared in Plausible settings.

endpointstring

Custom API endpoint. Defaults to https://plausible.io/api/event.

autoCapturePageviewsboolean

Automatically capture pageviews. Defaults to true.

hashBasedRoutingboolean

Enables hash-based routing support. Defaults to false.

outboundLinksboolean

Tracks outbound link clicks. Defaults to false.

fileDownloadsboolean | { fileExtensions: string[] }

Tracks file downloads. Provide custom file extensions to override defaults.

formSubmissionsboolean

Tracks form submissions. Defaults to false.

captureOnLocalhostboolean

Enables tracking on localhost. Defaults to false.

loggingboolean

Logs ignored events. Defaults to true.

customPropertiesRecord<string, string> | ((eventName: string) => Record<string, string>)

Custom properties to include with all events.

transformRequest(payload: PlausibleRequestPayload) => PlausibleRequestPayload | null

Transform or filter the request payload before sending it.

bindToWindowboolean

Whether to bind window.plausible. This component always forces it to false.