useFunnel
Combines all major hooks into a single object. Useful for simple funnels where you want everything in one call.
This hook subscribes to all variable changes via useVariables(). For performance-sensitive pages, prefer individual hooks.
const { navigation, responses, user, products, tracking } = useFunnel()
return (
<div>
<p>Welcome, {user.name}</p>
<button onClick={navigation.goToNextPage}>Next</button>
</div>
)| Property | Type | Description |
|---|---|---|
funnelId | string | Funnel identifier |
campaignId | string | Campaign identifier |
sessionId | string | null | Current session ID |
variables | Record<string, VariableValue> | All variables |
user | UserState | Same as useUser() return value |
responses | Record<string, VariableValue> | Same as useResponses() return value |
queryParams | Record<string, string> | Same as useQueryParams() return value |
navigation | NavigationState | Same as useNavigation() return value |
products | ProductsState | Same as useProducts() return value |
tracking | TrackingState | Same as useTracking() return value |
payment | PaymentState | Same as usePayment() return value |
Last updated on