Track key events in websites and web apps with the Formo Web SDK. Learn more about how to set up and configure the Formo Web SDK to measure what matters onchain.
The Formo Web SDK is open source and implements the standard Events API.
Install the JavaScript SDK via CDN or NPM.
Check out working examples of Formo on Github:
A working example of Formo in a Next.js app.
A working example of Formo in a React app.
The Web SDK automatically captures common events such as page views and wallet events (connect, disconnect, signature, transaction, etc) with full attribution (referrer, UTM, referrals.)
You do not need to configure anything to track these events.
Call identify()
after a user connects their wallet or signs in on your website or app:
If no parameters are specified, the Formo SDK will attempt to auto-identify the wallet address.
Track user actions by calling the SDK track()
function:
The SDK skips tracking in localhost by default. To enable tracking locally during development, set trackLocalhost
to true
:
Control the level of logs the SDK prints to the console with the following logLevel settings:
To support high-performance environments, the SDK sends events in batches.
Customize this behavior with the flushAt
and flushInterval
configuration parameters.
Log Level | Description |
---|---|
trace | Shows the most detailed diagnostic information, useful for tracing program execution flow. |
debug | Shows all messages, including function context information for each public method the SDK invokes. |
info | Shows informative messages about normal application operation. |
warn | Default. Shows error and warning messages. |
error | Shows error messages only. |
Track key events in websites and web apps with the Formo Web SDK. Learn more about how to set up and configure the Formo Web SDK to measure what matters onchain.
The Formo Web SDK is open source and implements the standard Events API.
Install the JavaScript SDK via CDN or NPM.
Check out working examples of Formo on Github:
A working example of Formo in a Next.js app.
A working example of Formo in a React app.
The Web SDK automatically captures common events such as page views and wallet events (connect, disconnect, signature, transaction, etc) with full attribution (referrer, UTM, referrals.)
You do not need to configure anything to track these events.
Call identify()
after a user connects their wallet or signs in on your website or app:
If no parameters are specified, the Formo SDK will attempt to auto-identify the wallet address.
Track user actions by calling the SDK track()
function:
The SDK skips tracking in localhost by default. To enable tracking locally during development, set trackLocalhost
to true
:
Control the level of logs the SDK prints to the console with the following logLevel settings:
To support high-performance environments, the SDK sends events in batches.
Customize this behavior with the flushAt
and flushInterval
configuration parameters.
Log Level | Description |
---|---|
trace | Shows the most detailed diagnostic information, useful for tracing program execution flow. |
debug | Shows all messages, including function context information for each public method the SDK invokes. |
info | Shows informative messages about normal application operation. |
warn | Default. Shows error and warning messages. |
error | Shows error messages only. |