Logs & Analytics
Sitepins implements a comprehensive logging and analytics system to track application usage, audit changes, and monitor performance.
Project Logs
Project logs track every significant change made to a repository within Sitepins. This includes:
- File creations, updates, and deletions.
- Schema modifications.
- Project setting changes.
State Management
Logs are managed via the projectLogApi and stored in the backend database.
// Example of adding a log
const [addLog] = useAddProjectLogMutation();
addLog({
project_id: "...",
action: EAction.UPDATE,
file: "content/blog/post.md",
user_id: "..."
});User Logs
User logs track account-level events such as:
- Logins and authentication attempts.
- Subscription changes (upgrades/downgrades).
- Organization membership updates.
Analytics Integrations
Sitepins uses two primary analytics platforms:
-
PostHog:
- Used for event tracking and session recordings.
- Configured via
NEXT_PUBLIC_POSTHOG_KEY. - Used to analyze feature adoption and user retention.
-
Mixpanel:
- Primarily used for tracking the conversion funnel and subscription lifecycle.
- Configured via
NEXT_PUBLIC_MIXPANEL_TOKEN.
Usage Limits
The application tracks project-level usage (e.g., number of files, media storage used) to enforce subscription tier limits. This is managed via the UsageLimits component and the packageApi.
Last updated on