@lukulent/svelte-umami
Version:
[](https://madewithsvelte.com/p/svelte-umami/shield-link)
30 lines (29 loc) • 1.38 kB
TypeScript
import { SvelteComponent } from "svelte";
import type { UmamiTrackerConfiguration } from '../types';
declare const __propDef: {
props: {
/** The unique ID of the website */ websiteID: string;
/** The URL of the Umami Analytics script */ srcURL: string;
/** Configuration options for the Umami Analytics script */ configuration?: UmamiTrackerConfiguration;
/** Overwrite the existing script if it is already initialized, Otherwise it could lead to multiple pages views */ overwrite?: boolean;
};
events: {
[evt: string]: CustomEvent<any>;
};
slots: {};
exports?: {} | undefined;
bindings?: string | undefined;
};
export type UmamiAnalyticsProps = typeof __propDef.props;
export type UmamiAnalyticsEvents = typeof __propDef.events;
export type UmamiAnalyticsSlots = typeof __propDef.slots;
/**
* Add this component to your SvelteKit app to track user interactions with Umami Analytics.
*
* - The easiest way to use this component is to add it to the root +layout.svelte of your app.
* - It will automatically add the Umami Analytics script to the head of your app.
* - You will find the websiteID and srcURL in your Umami instance https://umami.is/docs/collect-data.
*/
export default class UmamiAnalytics extends SvelteComponent<UmamiAnalyticsProps, UmamiAnalyticsEvents, UmamiAnalyticsSlots> {
}
export {};