You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: data/concepts.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,12 +36,12 @@ Wallets are automatically linked to the user when multiple wallets are connected
36
36
### 3. Properties
37
37
38
38
Properties are **additional information about users and events.**
39
-
- 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.
39
+
- 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.
40
40
- 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.
41
41
42
42
Properties examples:
43
43
- A Connect Wallet event has wallet address and chain ID (Ethereum, Base, etc.)
44
44
- A Page View event has page URL, referrer URL, and other metadata.
45
45
- A User has net worth and first-touch UTM parameter properties.
46
46
47
-
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.
47
+
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.
Copy file name to clipboardExpand all lines: data/events/track.mdx
+33-15Lines changed: 33 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,17 @@ description: 'Reference for the custom events used to record custom user actions
6
6
Record any [custom events](/features/product-analytics/custom-events) in your app,
7
7
along with properties that describe the action.
8
8
9
-
Custom events can capture a broad range of actions, such as clicking a button or completing a purchase.
9
+
Custom events can capture a broad range of actions, such as starting a swap or completing a deposit.
10
10
11
-
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.
11
+
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.
12
12
13
13
## Naming events
14
14
15
15
When naming events, Formo recommends establishing a consistent naming convention that uses:
16
16
17
17
- Consistent formatting: Event names are case sensitive.
18
-
- 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.
19
-
- 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.
18
+
- 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.
19
+
- 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.
20
20
21
21
This allows everyone including you 6 months from now to instantly understand the meaning of an event.
22
22
@@ -29,9 +29,11 @@ Every custom event has `type` set to `track` and `event` set to your custom even
29
29
```json
30
30
{
31
31
"type": "track",
32
-
"event": "Swap Reviewed",
32
+
"event": "Swap Completed",
33
33
"properties": {
34
-
"rating": 5
34
+
"pair": "ETH/USDC",
35
+
"token_in": "ETH",
36
+
"token_out": "USDC"
35
37
}
36
38
}
37
39
```
@@ -56,20 +58,36 @@ Include these optional properties in a custom event to track values associated w
Copy file name to clipboardExpand all lines: data/metrics.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ How many times a page has been viewed across your site or app.
35
35
36
36
### Sessions
37
37
38
-
A session (also known as a visit) is a set of actions that a user takes on your site.
38
+
A session (also known as a visit) is a set of actions that a user takes on your site.
39
39
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.
40
40
41
41
### Session Duration
@@ -145,7 +145,7 @@ Users who visit your site or app for the first time within the selected time per
145
145
146
146
### Returning Users
147
147
148
-
Users who have visited your site or app in previous time periods and return within the current period.
148
+
Users who have visited your site or app in previous time periods and return within the current period.
149
149
150
150
### Resurrected Users
151
151
@@ -163,7 +163,7 @@ Users with no activity within the project's churn window.
163
163
164
164
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.
165
165
166
-
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`.
166
+
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`.
Copy file name to clipboardExpand all lines: features/product-analytics/custom-events.mdx
+18-15Lines changed: 18 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: 'Custom events'
3
-
description: 'Define and track custom events like button clicks, form submissions, and purchases with structured properties using the Formo SDK Track API.'
3
+
description: 'Define and track custom events like swaps, deposits, and quests with structured properties using the Formo SDK Track API.'
4
4
---
5
5
6
6
## Overview
@@ -22,8 +22,8 @@ Track actions that aren't captured automatically:
22
22
23
23
| Action | Why track it |
24
24
|--------|--------------|
25
-
|Button clicks| Measure CTA effectiveness|
26
-
|Form submissions| Track lead generation|
25
+
|Swap submissions| Measure swap conversion|
26
+
|Deposit completions| Track liquidity flows|
27
27
| Feature usage | Understand adoption |
28
28
| Errors | Debug user issues |
29
29
| Key conversions | Measure business outcomes |
@@ -47,7 +47,7 @@ Track actions that aren't captured automatically:
Copy file name to clipboardExpand all lines: sdks/web.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -326,7 +326,7 @@ If no parameters are specified, the Formo SDK will attempt to auto-identify the
326
326
327
327
> 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.
328
328
329
-
To track custom events (in-app user actions, key conversions) use the [`track`](/data/events/track) function with details of what happenned:
329
+
To track custom events (in-app user actions, key conversions) use the [`track`](/data/events/track) function with details of what happened:
@@ -894,7 +894,7 @@ For Solana-only apps, set `evm: false` to disable EVM provider detection (EIP-11
894
894
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.
895
895
</Accordion>
896
896
<Accordiontitle="How do I track custom events like swaps, deposits, or mints?">
897
-
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).
897
+
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).
898
898
</Accordion>
899
899
<Accordiontitle="Does the Formo SDK support consent management for GDPR?">
900
900
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.
0 commit comments