Add privacy-safe Know goal calls and promote detected events to conversion goals.
A goal is a meaningful custom event—such as a completed signup, trial start, or finished checkout. Know detects the event automatically; promoting it to a goal makes it available in conversion totals, filters, funnels, and journeys.
Fire after the server or trusted application state confirms success, not when a visitor merely clicks a button.
Plan, product, feature, and campaign values are useful. Personal or sensitive fields are not.
The first argument is the event name. The optional object adds privacy-safe context that can help explain the conversion later.
// Run only after the action succeeds.
window.know?.("signup_completed", { plan: "pro" });signup_completed, not signup_button_clicked.In React, Next.js, or another client application, call Know after the awaited operation succeeds. Guard effects and retry paths so the same conversion is not sent twice.
async function submitSignup() {
const account = await createAccount();
// The account now exists, so this is a real conversion.
window.know?.("signup_completed", { plan: account.plan });
}Sign in and select a website to replace all placeholders automatically.
Work in the codebase for https://YOUR_WEBSITE_DOMAIN.
Know configuration:
- Registered domain: YOUR_WEBSITE_DOMAIN
- Site ID: YOUR_SITE_ID
- Tracker: https://www.know.am/t.js
- Event collector: https://collect.know.am/e
- Configured goal events: none configured yet
Task: Add the Know goal event "signup_completed" to the application.
Requirements:
1. Find the confirmed success state for this conversion; do not track the initial click or form submit.
2. Add window.know?.("signup_completed", { nonSensitiveContext: "value" }) after success.
3. Keep the event name lowercase with underscores and metadata limited to non-identifying plan, product, feature, or campaign context.
4. Make the call safe when the tracker has not loaded and prevent duplicate calls caused by retries, rerenders, or repeated effects.
5. Verify one successful test action produces one custom event.
Privacy and implementation rules:
- Inspect the project and find the real successful application state before editing.
- Keep the existing Know tracker installed exactly once; do not add another analytics package.
- Never send names, e-mail addresses, credentials, authorization data, payment-card data, health data, cookies, raw IP addresses, query strings, or request bodies.
- Preserve the current design, authentication, redirects, middleware, and server/client boundaries.
- Run the existing tests and production build, then report changed files and exact verification steps.
Make the code changes now.