Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
StylesPath = styles
Vocab = Formo
MinAlertLevel = suggestion

[*.{md,mdx}]
BasedOnStyles = Vale

TokenIgnores = \b(Wagmi|Solana|Onchain|Autocapture|Autocaptured|Serverless|formo)\b
4 changes: 2 additions & 2 deletions data/concepts.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 'Core concepts'
icon: lightbulb
description: 'Understand the three core Formo data concepts: events that capture user actions, users identified by wallet address, and properties that add context.'

Check warning on line 4 in data/concepts.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

data/concepts.mdx#L4

Use 'formo' instead of 'Formo'.
---

### Overview
Expand All @@ -18,15 +18,15 @@

[Events](/data/events/overview) can be a wide range of interactions. For example, every time a user connects a wallet or performs a transaction on your app, there are details which describe that action the moment it happens.

Actions like visiting a page, connecting a wallet, and depositing on a DeFi protocol can all be tracked as an event in Formo.

Check warning on line 21 in data/concepts.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

data/concepts.mdx#L21

Use 'formo' instead of 'Formo'.

The Formo SDK automatically captures and tracks page and wallet events. You can also track [custom events](/features/product-analytics/custom-events) and [contract events](/features/product-analytics/contract-events).

Check warning on line 23 in data/concepts.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

data/concepts.mdx#L23

Use 'formo' instead of 'Formo'.

### 2. Users

A user is **the specific individual who completed an interaction with your product.**

Each user has a unique identifier that you can use to track their activity. Formo distinguishes between anonymous users and wallets:

Check warning on line 29 in data/concepts.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

data/concepts.mdx#L29

Use 'formo' instead of 'Formo'.

- Anonymous users aren't tied to any wallets. All users start as anonymous users until they connect a wallet.
- Wallets are tied to a unique Ethereum or Solana address. When the user connects to these identities, their wallets are identified and tracked.
Expand All @@ -36,12 +36,12 @@
### 3. Properties

Properties are **additional information about users and events.**
- Event properties are attributes that describe details specific to the particular instance of an event. For example, if you had a Purchase Completed event, you could specify what the user purchased, the total value of the order, and the payment method used.
- Event properties are attributes that describe details specific to the particular instance of an event. For example, if you had a Swap Completed event, you could specify the token pair, input amount, output amount, volume, and protocol fee.
- User properties are traits describing the user and apply across all their future events until the properties are modified. Formo's SDK captures several user properties by default, and you can also set up your own properties to track.

Properties examples:
- A Connect Wallet event has wallet address and chain ID (Ethereum, Base, etc.)
- A Page View event has page URL, referrer URL, and other metadata.
- A User has net worth and first-touch UTM parameter properties.

When you track custom events, you can also set properties to describe the event. For example, if you had a Purchase Completed event, you could specify what the user purchased, the total value of the order, and the payment method used.
When you track custom events, you can also set properties to describe the event. For example, if you had a Swap Completed event, you could specify the token pair, input amount, output amount, volume, and protocol fee.
48 changes: 33 additions & 15 deletions data/events/track.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
Record any [custom events](/features/product-analytics/custom-events) in your app,
along with properties that describe the action.

Custom events can capture a broad range of actions, such as clicking a button or completing a purchase.
Custom events can capture a broad range of actions, such as starting a swap or completing a deposit.

Additional information about the event can be included in the properties field. For example, for a `Purchase Completed` event, you may want to include the product ids of the purchased products.
Additional information about the event can be included in the properties field. For example, for a `Swap Completed` event, you may want to include the token pair, input amount, and output amount.

## Naming events

When naming events, Formo recommends establishing a consistent naming convention that uses:

Check warning on line 15 in data/events/track.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

data/events/track.mdx#L15

Use 'formo' instead of 'Formo'.

- Consistent formatting: Event names are case sensitive.
- A consistent syntax: Adopt nouns and past tense verbs like `Swap Reviewed` and `Order Submitted`. A standard of `[Noun] + [Past-Tense Verb]` ensures all your events are consistent.
- A consistent actor: Does `Message Sent` mean that the user sent a message or that you sent a message to the user? If all your events are named in a way that reflects the user's perspective, the meaning is clear immediately.
- A consistent syntax: Adopt nouns and past tense verbs like `Swap Completed` and `Deposit Submitted`. A standard of `[Noun] + [Past-Tense Verb]` ensures all your events are consistent.
- A consistent actor: Does `Transaction Submitted` mean that the user submitted a transaction or that your app submitted it on their behalf? If all your events are named in a way that reflects the user's perspective, the meaning is clear immediately.

This allows everyone including you 6 months from now to instantly understand the meaning of an event.

Expand All @@ -29,14 +29,16 @@
```json
{
"type": "track",
"event": "Swap Reviewed",
"event": "Swap Completed",
"properties": {
"rating": 5
"pair": "ETH/USDC",
"token_in": "ETH",
"token_out": "USDC"
}
}
```

Formo has reserved some standard properties listed in the following table and handles them in a special manner.

Check warning on line 41 in data/events/track.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

data/events/track.mdx#L41

Use 'formo' instead of 'Formo'.

### Tracking volume, revenue, points

Expand All @@ -49,27 +51,43 @@
|:---------|:-----|:------------|
| `volume` | Number | The volume amount as a result of an event. For e.g., a token swap worth $20.00 would result in a volume of 20.00. Can be positive or negative e.g. send -100 to track outflows. |
| `revenue` | Number | The revenue amount as a result of an event. For e.g., a transaction with a protocol fee of $5.00 would result in a revenue of 5.00. Must be a non-negative number.|
| `currency` | String | The currency of the revenue as a result of the event, set in ISO 4217 format. If this is not set, Formo assumes the revenue is in USD. |

Check warning on line 54 in data/events/track.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

data/events/track.mdx#L54

Use 'formo' instead of 'Formo'.
| `points` | Number | An abstract value such as points or XP associated with an event, to be used by various teams. |

<Frame caption="Revenue tracking.">
<img src="/images/revenue.png" alt="Revenue tracking." />
</Frame>

For example, call `.track()` with the reserved properties alongside any other event properties:

```typescript
analytics.track('Swap Completed', {
pair: 'ETH/USDC',
token_in: 'ETH',
token_out: 'USDC',
amount_in: 1.5,
amount_out: 4500,
volume: 4500,
revenue: 13.5,
points: 50
});
```

## Sample Payload

```json
{
"type": "track",
"event": "Product Reviewed",
"event": "Swap Completed",
"properties": {
"volume": -100.5,
"revenue": 20.5,
"currency": "USD",
"points": 100,
"product_id" : "9578257311",
"rating" : 3.0,
"review_body" : "Good value for the price."
"pair": "ETH/USDC",
"token_in": "ETH",
"token_out": "USDC",
"amount_in": 1.5,
"amount_out": 4500,
"volume": 4500,
"revenue": 13.5,
"points": 50
}
}
```
```
6 changes: 3 additions & 3 deletions data/metrics.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 'Metrics'
description: 'Complete reference of all Formo metrics including visitors, wallets connected, transactions, revenue, retention rates, and acquisition channel breakdowns.'

Check warning on line 3 in data/metrics.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

data/metrics.mdx#L3

Use 'formo' instead of 'Formo'.
icon: chart-simple
iconType: solid
---
Expand Down Expand Up @@ -35,8 +35,8 @@

### Sessions

A session (also known as a visit) is a set of actions that a user takes on your site.
A session (also known as a visit) is a set of actions that a user takes on your site.
Formo counts unique session IDs. With the web SDK, each visitor's session is counted once per day, so one visitor can have multiple sessions across days.

Check warning on line 39 in data/metrics.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

data/metrics.mdx#L39

Use 'formo' instead of 'Formo'.

### Session Duration

Expand Down Expand Up @@ -64,7 +64,7 @@
### Bounce Rate

The bounce rate is the percentage of sessions that bounce, measured over sessions (not unique visitors).
Formo counts a "bounce" when a session has a single pageview, no engagement events, and less than 10 seconds of observed activity. Engagement events are wallet connects, transactions, tracked custom events, and smart contract events (decoded logs).

Check warning on line 67 in data/metrics.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

data/metrics.mdx#L67

Use 'formo' instead of 'Formo'.

### Referrers / Sources

Expand Down Expand Up @@ -145,7 +145,7 @@

### Returning Users

Users who have visited your site or app in previous time periods and return within the current period.
Users who have visited your site or app in previous time periods and return within the current period.

### Resurrected Users

Expand All @@ -163,7 +163,7 @@

Events are user-defined custom events. They have a name and optional metadata key/value pairs. When you expand the activity feed, you can view and filter the metadata.

Metadata can be anything. For example, you can define an event Button clicked and track which button was clicked as the metadata field `button=Header`.
Metadata can be anything. For example, you can define a `Swap Completed` event and track the swap pair as the metadata field `pair=ETH/USDC`.

### Top apps

Expand All @@ -185,7 +185,7 @@

### Wallet Address

Formo uses the wallet address as a persistent identifier for a visitor where available.

Check warning on line 188 in data/metrics.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

data/metrics.mdx#L188

Use 'formo' instead of 'Formo'.

### Wallet Type

Expand Down
33 changes: 18 additions & 15 deletions features/product-analytics/custom-events.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: 'Custom events'
description: 'Define and track custom events like button clicks, form submissions, and purchases with structured properties using the Formo SDK Track API.'
description: 'Define and track custom events like swaps, deposits, and quests with structured properties using the Formo SDK Track API.'

Check warning on line 3 in features/product-analytics/custom-events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

features/product-analytics/custom-events.mdx#L3

Use 'formo' instead of 'Formo'.
---

## Overview

The Formo SDK offers an easy-to-use event collection library that allows you to track custom events in your crypto app.

Check warning on line 8 in features/product-analytics/custom-events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

features/product-analytics/custom-events.mdx#L8

Use 'formo' instead of 'Formo'.
Ensure high quality, structured data with Formo.

Check warning on line 9 in features/product-analytics/custom-events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

features/product-analytics/custom-events.mdx#L9

Use 'formo' instead of 'Formo'.

Start tracking custom events with the [Web SDK](/sdks/web#track-events) to get started. Custom events work with [Wallet Intelligence](/features/wallet-intelligence/overview) and [Funnels](/features/product-analytics/funnels) to give you a complete picture of each user's journey.

Expand All @@ -14,7 +14,7 @@

## How to track custom events

While Formo autocaptures page views, wallet connects, and transactions, custom events let you track specific actions that matter to your app. This guide shows you how.

Check warning on line 17 in features/product-analytics/custom-events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

features/product-analytics/custom-events.mdx#L17

Use 'formo' instead of 'Formo'.

### When to use custom events

Expand All @@ -22,13 +22,13 @@

| Action | Why track it |
|--------|--------------|
| Button clicks | Measure CTA effectiveness |
| Form submissions | Track lead generation |
| Swap submissions | Measure swap conversion |
| Deposit completions | Track liquidity flows |
| Feature usage | Understand adoption |
| Errors | Debug user issues |
| Key conversions | Measure business outcomes |

### Step 1: Import the Formo SDK

Check warning on line 31 in features/product-analytics/custom-events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

features/product-analytics/custom-events.mdx#L31

Use 'formo' instead of 'Formo'.

<Tabs>
<Tab title="Wagmi / React">
Expand All @@ -47,7 +47,7 @@

```javascript
// Track an event
window.formo.track('Event Name', { property: 'value' });
window.formo.track('Swap Completed', { pair: 'ETH/USDC' });
```
</Tab>
</Tabs>
Expand All @@ -73,9 +73,11 @@
For events with monetary value, use special properties:

```typescript
analytics.track('Trade Executed', {
analytics.track('Swap Completed', {
pair: 'ETH/USDC',
volume: 5000, // USD value of the trade
token_in: 'ETH',
token_out: 'USDC',
volume: 5000, // USD value of the swap
revenue: 25, // Revenue earned (e.g., fees)
points: 100 // Loyalty/reward points
});
Expand All @@ -90,7 +92,7 @@

After tracking events:

1. Go to **Activity** in the Formo Dashboard

Check warning on line 95 in features/product-analytics/custom-events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

features/product-analytics/custom-events.mdx#L95

Use 'formo' instead of 'Formo'.
2. Filter by your custom event name
3. See all event occurrences

Expand Down Expand Up @@ -167,21 +169,22 @@
});
```

### Example: Tracking feature adoption
### Example: Tracking DeFi feature adoption

Measure which features users engage with:
Measure which protocol features users engage with:

```typescript
// User opens a feature
analytics.track('Feature Opened', {
feature: 'Portfolio',
// User opens a liquidity pool
analytics.track('Pool Opened', {
pool_id: 'ETH/USDC',
source: 'sidebar'
});

// User completes key action in feature
analytics.track('Portfolio Export', {
format: 'csv',
date_range: '30d'
// User completes a key action in the pool
analytics.track('Liquidity Added', {
pool_id: 'ETH/USDC',
token_0: 'ETH',
token_1: 'USDC'
});
```

Expand Down
10 changes: 5 additions & 5 deletions sdks/mobile.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: 'Mobile'
icon: mobile
description: 'Track user events in your mobile apps with the Formo React Native SDK. Measure what matters onchain with full device context and wallet event tracking.'

Check warning on line 4 in sdks/mobile.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/mobile.mdx#L4

Use 'formo' instead of 'Formo'.
---

<Warning>The mobile SDK is still in active development. [Contact support](https://formo.so/support) to get access.</Warning>

The Formo React Native SDK is designed for mobile dApps and implements the standard [Events API](/data/events/overview#events-api) with rich mobile context including device information, network status, and app metadata.

Check warning on line 9 in sdks/mobile.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/mobile.mdx#L9

Use 'formo' instead of 'Formo'.

## Installation

Expand Down Expand Up @@ -230,14 +230,14 @@
});

// With reserved properties for analytics
formo.track('Purchase Completed', {
productId: 'premium-nft-001',
formo.track('NFT Minted', {
collection: 'founders-pass',
tokenId: '001',
revenue: 99.99, // Reserved: revenue tracking
currency: 'USD', // Reserved: currency for revenue
});

formo.track('Achievement Unlocked', {
achievementId: 'first_transaction',
formo.track('Quest Completed', {
questId: 'first_swap',
points: 500, // Reserved: points tracking
});

Expand Down Expand Up @@ -302,7 +302,7 @@

| Prop | Type | Required | Description |
|:-----|:-----|:---------|:------------|
| `writeKey` | String | Yes | Your Formo project write key. |

Check warning on line 305 in sdks/mobile.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/mobile.mdx#L305

Use 'formo' instead of 'Formo'.
| `asyncStorage` | AsyncStorage | Yes | AsyncStorage instance for persistent storage. |
| `options` | Object | No | Configuration options (see below). |
| `disabled` | Boolean | No | Disable the SDK entirely. |
Expand Down Expand Up @@ -556,7 +556,7 @@
1. Enable debug logging in development
2. Trigger a screen view or custom event
3. Check the console for event logs
4. Verify events appear in the [Activity page](https://app.formo.so) on your Formo dashboard

Check warning on line 559 in sdks/mobile.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/mobile.mdx#L559

Use 'formo' instead of 'Formo'.

## Peer dependencies

Expand Down
12 changes: 8 additions & 4 deletions sdks/server.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "Server"
icon: server
description: "Send events and identify users from your backend with Formo server-side SDKs for Node.js, Python, and other languages. Stateless and wallet-native."

Check warning on line 4 in sdks/server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/server.mdx#L4

Use 'formo' instead of 'Formo'.
---

The Formo server-side SDKs allow you to track actions and identify users from your backend applications.

Check warning on line 7 in sdks/server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/server.mdx#L7

Use 'formo' instead of 'Formo'.

Server-Side SDKs are stateless - they don't store or remember any values between calls. Every call must explicitly provide wallet address values for identification.

Expand Down Expand Up @@ -53,11 +53,15 @@
await analytics.track({
address: "0x9798d87366bdfc5d70b300abdffc4f9e95369b3d", // optional: wallet address
anonymousId: uuid(), // optional: auto-generated if not provided
event: "Purchase Completed", // required: event name
event: "Swap Completed", // required: event name
properties: {
order_id: "123",
revenue: 99.99,
currency: "USD",
pair: "ETH/USDC",
token_in: "ETH",
token_out: "USDC",
amount_in: 1.5,
amount_out: 4500,
volume: 4500,
revenue: 13.5,
},
});
```
Expand Down Expand Up @@ -117,7 +121,7 @@
To verify that your integration is working correctly:

1. **Send a test event**: Trigger an action in your application that calls `track()` or `identify()`.
2. **Check the Dashboard**: Go to the **Activity** page in the Formo dashboard.

Check warning on line 124 in sdks/server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/server.mdx#L124

Use 'formo' instead of 'Formo'.
3. **Confirm Ingestion**: Your events should appear in the activity stream within a few seconds after a flush occurs.

If you don't see events, ensure that you are calling `await analytics.flush()` if your script exits immediately, and check for any `ValidationError` in your server logs.
Expand Down
6 changes: 3 additions & 3 deletions sdks/web.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: 'Web'
icon: browser
description: 'Install and configure the Formo Web SDK to track page views, wallet connects, transactions, and custom events in your website or web app.'

Check warning on line 4 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L4

Use 'formo' instead of 'Formo'.
---

<Frame>
<img src="/images/intro3.png" alt="Formo" />
</Frame>

The Formo Web SDK is [open source](https://github.com/getformo/sdk) and implements the standard [Events API](/data/events/overview#events-api).

Check warning on line 11 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L11

Use 'formo' instead of 'Formo'.

## Installation

Expand All @@ -16,14 +16,14 @@
Use this pre-built prompt to get started faster: [Install Formo with AI](/install#install-with-ai).
</Tip>

There are several ways to install the Formo SDK:

Check warning on line 19 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L19

Use 'formo' instead of 'Formo'.
- [Wagmi](#wagmi) is recommended for EVM apps with wallet connection
- [Solana](#solana-integration) for Solana apps using framework-kit
- [HTML Snippet](#html-snippet) is recommended for static websites
- [React & Next.js (without Wagmi)](#react--nextjs-without-wagmi)
- [Angular](#angular) for Angular apps using the bare EIP-1193 provider

We recommend installing Formo on **both your website (example.com) and your app (app.example.com)** on the same project with the same SDK write key.

Check warning on line 26 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L26

Use 'formo' instead of 'Formo'.

The standard setup is to use the HTML snippet on your website and Wagmi on your app, with [cross-subdomain tracking](#cross-subdomain-tracking) enabled.

Expand Down Expand Up @@ -90,7 +90,7 @@

```html
<script
src="https://cdn.formo.so/analytics@latest"

Check warning on line 93 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L93

Did you really mean 'cdn'?
defer onload="window.formofy('<YOUR_WRITE_KEY>');"
></script>
```
Expand Down Expand Up @@ -229,7 +229,7 @@
window.formo.identify(...);
```

If no parameters are specified, the Formo SDK will attempt to auto-identify the wallet address.

Check warning on line 232 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L232

Use 'formo' instead of 'Formo'.

<Tabs>
<Tab title="Wagmi">
Expand Down Expand Up @@ -326,7 +326,7 @@

> 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 manually track them.

To track custom events (in-app user actions, key conversions) use the [`track`](/data/events/track) function with details of what happenned:
To track custom events (in-app user actions, key conversions) use the [`track`](/data/events/track) function with details of what happened:

```ts
import { useFormo } from '@formo/analytics';
Expand Down Expand Up @@ -539,7 +539,7 @@

### Ready callback

The `ready` callback function executes once the Formo SDK is fully loaded and ready to use. This is useful for performing initialization tasks or calling SDK methods that require the SDK to be ready.

Check warning on line 542 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L542

Use 'formo' instead of 'Formo'.

```tsx
<AnalyticsProvider
Expand Down Expand Up @@ -614,7 +614,7 @@

#### Excluding query parameters

Formo automatically captures the page URL, query string, individual query-parameter properties, and the referrer.

Check warning on line 617 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L617

Use 'formo' instead of 'Formo'.

If your URLs carry sensitive data (auth tokens, one-time codes, emails), use `tracking.excludeQueryParams` to strip those parameters in the browser, before any event is sent so they are never transmitted or stored:

Expand Down Expand Up @@ -642,7 +642,7 @@

### Consent management

The Formo Web SDK includes simplified consent management functionality to help you comply with privacy regulations like GDPR, CCPA, and ePrivacy Directive.

Check warning on line 645 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L645

Use 'formo' instead of 'Formo'.

Control user tracking preferences with simple opt-out and opt-in methods:

Expand Down Expand Up @@ -674,7 +674,7 @@

### Cross subdomain tracking

By default, Formo sets identity cookies on the root domain, sharing visitor identity across all subdomains. This ensures accurate visitor counts and consistent attribution across your subdomains out of the box.

Check warning on line 677 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L677

Use 'formo' instead of 'Formo'.

| Value | Behavior |
|-------|----------|
Expand Down Expand Up @@ -719,7 +719,7 @@

### Referrals

Formo autodetects `ref`, `referral`, and `refcode` query parameters in the URL. You can customize how referrals are detected by the SDK:

Check warning on line 722 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L722

Use 'formo' instead of 'Formo'.

```tsx
<FormoAnalyticsProvider
Expand All @@ -733,7 +733,7 @@
>
```

In the above configuration, Formo will detect referrals from:

Check warning on line 736 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L736

Use 'formo' instead of 'Formo'.
- the `via` and `ref` query parameters in the URL, and
- from the `/referral/([^/]+)` path pattern

Expand Down Expand Up @@ -776,7 +776,7 @@

### Solana integration

The Formo Web SDK supports Solana via [framework-kit](https://github.com/solana-foundation/framework-kit) (`@solana/client` + `@solana/react-hooks`). The SDK subscribes to framework-kit's zustand store as a read-only observer. It never wraps or intercepts wallet methods.

Check warning on line 779 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L779

Use 'formo' instead of 'Formo'.

See the full [Solana example app](https://github.com/getformo/examples/tree/main/with-solana) for a working implementation.

Expand Down Expand Up @@ -826,7 +826,7 @@
const formo = useFormo();

const handleClick = () => {
formo.track('button_click', { page: 'home' });
formo.track('Swap Started', { pair: 'ETH/USDC' });
};
}
```
Expand Down Expand Up @@ -894,7 +894,7 @@
The [Wagmi integration](#wagmi) automatically tracks wallet connects, disconnects, chain switches, transactions, and signatures by hooking into Wagmi's wallet adapter. The standard [React integration](#react--nextjs-without-wagmi) tracks wallet events by wrapping the EIP-1193 wallet provider to track signatures and transactions. Use the Wagmi integration if your dApp uses Wagmi and its hooks.
</Accordion>
<Accordion title="How do I track custom events like swaps, deposits, or mints?">
Use [formo.track()](/data/events/track) to send custom events with any properties you need. For example: `formo.track('swap', { tokenIn: 'USDC', tokenOut: 'ETH', amount: 1000 })`. Custom events appear in the [Activity](/features/product-analytics/activity) feed and can be queried in the [Explorer](/features/product-analytics/explore).
Use [formo.track()](/data/events/track) to send custom events with any properties you need. For example: `formo.track('Swap Completed', { pair: 'ETH/USDC', token_in: 'ETH', token_out: 'USDC', amount_in: 1.5 })`. Custom events appear in the [Activity](/features/product-analytics/activity) feed and can be queried in the [Explorer](/features/product-analytics/explore).
</Accordion>
<Accordion title="Does the Formo SDK support consent management for GDPR?">
Yes. The SDK provides built-in [consent management](#consent-management) with `optOutTracking()` and `optInTracking()` methods. Call `optOutTracking()` to stop all tracking for a user, and `optInTracking()` to re-enable it. Formo does not use third-party cookies, IP addresses, or device fingerprinting, so most jurisdictions do not require a cookie consent banner.
Expand All @@ -912,7 +912,7 @@
<img src="/images/proxy.png" alt="Reverse proxy data flow" />
</Frame>

Here are the domains used by Formo to load the SDK and send data:

Check warning on line 915 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L915

Use 'formo' instead of 'Formo'.

| Domain | Use case |
|--------|----------|
Expand All @@ -922,7 +922,7 @@
### CDN

Some ad blockers block specific SDK-related downloads and API calls based on the domain name and URL.
To circumvent this issue you can download and serve the Formo SDK from `cdn.formo.so` to your own domain e.g. `yourdomain.com/formo.js`.

Check warning on line 925 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L925

Use 'formo' instead of 'Formo'.

### Next.js rewrites

Expand Down Expand Up @@ -955,7 +955,7 @@
></script>
```

Then, configure the Formo SDK to send requests via your rewrite. Update the `apiHost` parameter in the Formo SDK:

Check warning on line 958 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L958

Use 'formo' instead of 'Formo'.

Check warning on line 958 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L958

Use 'formo' instead of 'Formo'.

```javascript
<AnalyticsProvider
Expand All @@ -970,7 +970,7 @@

### Next.js middleware

If you are using Next.js and rewrites aren't working for you, you can write [custom middleware](https://nextjs.org/docs/14/pages/building-your-application/routing/middleware) to proxy requests to Formo.

Check warning on line 973 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L973

Use 'formo' instead of 'Formo'.

Create a file named `middleware.js/ts` in your base directory (same level as the app folder).

Expand Down Expand Up @@ -999,9 +999,9 @@
};
```

In this file, set up code to match requests to a custom route, set a new host header, change the URL to point to Formo, and rewrite the response.

Check warning on line 1002 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L1002

Use 'formo' instead of 'Formo'.

Once done, configure the Formo SDK to send requests via your rewrite:

Check warning on line 1004 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L1004

Use 'formo' instead of 'Formo'.

```javascript
<AnalyticsProvider
Expand Down Expand Up @@ -1038,4 +1038,4 @@
- Visit your website / app
- Open the network tab in your browser's developer tools
- Check that analytics requests are going through your domain instead of `events.formo.so`
- Check that events show up in the Activity page on the Formo dashboard

Check warning on line 1041 in sdks/web.mdx

View check run for this annotation

Mintlify / Mintlify Validation (formo) - vale-spellcheck

sdks/web.mdx#L1041

Use 'formo' instead of 'Formo'.
68 changes: 68 additions & 0 deletions styles/config/vocabularies/Formo/accept.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
Angular's
Autocapture
Autocaptured
Beehiiv
Bing
Cloudfront
Dailymotion
Ethereum
Farcaster
Formo
Formo's
Genspark
Kagi
Kimi
Naver
OAuth
Onchain
Phind
Pinterest
Qwen
SDK's
SDKs
Serverless
Snapchat
Solana
Subresource
Substack
UTMs
Uniswap
Vercel
Wagmi
Wagmi's
Wistia
Yandex
async
autocapture
autocaptured
autocaptures
autodetects
backgrounding
config
crypto
dApp
dApps
denylist
ePrivacy
enqueued
esbuild
formo
globals
hostname
hostnames
injectable
leaderboards
lightbulb
logLevel
middleware
offchain
onchain
pageview
polyfill
serverless
solana
subpath
summer_sale
viem
wagmi
zustand