Segment Web Event Debugger Overlay
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
This userscript helps developers debug Segment analytics implementations by intercepting and displaying events in real time. It hooks into window.analytics to capture track, page, identify, alias, and group events sent from the page. For each event, it shows the event name, type, properties, timestamp, and context in a visual panel. You can filter events by type (track, page, identify, alias, group), search for specific event names or property values, and highlight events that match configurable keywords. The script also provides a summary of event counts per type, captures failures, and persists a local log of events. You can export the event log as JSON or CSV for further analysis.
WHERE IT RUNS
The script runs on any webpage that uses the Segment analytics.js library (window.analytics). It works on development, staging, and production environments. It runs entirely within your browser, intercepting events before they are sent to Segment. It does not track your browsing history, access other tabs, or send any data externally. All event data is stored locally in memory and in GM_setValue for persistence.
HOW TO USE
After installation, open the panel by clicking the tool's icon in the BotGentz sidebar. The script automatically hooks into window.analytics on page load (if present). The panel displays a summary of event counts by type and a scrollable event log. Use the type filter (multi-select) to show only specific event types. Use the search box to filter events by event name or property values. Use the highlight keywords field to visually highlight matching terms in event names and properties. The log updates in real time as events are fired. Click "Clear log" to reset the event log. Use the export dropdown and button to download the event log as JSON or CSV.
THE TECHNICAL MECHANISM
This script uses method interception to capture Segment events without breaking the original analytics functionality. It stores references to the original window.analytics methods (track, page, identify, alias, group), then replaces them with wrapper functions that log the event data before calling the original methods. Each event is stored with a timestamp, event name, type, properties, and context. The script uses a maximum log size of 1000 events to prevent memory issues. The UI updates via a callback function that re-renders the event log and summary on each new event. The filtering system applies type filters, text search, and keyword highlighting to the event name and properties. Export converts the event log to JSON or CSV format. Persistence is handled via GM_setValue with periodic saving.
THE PANEL
The panel is draggable anywhere on the screen and remembers its position between sessions. It can be collapsed to a small floating bubble to minimize distraction, and expanded again with a single click. The panel's width can be adjusted, and pressing the Escape key closes it instantly. All settings—filters, search query, highlight keywords—are persisted locally using GM_setValue, so your preferences remain intact across page reloads and browser restarts.
PLEASE NOTE
This userscript requires the free BotGentz extension to function. The script only works on pages that load the Segment analytics.js library and expose window.analytics. The interception happens client-side and does not affect server-side events or data. The event log is stored locally in your browser and is not shared with anyone. The export feature allows you to download the log for debugging purposes. The script does not modify or block any events from being sent to Segment—it only logs them. No data from your browsing is transmitted anywhere—all processing occurs entirely in your browser.