Aller au contenu
wheremyflow
Fonctionnalités Tarifs Comparatif Manifeste Aide Audit Contact Démo Connexion

Custom events

Beyond pageviews, wheremyflow lets you measure what really matters: signups, purchases, clicks on a key button, video plays. These _custom events_ are configured and read in the same place: the Behavior tab of the dashboard, _Configure events_ section.

The model

An event is three things:

  • A name (e.g. signup, purchase, cta_click).
  • A page or an element that triggers it.
  • Optionally, properties (max 10 keys) to qualify the event (e.g. plan: pro, value: 49).

Trigger an event

Method 1 — Programmatic (most precise)

From your JavaScript:

window.wmf('event', 'signup', { plan: 'pro' });

window.wmf is exposed by w.js. The event is posted to /api/event immediately, fire-and-forget.

Method 2 — HTML attribute (no code change)

On any clickable element:

<button data-wmf-event="cta_click" data-wmf-cta="hero">Get started for free</button>

The snippet listens for clicks and emits the event automatically, with the data-wmf-* properties (prefix stripped).

On by default. Any click on an <a href> link:

  • pointing to a file (.pdf, .zip, .csv, etc.) → file_download event.
  • pointing to an external domain → outbound_link event.

See Downloads and Outbound links.

Strict server-side rules

To keep the database clean, the server enforces:

  • 10 properties max per event (the 11th is silently dropped).
  • Keys: 50 chars max, [a-z0-9_]+.
  • Values: string, number or boolean; strings 200 chars max.
  • No PII: never put an email, name, phone number or token in an event. It's forbidden by EU audience-measurement frameworks guidelines and we truncate as a safeguard.

Reading results

Events flow in real time under Behavior → Measurements. They're collapsed by accordion: clicking an event name opens the list of occurrences with their properties.

For events with a value (revenue, basket size), pass the value property (number) — it's summed and averaged automatically.

Best practices

  • Standardize names from day one (snake_case, past-tense verbs: signup_completed, checkout_failed).
  • Keep distinct names few (ideal: under 30) — beyond that, it's probably application logging, not analytics.
  • Use properties to qualify, not to multiply names (purchase + plan: pro rather than purchase_pro).

Going further