Docs
Auto-Capture
One script tag captures UI interactions automatically — clicks, navigations, form submissions, and page views — with no further code changes. Perfect for session context around your manually tracked events.
Setup
Add the script to your HTML <head> and initialize it with your public key (safe to expose — it can only submit events, never read data):
<script src="https://cdn.softechlog.com/capture@1.0/stl_capture.js"></script>
<script>
Softechlog.init("stl_pk_xxxxxxxxxxxx");
</script>Identify the current user
Call once on login or page load when the user is known. Until then, events are attributed to an anonymous visitor:
Softechlog.identify({
id: currentUser.id, // required
name: currentUser.name, // optional
email: currentUser.email, // optional
});What gets auto-captured
| Trigger | Action name | Captured data |
|---|---|---|
| Button click | ui.button_clicked | text, selector, page_url |
| Link click | ui.link_clicked | text, href, page_url |
| Form submit | ui.form_submitted | form name/id, page_url |
| Page view | ui.page_viewed | url, title, referrer |
Sessions
Auto-captured events are grouped into browsing sessions automatically. Each session records its starting page, duration, and event count — browse them in the dashboard under Sessions, and drill into a session to replay the event timeline.
Manual tracking from the browser
For meaningful actions outside the auto-capture scope, you can also track custom events with the same script:
Softechlog.track("custom.event", { extra: "metadata" });Events sent from the browser are marked capture_mode: auto, so you can always separate them from server-tracked events when filtering.