DataLook Docs

Define success

Tell us what counts as a conversion. URL match, button click, or one-line code call — pick whichever fits.

DataLook is built around your success event. Pageviews are necessary context, not the answer. Defining success once unlocks the conversion-rate metric, the acquisition view, and the journey view.

There are three ways to register a success rule. You can use any combination of them.

1. URL pattern — zero code

Best for: thank-you pages, welcome pages, post-purchase redirects.

In the dashboard onboarding, pick URL match and enter the path that means "they made it". Example:

PatternMeaning
/welcomeThey signed up
/order/confirmedThey paid
/booking/successThey booked

Every pageview matching that path will also emit a synthesized event_name='success' row, with the name you pick.

URL matching uses an exact-equals on the normalized path (lowercased, no query, no fragment). Wildcard patterns (/welcome/*) are coming in v1.1.

2. Click — also zero code

Best for: signup buttons, checkout buttons, CTAs that don't lead to a unique URL.

Add a data-track attribute to the button you want to track:

<button data-track="signup-cta">Get started</button>

Then in the dashboard, register a click rule that matches signup-cta. Every click on any element with that data-track value becomes a success.

3. Code — for SaaS flows

Best for: events that happen after a successful API response, server-confirmed conversions, multi-step flows.

In your frontend code, after the action succeeds:

window.analytics.success('paid-customer', {
  plan: 'starter',
  value: 9.99,
})

Then register a code rule with the same name in the dashboard. (You don't actually need to register it — the row will appear — but registering tells the dashboard to treat it as a named success rather than an "untracked" event.)

For backend-confirmed conversions, see Server events instead.

Editing or deleting a rule

Every active rule shows up in the dashboard with an edit pencil and a trash icon. Deleting a rule stops the synthesizing immediately but does not delete historical success rows — those are kept for the lifetime of your data.

What's next

On this page