Skip to content

For the complete documentation index, see llms.txt.

Starport analytics

A Starport site measures reader activity through the analytics tools you already run. The template gives you an event hook to connect those tools, and Promptless configures search-query analytics for you on request. For the full capability list, see What’s included in Starport.

A Starport site emits a browser custom event named starport:analytics for search and Ask AI assistant interactions. Those interactions include a search query, a result click, and an assistant question. You attach a listener that forwards each event to the analytics tool of your choice. Each event’s detail carries the interaction, for example the action name and the page path. The hook keeps your analytics provider a setting you own, so you swap providers by changing the listener.

// Illustrative: your provider's browser SDK is loaded as `myAnalytics`.
window.addEventListener('starport:analytics', (event) => {
// event.detail carries the payload for the tracked action.
myAnalytics.track(event.detail);
});

Connecting a third-party analytics provider is the concrete path for getting your data into a tool you already use. Load your provider’s browser SDK on your Starport site, then forward the starport:analytics event to it with a listener like the one above. From then on, your provider records the traffic and you read it in that provider’s own dashboards. For how documentation impact rolls up across Promptless, see Reporting and ROI.

Search-query analytics through managed setup

Section titled “Search-query analytics through managed setup”

Your Starport site currently reports page views and search queries to PostHog. During onboarding, Promptless sets and manages a public PostHog key, PUBLIC_POSTHOG_KEY, derived from your setup form. It is not a self-service setting you change afterward. Your Starport site then emits its own documentation analytics events to PostHog, and you read that traffic in PostHog.

Separately, you can connect PostHog read-only on the integrations page. Promptless then reads those page views and search queries back to find the pages that need work. See Connections for that connection, and Data handling and classification for what Promptless processes and retains.