> Part of the walkerOS documentation. Project overview and full index: <https://www.walkeros.io/llms.txt>

# Quickstart

Get started with walkerOS in minutes. These examples provide working code that you can copy, paste, and run immediately. All examples are maintained in our [quickstart app](https://github.com/elbwalker/walkerOS/tree/main/apps/quickstart) and tested with every release.

This quickstart uses [integrated mode](https://www.walkeros.io/docs/getting-started/modes/integrated.md): the collector runs inside your own code. You can switch how you package it later, see [operating modes](https://www.walkeros.io/docs/getting-started/modes.md).

Working with an AI assistant?

`@walkeros/mcp` runs locally without an account. Install the plugin and describe the flow you want: [With an AI assistant](https://www.walkeros.io/docs/apps/mcp.md).

## 1. Install packages[​](#1-install-packages "Direct link to 1. Install packages")

Install the collector package from npm:

```
npm install @walkeros/collector @walkeros/web-source-browser
```

## 2. Create basic setup[​](#2-create-basic-setup "Direct link to 2. Create basic setup")

Send your first event with a collector and a single console destination. This first snippet stays DOM-free so it runs in Node; the browser source for automatic DOM capture comes in the next step.

```
import { startFlow } from '@walkeros/collector';

const { elb } = await startFlow({
  destinations: {
    console: {
      code: {
        type: 'console',
        config: {},
        push: (event) => console.log('Event:', event.name),
      },
    },
  },
});

await elb('page view', { title: 'Home' });
// -> logs: Event: page view
```

## 3. Add destinations[​](#3-add-destinations "Direct link to 3. Add destinations")

Install destination packages and add them to your setup:

```
import { startFlow } from '@walkeros/collector';
import { sourceBrowser } from '@walkeros/web-source-browser';
import { destinationGtag } from '@walkeros/web-destination-gtag';
import { destinationAPI } from '@walkeros/web-destination-api';

export async function initializeWalker(): Promise<void> {
  const { collector, elb } = await startFlow({
    sources: {
      browser: {
        code: sourceBrowser,
        config: {
          settings: {
            pageview: true,
            session: true,
            elb: 'elb',
          },
        },
      },
    },
    destinations: {
      // Send events to your API
      api: {
        code: destinationAPI,
        config: {
          settings: {
            url: 'https://your-api.com/events',
          },
        },
      },

      // Send to Google Analytics 4
      ga4: {
        code: destinationGtag,
        config: {
          settings: {
            ga4: { measurementId: 'G-XXXXXXXXXX' },
          },
        },
      },
    },
  });

  window.walker = collector;
}
```

## 4. Add consent management[​](#4-add-consent-management "Direct link to 4. Add consent management")

Add consent requirements to your destinations:

```
export async function initializeWalker(): Promise<void> {
  const { collector, elb } = await startFlow({
    sources: {
      browser: {
        code: sourceBrowser,
        config: {
          settings: {
            pageview: true,
            session: true,
            elb: 'elb',
          },
        },
      },
    },
    destinations: {
      // API destination - requires functional consent
      api: {
        code: destinationAPI,
        config: {
          settings: {
            url: 'https://your-api.com/events',
          },
          consent: {
            functional: true,
          },
        },
      },

      // GA4 - requires analytics consent
      ga4: {
        code: destinationGtag,
        config: {
          settings: {
            ga4: { measurementId: 'G-XXXXXXXXXX' },
          },
          consent: {
            analytics: true,
          },
        },
      },
    },
  });

  window.walker = collector;

  // Set consent when user accepts/denies
  // This would typically come from your consent banner
  function handleConsentAccept() {
    elb('walker consent', {
      functional: true,
      analytics: true,
      marketing: true,
    });
  }

  function handleConsentDeny() {
    elb('walker consent', {
      functional: true,
      analytics: false,
      marketing: false,
    });
  }
}
```

## See your event[​](#see-your-event "Direct link to See your event")

The step 2 setup runs directly in Node. Save it as `index.mjs` (the import and top-level `await` need ES modules) and run:

```
node index.mjs
```

You should see:

```
Event: page view
```

That is the whole loop: an event pushed with `elb` reaching a destination. The browser setups in steps 3 and 4 verify the same way in your browser console once your app runs. To test flows offline with the CLI instead, see [bundled mode](https://www.walkeros.io/docs/getting-started/modes/bundled.md#see-your-event).

## Next steps[​](#next-steps "Direct link to Next steps")

* **[Send it to GA4](https://www.walkeros.io/docs/getting-started/ga4-ecommerce.md)**: the same event arriving live in GA4 DebugView
* **[DOM-based tagging](https://www.walkeros.io/docs/sources/web/browser/tagging/html-attributes.md)**: automatic tracking via data-elb attributes
* **[Event mapping](https://www.walkeros.io/docs/mapping.md)**: transform events before sending
* **[Operating modes](https://www.walkeros.io/docs/getting-started/modes.md)**: choose how to package and deploy
