Install
Installing Formo is easy and quick. This guide will show you how to do it with our SDKs. Get realtime analytics and attribution for onchain apps in less time.
Instructions
Pick your stack and add the code below to your codebase.
1. Install the Formo SDK
Install this script in the <head>
tag of your website:
Replace <YOUR_WRITE_KEY>
with the SDK Write key found in your project settings.
2. Identify users (Optional)
Call identify
to tie a user to their actions.
As a best practice, make sure identify
is called at the start of every session or page load, if possible.
3. Track events (Optional)
Use the track
function to track custom user actions specific to your app.
1. Install the Formo SDK
Install this script in the <head>
tag of your website:
Replace <YOUR_WRITE_KEY>
with the SDK Write key found in your project settings.
2. Identify users (Optional)
Call identify
to tie a user to their actions.
As a best practice, make sure identify
is called at the start of every session or page load, if possible.
3. Track events (Optional)
Use the track
function to track custom user actions specific to your app.
1. Install the Formo SDK
2. Use FormoAnalyticsProvider
in your app
Wrap your React app in the provider provided by the SDK.
Replace <YOUR_WRITE_KEY>
with the SDK Write key found in your project settings.
3. Identify users (Optional)
Call identify
to tie a user to their actions.
As a best practice, make sure identify
is called at the start of every session or page load, if possible.
4. Track events (Optional)
Formo autocaptures events like page views, wallet connects, signatures, and transactions for you.
Use the track
function to track custom user actions specific to your app.
1. Install the Formo SDK
2. Use FormoAnalyticsProvider
in your app
Create a new AnalyticsProvider.tsx
client component.
Wrap your Next.js app in your main layout file with the newly created AnalyticsProvider
component:
Replace <YOUR_WRITE_KEY>
with the SDK Write key found in your project settings.
3. Identify users (Optional)
Call identify
to tie a user to their actions.
As a best practice, make sure identify
is called at the start of every session or page load, if possible.
4. Track events (Optional)
Formo autocaptures events like page views, wallet connects, signatures, and transactions for you.
Use the track
function to track custom user actions specific to your app.
Verification
To verify that the SDK is installed correctly, navigate to your site and open the network tab of the developer tools in your browser.
Wait and look for a ‘raw_events’ request to Formo in the network console. Check that the request returns a 202 response status. If so, you’re done!
Enable logs on localhost to help with debugging or reach out to support.