Rybbit Integration
Rybbit is a feature-rich, open-source analytics tool. In addition to basic analytics, it also supports session replay, which can be very helpful for understanding user behavior.
If you enable session replay, make sure your server has enough storage.
Good to know
- NEXTY.DEV disables tracking scripts in development to avoid polluting analytics data.
- To verify locally, open
app/[locale]/layout.tsxand remove theprocess.env.NODE_ENV === "development"check.- If you don’t need local verification, just set the production environment variables and the scripts will be enabled automatically.
Step 1: Create a website in Rybbit and get the parameters
- Sign in to the Rybbit dashboard
- Create a website (Website / Project)
- Copy
srcanddata-site-id
Step 2: Set environment variables
Fill in src and data-site-id:
.env
NEXT_PUBLIC_RYBBIT_SRC=
NEXT_PUBLIC_RYBBIT_SITE_ID=If you want to enable session replay, add:
.env
NEXT_PUBLIC_RYBBIT_SESSION_REPLAY="true"When session replay is enabled, you should mask sensitive information (at minimum email, username, etc.). Add the mask selectors:
.env
NEXT_PUBLIC_RYBBIT_REPLAY_MASK_SELECTORS='[".user-name", "#email"]'