Page views tell you visitors came. They do not tell you what those visitors did. If 500 people visit your landing page and 25 sign up, that is a 5 percent conversion rate -- but page views alone cannot tell you whether the non-converters ever scrolled to your pricing section, clicked your CTA button, or started watching your demo.
Custom events answer those questions. You define the event name and any properties you want to track, fire one line of JavaScript when an interaction happens, and the data appears in your Analytics tab within seconds.
OperatorStack.trackEvent() logs any user interaction with a name and optional properties. The most useful pre-launch events are cta_clicked, pricing_viewed, feature_interest, and demo_started. No backend, no cookies, and no consent banner required -- the same script tag that handles your waitlist and page views handles custom events too.
How Custom Events Work
The OperatorStack SDK exposes trackEvent() as soon as the script tag loads. It takes an event name (a string you define) and an optional properties object:
OperatorStack.trackEvent("event_name", { key: "value" });
The event queues in memory and flushes to your dashboard in a 5-second batch. trackEvent() is non-blocking: it will not delay button clicks or form submissions while it runs.
Events appear in the Events section of your Analytics tab. Each event name shows a total count and a breakdown by the properties you passed.
Setting Up Your First Event
You need the OperatorStack script tag on your page with your project key:
<script src="https://operatorstack.dev/os.js" data-project="pk_your_project_key"></script>
Then attach trackEvent() to any DOM interaction:
document.getElementById("hero-cta").addEventListener("click", () => {
OperatorStack.trackEvent("cta_clicked", {
section: "hero",
variant: "primary",
});
});
No API keys, no webhook setup, no additional configuration.
The Four Events That Matter Most Pre-Launch
Not every interaction needs an event. These four reveal the signals that matter for pre-launch validation.
cta_clicked
Tells you which call-to-action drives conversions. If your hero CTA fires 400 times and your pricing CTA fires 12 times, the pricing section has a problem.
document.querySelectorAll("[data-cta]").forEach((btn) => {
btn.addEventListener("click", () => {
OperatorStack.trackEvent("cta_clicked", {
section: btn.dataset.cta,
});
});
});
Set data-cta="hero", data-cta="pricing", or data-cta="footer" on each button. The event breakdown in your dashboard shows which CTA converts and which one visitors ignore.
pricing_viewed
Fires when a visitor scrolls to your pricing section. High pricing views with low signups means your price point or tier structure is blocking conversion.
const observer = new IntersectionObserver((entries) => {
if (entries[0].isIntersecting) {
OperatorStack.trackEvent("pricing_viewed", { section: "pricing" });
observer.disconnect(); // fire once per page load
}
});
observer.observe(document.getElementById("pricing"));
feature_interest
Shows which features visitors engage with before they decide to sign up or leave. If you list three features and one gets 10x the clicks, build that one first.
document.querySelectorAll("[data-feature]").forEach((el) => {
el.addEventListener("click", () => {
OperatorStack.trackEvent("feature_interest", {
feature: el.dataset.feature,
});
});
});
demo_started / demo_completed
If you have an embedded demo video or interactive walkthrough, tracking both start and completion gives you a drop-off rate. Drop-off above 60 percent means the demo is too long or not resonating.
const video = document.getElementById("demo-video");
video.addEventListener("play", () => OperatorStack.trackEvent("demo_started"));
video.addEventListener("ended", () => OperatorStack.trackEvent("demo_completed"));
You do not need to track waitlist_joined or form_submitted manually -- OperatorStack logs those automatically when visitors use the built-in widgets. Custom events cover the gaps: everything that happens before a visitor converts.
Reading Event Data in the Dashboard
Your Analytics tab shows each event name, its total count, and a property breakdown. If cta_clicked fired 200 times and 90 percent came from section: "hero" while 10 percent came from section: "pricing", the pricing CTA needs work.
Events are also linked to contact records. If a visitor fires feature_interest { feature: "analytics" } before signing up, that signal appears on their contact record. You can filter your contact list by pre-signup behavior to find your highest-intent leads.
Name events as past-tense actions: cta_clicked, pricing_viewed, form_submitted. It reads like a log of things that happened, which makes the event list easier to scan at a glance.
How Many Events Is Too Many?
For pre-launch, 4-6 events is enough. Track the CTA, the pricing section, and your top 2-3 feature items. More than that creates noise before you have enough traffic to act on the data.
Add or remove events after 2-4 weeks based on what you have learned. Custom events are measurement tools for a specific question, not permanent infrastructure.
Avoid firing events on mouseover or every scroll pixel. It fills your Analytics tab with data you cannot act on. Stick to events that represent clear intent: clicks, section views, and form interactions.
Frequently Asked Questions
Do I need a backend to use custom events?
No. trackEvent() is part of the client-side SDK. It sends data directly to OperatorStack without any server code or webhook configuration on your end.
When does a custom event appear in my dashboard?
Usually within 5-10 seconds. The SDK batches events in 5-second windows before sending them. For a new event name you have never tracked before, the first appearance may take up to 30 seconds.
Can I track custom events on form submissions?
Yes. Fire trackEvent() in your form submit handler. You can pass non-sensitive field values as properties -- like the selected plan tier or a feature category -- to add context to the event count.
Are custom events available on the free plan?
Yes. trackEvent() is part of the core SDK and available on all plans. Event counts appear in your Analytics tab alongside page views and referral data.