Sources
Sources are the entry points for event data in walkerOS. They capture events from different environments and formats, then transform them into standardized events that the collector can process.
How sources work
Sources capture events in their native format and send them to the collector:
Available sources
Web
Browser
Captures events from web pages using DOM attributes:
- DOM interactions (clicks, form submissions, visibility)
- Automatic session and pageview tracking
- Custom data attributes (
data-elb-*)
dataLayer
Integrates with existing analytics implementations:
- Works with GA4 and GTM dataLayer
- Event transformation and filtering
- Gradual migration support
Server
Server sources accept HTTP requests containing walkerOS events and forward them to the collector.
Express
Turn-key HTTP event collection server with Express.js:
- Standalone or embedded: Start server automatically or integrate with existing Express app
- CORS support and health checks
- Pixel tracking with 1x1 transparent GIF
Fetch
Web Standard Fetch API source for edge and serverless platforms:
- Platform agnostic: Cloudflare Workers, Vercel Edge, Deno, Bun, Node.js 18+
- Web Standard
(Request) => Responsesignature - Batch processing and CORS support
AWS Lambda
AWS Lambda HTTP handler for event collection:
- Multi-platform: API Gateway REST (v1), HTTP API (v2), Function URLs
- Auto-detection of API Gateway version
- Pixel tracking and health checks
GCP Cloud Functions
Google Cloud Functions HTTP handler for event collection:
- Plug-and-play: Direct assignment to Cloud Functions handler
- Batch processing support
- Configurable CORS
Basic setup
Sources are configured in startFlow:
Primary source
startFlow returns an elb function based on your sources:
- With sources: Returns first source's
pushmethod (enhanced features) - Multiple sources: First source is primary by default
- No sources: Returns
collector.push(basic functionality)
Override primary source
Reactive event handling
Sources can react to collector events via the optional on method:
Available Events:
consent- Consent state changessession- Session lifecycle eventsready- Collector ready staterun- Collector run events
Creating custom sources
See Create Your Own Source for a complete guide to building custom sources.
Next steps
- Browser source - DOM-based tracking
- DataLayer source - Legacy integration
- Create your own - Custom source guide