Skip to main content
Bolt can add Wendung to your app from a single chat prompt. It installs @wendung/sdk, adds a funnel step at each moment you want to measure, and keeps your key in the project’s .env file. Your part is the account, the key, approving the plan, and adding your app’s addresses to the project’s allowed origins. Bolt runs your app’s preview on a hosted address, not on localhost. Dev mode, which accepts localhost for a new project’s first 24 hours, doesn’t cover it, so every address your app runs on must be on the allowed origins list before its events are accepted.

What you need

  • A Bolt web app project. This guide doesn’t cover mobile apps built with Expo.
  • A Wendung account. Sign up without a card; your first workspace starts a 14-day trial of the Starter plan and then moves to the Free plan. See Plans and limits.

Setup

1

Create a project and copy its key

In the Wendung dashboard, create a project for the app. Open the project’s Settings → API keys and copy the key named Default. It starts with pk_. A publishable key is safe in frontend code, and ingest accepts it only from your allowed origins, so you can paste it into the Bolt chat.
2

Send the prompt in Plan mode

Turn on Plan in the chatbox, replace pk_... with your key, and send this prompt:
Prompt
Plan mode lets you approve the plan before Bolt changes any code. The prompt lists the rules that matter most, in case Bolt doesn’t open the link to the SDK reference.Bolt’s Secrets are available only to server functions, so browser code can’t read a key stored there. The publishable key belongs in .env.
3

Review the plan

Bolt answers with a plan that includes a funnel. For a typical SaaS app, the plan looks like this:Check that each step marks a moment that matters to you and that the names are what you want to see in reports. Names are matched character for character, so changing them later means changing the code and the funnel.Decide the two open questions:
  • Consent. If visitors must accept analytics first and your app has no consent banner yet, ask Bolt to add one. The consent guide explains the options.
  • Pageviews. Pageview tracking adds web analytics for the app’s pages. The Free plan doesn’t include pageviews. To see them, register the published address under Sites; see Web analytics.
Then click Implement this plan. If Bolt doesn’t offer that button, turn off Plan and reply that you approve the plan.
4

Allow the preview's address

Open the preview, accept analytics in the consent banner if your app has one, and complete one of the steps, for example by signing up a test user.The first request is rejected because the preview’s address isn’t on the list yet. In the Wendung dashboard, open the project’s Events page. The request shows the status Rejected and, in the Origin column, the address it came from. Copy that origin and add it under Settings → Allowed origins.Allowed origins match exactly, and Bolt sets the preview’s address. If preview events stop arriving later, check the Events page for a rejected request from a new origin and add it. Remove preview origins you no longer use, since a project allows up to 50.
5

Check that events arrive

Origin changes can take a few minutes to reach the ingest endpoint. Then complete the step again in the preview. The Events page lists the new request as Delivered.Events from the preview are stored in the same project as events from your published app, so your test steps count in your funnels.
6

Publish and allow the published address

Publish the app from the Publish menu. Bolt hosting gives it an address ending in bolt.host, and paid plans can add a custom domain. If you rename the address later, add the new one as an allowed origin. If you host on Netlify instead, the app gets an address ending in netlify.app. Later changes go live when you click Update in the Publish menu.Add each address your published app uses under Settings → Allowed origins, for example https://your-app.bolt.host and https://www.example.com. Each one is a separate entry. Then complete a step on the published app and confirm it on the Events page.
7

Create the funnel

Under Funnels, create a funnel and pick the step names in order. Names that have already arrived appear in the step picker with their counts. See Creating a funnel. The Free plan includes one funnel per project.

Steps that happen on the server

A payment confirmed by a webhook happens on the server, not in the visitor’s browser. Sending it as a funnel step needs a secret key (sk_), which you create in the dashboard. Keep it out of .env, which is a project file your code reads. Bolt never writes Secrets into project files or the published site, and only server functions can read them, so store the secret key there. See Server-side events for how server steps work and how they join a user’s browser steps.

Troubleshooting

  • No request on the Events page. The key is missing or wrong, or no step ran. Check that .env holds your project’s pk_ key under a name with your framework’s browser prefix, such as VITE_WENDUNG_KEY, and that you completed a step after accepting analytics.
  • Requests rejected because the origin isn’t allowed. Add the exact origin shown on the Events page, including https:// and the full subdomain.
  • Requests rejected with rate_limited or event_quota_exceeded. The project reached a plan limit.
Debugging covers each rejection status and the SDK’s console messages, and the Events page explains each rejection reason.