Today we are excited to announce a new feature for supastarter: Analytics.
supastarter now comes with a built-in analytics integration for your SaaS and it includes the following providers out of the box:
Integrate analytics into your supastarter app
supastarter comes with a generic analytics module that enables you to integrate analytics provdiders and track custom events.
Setup analytics
In the apps/web/modules/analytics/index.ts
file, export the provider file of the provider you want to use:
We have setup guides for each provider in the supastarter documentation.
Include analytics script
To include the analytics script, add the following code to your apps/web/app/[locale]/layout.tsx
file:
Now your app will include the analytics script and track page views.
Track custom events
To track custom events, import the useAnalytics
hook and use the trackEvent
function:
Read the complete extensive guide on how to integrate analytics into your app in the supastarter documentation.
The ultimate starter kit to build a scalable and production-ready SaaS
Save endless hours of development time and focus on what's important for your customers with our SaaS starter kits for Next.js 14 and Nuxt 3
Get startedStay up to date
Sign up for our newsletter and we will keep you updated on everything going on with supastarter.