@walkeros/web-source-datalayer
Version:
DataLayer source for walkerOS
56 lines (38 loc) • 1.67 kB
Markdown
<p align="left">
<a href="https://elbwalker.com">
<img title="elbwalker" src='https://www.elbwalker.com/img/elbwalker_logo.png' width="256px"/>
</a>
</p>
This package provides a dataLayer source for walkerOS. It allows you to process
events from a dataLayer and send them to the walkerOS collector.
[](https://www.elbwalker.com/docs/sources/datalayer/)
walkerOS follows a **source → collector → destination** architecture:
- **Sources**: Capture events from various environments (browser DOM, dataLayer,
server requests)
- **Collector**: Processes, validates, and routes events with consent awareness
- **Destinations**: Send processed events to analytics platforms (GA4, Meta,
custom APIs)
This dataLayer source monitors the browser's dataLayer (commonly used with
Google Tag Manager) and transforms existing gtag() calls and dataLayer.push()
events into standardized walkerOS events, enabling seamless migration from
traditional dataLayer implementations.
## Installation
```sh
npm install @walkeros/web-source-datalayer
```
## Usage
Here's a basic example of how to use the dataLayer source:
```typescript
import { elb } from '@walkeros/collector';
import { sourceDataLayer } from '@walkeros/web-source-datalayer';
sourceDataLayer({ elb });
```
Feel free to contribute by submitting an
[](https://github.com/elbwalker/walkerOS/issues), starting a
[](https://github.com/elbwalker/walkerOS/discussions), or getting in
[](https://calendly.com/elb-alexander/30min).
This project is licensed under the MIT License.