d8a
d8a 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.
d8a is a web destination in the walkerOS flow:
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"
}
}
}
}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.value',
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',
});Page views
d8a sends a page_view itself when the tracker starts. A walkerOS
page view event (the browser source sends one by default) arrives as a
second page_view, so each page counts twice. Set send_page_view: false, or
ignore the walkerOS event with a rule (page: { view: { ignore: true } }).
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 |
The first consent command sets every mapped field to denied before it
applies the update. A walkerOS consent key the mapping does not name changes
nothing: if your consent source reports analytics consent as analytics,
analytics_storage stays denied until you map it, like
como: { analytics: 'analytics_storage', marketing: ['ad_storage', 'ad_user_data', 'ad_personalization'] }.
Disable consent mode with como: false.
Until the first consent command, d8a counts consent as granted. Without
config.consent, as in the installation example, the page view d8a sends when
the tracker starts goes out as granted, and the _d8a cookies are set before a
later denial and stay after it. With config.consent, such as
{ functional: true }, the collector holds the destination until that consent
is granted (see consent management), so the tracker
starts and sends its page view only after the grant.
Configuration
This destination uses the standard destination config wrapper (consent, data, env, id, ...). For the shared fields see destination configuration. Package-specific fields live under config.settings and are listed below.
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 | d8a sends a page_view when the tracker starts. Default true; set false when the flow sends its own page view events | |
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 |
Mapping
This package does not define custom rule-level settings. For the standard rule fields (consent, condition, data, batch, name, policy) see mapping.
Examples
Add to cart
A product add event is mapped to the d8a add_to_cart event with item details and value.
{
"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": "83e860384d50953f",
"trigger": "click",
"entity": "product",
"action": "add",
"timestamp": 1700000301,
"timing": 3.14,
"source": {
"count": 1,
"trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
"type": "collector",
"schema": "4"
}
}{
"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"
}
}
}
]
}
}
}
}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.
{
"marketing": true,
"functional": true
}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.
{
"settings": {
"property_id": "80e1d6d0-560d-419f-ac2a-fe9281e93386",
"server_container_url": "https://global.t.d8a.tech/80e1d6d0-560d-419f-ac2a-fe9281e93386/d/c"
}
}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.
{
"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": "f0cc5f6fec3d8eeb",
"trigger": "load",
"entity": "page",
"action": "view",
"timestamp": 1700000300,
"timing": 3.14,
"source": {
"count": 1,
"trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
"type": "collector",
"schema": "4"
}
}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.
{
"name": "order complete",
"data": {
"id": "0rd3r1d",
"currency": "EUR",
"shipping": 5.22,
"taxes": 73.76,
"value": 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": "235d0d7bd7a213f2",
"trigger": "load",
"entity": "order",
"action": "complete",
"timestamp": 1700000302,
"timing": 3.14,
"source": {
"count": 1,
"trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
"type": "collector",
"schema": "4"
}
}{
"name": "purchase",
"include": [
"data",
"context"
],
"data": {
"map": {
"transaction_id": "data.id",
"value": "data.value",
"tax": "data.taxes",
"shipping": "data.shipping",
"currency": {
"key": "data.currency",
"value": "EUR"
},
"items": {
"loop": [
"nested",
{
"condition": {
"$code": "e=>\"object\"==typeof e&&null!==e&&\"entity\"in e&&\"product\"===e.entity"
},
"map": {
"item_id": "data.id",
"item_name": "data.name",
"quantity": {
"key": "data.quantity",
"value": 1
}
}
}
]
}
}
}
}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_value": 555,
"context_shopping": "complete",
"send_to": "80e1d6d0-560d-419f-ac2a-fe9281e93386"
})