Events
Custom events measure important outcomes on a website: a completed purchase, sign-up, download, lead submission, successful search, or meaningful button click.
Events use the TypeUI Insights snippet already installed on the website. You do not create an event in Cloudflare or register its name in TypeUI first.
Track an event
Call the public helper after analytics consent:
window.trackTypeUIEvent("signup");
Track a successful purchase with an optional numeric value and three-letter currency code:
window.trackTypeUIEvent("purchase", {
value: 49,
currency: "USD",
});
Other useful examples:
window.trackTypeUIEvent("pricing.cta_click");
window.trackTypeUIEvent("whitepaper_download");
window.trackTypeUIEvent("contact_form_success");
The helper returns true when the event is accepted or queued and false when it cannot be collected.
Track outcomes, not attempts
Send an event only after the action succeeds. For example, track purchase after the payment provider confirms the order, not when the visitor first presses the checkout button.
async function completeSignup(formData) {
const response = await createAccount(formData);
if (response.ok) {
window.trackTypeUIEvent("signup");
}
}
This keeps the event count useful as a conversion metric.
Event names and values
Event names can contain letters, numbers, dots, underscores, colons, and dashes. Use stable names that describe the completed action.
The optional event object accepts:
| Field | Type | Description |
|---|---|---|
value | Number | A finite numeric value associated with the event |
currency | String | A three-letter ISO currency code such as USD or EUR |
TypeUI Insights intentionally does not accept arbitrary event metadata. Do not place names, email addresses, order IDs, account IDs, typed text, or other personal data in an event name.
Consent behavior
trackTypeUIEvent() does not collect an event before analytics consent. If consent is active but the external tracker is still loading, the installation snippet can queue a short burst of events and deliver them after the tracker is ready.
Withdrawing analytics consent clears pending events and disables further collection.
How events affect plan usage
Every Insights tier includes customer-defined custom events equal to 10% of its rolling 30-day pageview allowance. For example, the 100,000-pageview tier includes 10,000 custom events, and the 250,000-pageview tier includes 25,000 custom events.
Custom events within that included amount do not consume pageview capacity. After the included amount is used, every additional custom event counts as one unit against the same workspace quota. Automatically collected clicks, rage clicks, dead clicks, scroll-depth measurements, engagement signals, and other interaction analytics do not count toward the custom-event allowance:
quota usage = pageviews + max(0, custom events - included custom events)
The dashboard usage breakdown shows pageviews, included custom events used, and excess custom events counted. The allowance is shared by every website in the workspace over the same rolling window. See the Terms of Service for the complete usage terms.
Analyze conversions
The Custom events card ranks the most frequent events and shows their count, associated user sessions, comparison change, and total monetary value when a currency is present.
Custom events are also included in:
SUMMARY.mdas an AI-ready conversion table- CSV exports for the current period and comparison
- The same global date range and analytics context as traffic, audience, campaigns, pages, and interaction data
Use this SUMMARY.md to explain our signup funnel. Compare signup events with sessions and landing pages, identify likely drop-off points from the journeys and heatmap data, and propose three measurable UI experiments.
Suggested event plan
Start with a small set of business outcomes:
| Goal | Suggested event |
|---|---|
| New account created | signup |
| Purchase completed | purchase |
| Qualified lead submitted | lead_submit |
| Important file downloaded | download |
| Primary pricing CTA used | pricing.cta_click |
Add an event when it answers a decision you plan to make. A short, consistent event list is easier to understand than tracking every interaction as a conversion.