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

# d8a

<!-- -->

[Web](#)[ ](https://github.com/elbwalker/walkerOS/tree/main/packages/web/destinations/d8a)

<!-- -->

[Source code](https://github.com/elbwalker/walkerOS/tree/main/packages/web/destinations/d8a)[ ](https://www.npmjs.com/package/@walkeros/web-destination-d8a)

<!-- -->

[Package](https://www.npmjs.com/package/@walkeros/web-destination-d8a)

[d8a](https://d8a.tech/) is a GA4-compatible, warehouse-native analytics platform. The destination sends walkerOS events to the d8a web tracker using the GA4 gtag-style `d8a()` API, so existing GA4 mappings translate directly.

<!-- -->

Where this fits

d8a is a **web destination** in the walkerOS flow:

## Installation[​](#installation "Direct link to Installation")

```
npm install @walkeros/web-destination-d8a
```

* Integrated
* Bundled

```
import { startFlow } from '@walkeros/collector';
import { destinationD8a } from '@walkeros/web-destination-d8a';

await startFlow({
  destinations: {
    d8a: {
      code: destinationD8a,
      config: {
        settings: {
          property_id: '80e1d6d0-560d-419f-ac2a-fe9281e93386',
          server_container_url:
            'https://global.t.d8a.tech/80e1d6d0-560d-419f-ac2a-fe9281e93386/d/c',
        },
      },
    },
  },
});
```

Add to your `flow.json` destinations:

```
"destinations": {
  "d8a": {
    "package": "@walkeros/web-destination-d8a",
    "config": {
      "settings": {
        "property_id": "80e1d6d0-560d-419f-ac2a-fe9281e93386",
        "server_container_url": "https://global.t.d8a.tech/80e1d6d0-560d-419f-ac2a-fe9281e93386/d/c"
      }
    }
  }
}
```

[See bundled mode setup](https://www.walkeros.io/docs/getting-started/modes/bundled.md) | [CLI reference](https://www.walkeros.io/docs/apps/cli.md)

## Event Mapping[​](#event-mapping "Direct link to Event Mapping")

By default, walkerOS event names are converted to snake\_case and sent with the configured property ID as `send_to`. Override the name and shape per event the same way you would for GA4:

```
mapping: {
  order: {
    complete: {
      name: 'purchase',
      data: {
        map: {
          transaction_id: 'data.id',
          value: 'data.total',
          currency: { key: 'data.currency', value: 'EUR' },
        },
      },
    },
  },
}
```

This produces:

```
d8a('event', 'purchase', {
  transaction_id: '0rd3r1d',
  value: 555,
  currency: 'EUR',
  send_to: '80e1d6d0-560d-419f-ac2a-fe9281e93386',
});
```

## Consent Mode[​](#consent-mode "Direct link to Consent Mode")

The destination supports d8a's gtag-compatible consent mode. By default, walkerOS consent keys map to d8a consent fields:

| walkerOS consent key | d8a consent fields                                 |
| -------------------- | -------------------------------------------------- |
| `marketing`          | `ad_storage`, `ad_user_data`, `ad_personalization` |
| `functional`         | `analytics_storage`                                |

Disable consent mode with `como: false`, or provide a custom mapping via the `como` setting.

## Configuration[​](#configuration "Direct link to Configuration")

This <!-- -->destination<!-- --> uses the standard <!-- -->destination<!-- --> config wrapper (consent, data, env, id, ...). For the shared fields see [destination<!-- --> configuration](https://www.walkeros.io/docs/destinations.md#configuration). Package-specific fields live under `config.settings` and are listed below.

## Settings[​](#settings "Direct link to Settings")

| Property                      | Type                | Description                                                                          | More |
| ----------------------------- | ------------------- | ------------------------------------------------------------------------------------ | ---- |
| `property_id*`                | `string`            | d8a property ID                                                                      |      |
| `server_container_url*`       | `string`            | d8a collector URL for the property                                                   |      |
| `como`                        | `boolean \| object` | Consent mode configuration: false (disabled), true (use defaults), or custom mapping |      |
| `data`                        | `any`               | Custom data mapping configuration                                                    |      |
| `dataLayerName`               | `string`            | Name of the d8a command queue (default: d8aLayer)                                    |      |
| `globalName`                  | `string`            | Name of the global d8a function (default: d8a)                                       |      |
| `send_page_view`              | `boolean`           | Enable automatic pageview tracking                                                   |      |
| `snakeCase`                   | `boolean`           | Convert event names to snake\_case                                                   |      |
| `debug_mode`                  | `boolean`           | Enable debug mode                                                                    |      |
| `cookie_domain`               | `string`            | Cookie domain strategy: auto, none, or a specific domain                             |      |
| `cookie_path`                 | `string`            | Cookie path                                                                          |      |
| `cookie_expires`              | `number`            | Cookie lifetime in seconds                                                           |      |
| `cookie_flags`                | `string`            | Raw cookie flags                                                                     |      |
| `cookie_prefix`               | `string`            | Cookie name prefix                                                                   |      |
| `cookie_update`               | `boolean`           | Refresh cookie expirations on activity                                               |      |
| `session_timeout_ms`          | `number`            | Session timeout window in milliseconds                                               |      |
| `session_engagement_time_sec` | `number`            | Minimum engaged time in seconds                                                      |      |
| `flush_interval_ms`           | `number`            | Flush interval in milliseconds                                                       |      |
| `max_batch_size`              | `number`            | Maximum batch size                                                                   |      |
| `user_id`                     | `string`            | GA4-style user ID                                                                    |      |
| `client_id`                   | `string`            | Client ID override                                                                   |      |
| `campaign_id`                 | `string`            |                                                                                      |      |
| `campaign_source`             | `string`            |                                                                                      |      |
| `campaign_medium`             | `string`            |                                                                                      |      |
| `campaign_name`               | `string`            |                                                                                      |      |
| `campaign_term`               | `string`            |                                                                                      |      |
| `campaign_content`            | `string`            |                                                                                      |      |
| `page_location`               | `string`            |                                                                                      |      |
| `page_title`                  | `string`            |                                                                                      |      |
| `page_referrer`               | `string`            |                                                                                      |      |
| `content_group`               | `string`            |                                                                                      |      |
| `language`                    | `string`            |                                                                                      |      |
| `screen_resolution`           | `string`            |                                                                                      |      |
| `ignore_referrer`             | `boolean`           |                                                                                      |      |
| `site_search_enabled`         | `boolean`           |                                                                                      |      |
| `site_search_query_params`    | `string \| array`   |                                                                                      |      |
| `outbound_clicks_enabled`     | `boolean`           |                                                                                      |      |
| `outbound_exclude_domains`    | `string \| array`   |                                                                                      |      |
| `file_downloads_enabled`      | `boolean`           |                                                                                      |      |
| `file_download_extensions`    | `string \| array`   |                                                                                      |      |

\* Required fields

## Mapping[​](#mapping "Direct link to Mapping")

This package does not define custom rule-level settings. For the standard rule fields (consent, condition, data, batch, name, policy) see [mapping](https://www.walkeros.io/docs/mapping.md).

## Examples

### Add to cart

A product add event is mapped to the d8a add\_to\_cart event with item details and value.

Event

```
{
  "name": "product add",
  "data": {
    "id": "ers",
    "name": "Everyday Ruck Snack",
    "color": "black",
    "size": "l",
    "price": 420
  },
  "context": {
    "shopping": [
      "intent",
      0
    ]
  },
  "globals": {
    "pagegroup": "shop"
  },
  "custom": {
    "completely": "random"
  },
  "user": {
    "id": "us3r",
    "device": "c00k13",
    "session": "s3ss10n"
  },
  "nested": [],
  "consent": {
    "functional": true
  },
  "id": "53686343daae289e",
  "trigger": "click",
  "entity": "product",
  "action": "add",
  "timestamp": 1700000301,
  "timing": 3.14,
  "source": {
    "count": 1,
    "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
    "type": "collector",
    "schema": "4"
  }
}
```

Mapping

```
{
  "name": "add_to_cart",
  "include": [
    "data"
  ],
  "data": {
    "map": {
      "currency": {
        "value": "EUR",
        "key": "data.currency"
      },
      "value": "data.price",
      "items": {
        "loop": [
          "this",
          {
            "map": {
              "item_id": "data.id",
              "item_variant": "data.color",
              "quantity": {
                "value": 1,
                "key": "data.quantity"
              }
            }
          }
        ]
      }
    }
  }
}
```

Out

```
d8a("event", "add_to_cart", {
  "currency": "EUR",
  "value": 420,
  "items": [
    {
      "item_id": "ers",
      "item_variant": "black",
      "quantity": 1
    }
  ],
  "data_id": "ers",
  "data_name": "Everyday Ruck Snack",
  "data_color": "black",
  "data_size": "l",
  "data_price": 420,
  "send_to": "80e1d6d0-560d-419f-ac2a-fe9281e93386"
})
```

### Consent mode

A walker consent command updates d8a using gtag consent mode parameters.

Event

```
{
  "marketing": true,
  "functional": true
}
```

Out

```
d8a("consent", "default", {
  "ad_storage": "denied",
  "ad_user_data": "denied",
  "ad_personalization": "denied",
  "analytics_storage": "denied"
});

d8a("consent", "update", {
  "ad_storage": "granted",
  "ad_user_data": "granted",
  "ad_personalization": "granted",
  "analytics_storage": "granted"
})
```

### Initialization

The destination installs d8a and configures a property with its server container URL.

Event

```
{
  "settings": {
    "property_id": "80e1d6d0-560d-419f-ac2a-fe9281e93386",
    "server_container_url": "https://global.t.d8a.tech/80e1d6d0-560d-419f-ac2a-fe9281e93386/d/c"
  }
}
```

Out

```
d8a("js", {});

d8a("config", "80e1d6d0-560d-419f-ac2a-fe9281e93386", {
  "server_container_url": "https://global.t.d8a.tech/80e1d6d0-560d-419f-ac2a-fe9281e93386/d/c"
})
```

### Page view

A page view event is forwarded as a d8a page\_view event.

Event

```
{
  "name": "page view",
  "data": {
    "domain": "www.example.com",
    "title": "walkerOS documentation",
    "referrer": "https://www.walkeros.io/",
    "search": "?foo=bar",
    "hash": "#hash",
    "id": "/docs/"
  },
  "context": {
    "dev": [
      "test",
      1
    ]
  },
  "globals": {
    "pagegroup": "docs"
  },
  "custom": {
    "completely": "random"
  },
  "user": {
    "id": "us3r",
    "device": "c00k13",
    "session": "s3ss10n"
  },
  "nested": [
    {
      "entity": "child",
      "data": {
        "is": "subordinated"
      }
    }
  ],
  "consent": {
    "functional": true
  },
  "id": "98ce89d744fd90e2",
  "trigger": "load",
  "entity": "page",
  "action": "view",
  "timestamp": 1700000300,
  "timing": 3.14,
  "source": {
    "count": 1,
    "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
    "type": "collector",
    "schema": "4"
  }
}
```

Out

```
d8a("event", "page_view", {
  "send_to": "80e1d6d0-560d-419f-ac2a-fe9281e93386"
})
```

### Purchase

An order complete event is mapped to the d8a purchase event with transaction details and nested product items.

Event

```
{
  "name": "order complete",
  "data": {
    "id": "0rd3r1d",
    "currency": "EUR",
    "shipping": 5.22,
    "taxes": 73.76,
    "total": 555
  },
  "context": {
    "shopping": [
      "complete",
      0
    ]
  },
  "globals": {
    "pagegroup": "shop"
  },
  "custom": {
    "completely": "random"
  },
  "user": {
    "id": "us3r",
    "device": "c00k13",
    "session": "s3ss10n"
  },
  "nested": [
    {
      "entity": "product",
      "data": {
        "id": "ers",
        "name": "Everyday Ruck Snack",
        "color": "black",
        "size": "l",
        "price": 420
      },
      "context": {
        "shopping": [
          "complete",
          0
        ]
      },
      "nested": []
    },
    {
      "entity": "product",
      "data": {
        "id": "cc",
        "name": "Cool Cap",
        "size": "one size",
        "price": 42
      },
      "context": {
        "shopping": [
          "complete",
          0
        ]
      },
      "nested": []
    },
    {
      "entity": "gift",
      "data": {
        "name": "Surprise"
      },
      "context": {
        "shopping": [
          "complete",
          0
        ]
      },
      "nested": []
    }
  ],
  "consent": {
    "functional": true
  },
  "id": "76231d9e723649a0",
  "trigger": "load",
  "entity": "order",
  "action": "complete",
  "timestamp": 1700000302,
  "timing": 3.14,
  "source": {
    "count": 1,
    "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
    "type": "collector",
    "schema": "4"
  }
}
```

Mapping

```
{
  "name": "purchase",
  "include": [
    "data",
    "context"
  ],
  "data": {
    "map": {
      "transaction_id": "data.id",
      "value": "data.total",
      "tax": "data.taxes",
      "shipping": "data.shipping",
      "currency": {
        "key": "data.currency",
        "value": "EUR"
      },
      "items": {
        "loop": [
          "nested",
          {
            "condition": {
              "$code": "e=>{const a=e;return k(e)&&\"product\"===a.entity}"
            },
            "map": {
              "item_id": "data.id",
              "item_name": "data.name",
              "quantity": {
                "key": "data.quantity",
                "value": 1
              }
            }
          }
        ]
      }
    }
  }
}
```

Out

```
d8a("event", "purchase", {
  "transaction_id": "0rd3r1d",
  "value": 555,
  "tax": 73.76,
  "shipping": 5.22,
  "currency": "EUR",
  "items": [
    {
      "item_id": "ers",
      "item_name": "Everyday Ruck Snack",
      "quantity": 1
    },
    {
      "item_id": "cc",
      "item_name": "Cool Cap",
      "quantity": 1
    }
  ],
  "data_id": "0rd3r1d",
  "data_currency": "EUR",
  "data_shipping": 5.22,
  "data_taxes": 73.76,
  "data_total": 555,
  "context_shopping": "complete",
  "send_to": "80e1d6d0-560d-419f-ac2a-fe9281e93386"
})
```
