Skip to main content
Ask your AI

d8a

Web Source code Package

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.

Where this fits

d8a is a web destination in the walkerOS flow:

Installation​

npm install @walkeros/web-destination-d8a
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',
        },
      },
    },
  },
});

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 } }).

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

walkerOS consent keyd8a consent fields
marketingad_storage, ad_user_data, ad_personalization
functionalanalytics_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​

PropertyTypeDescriptionMore
property_id*stringd8a property ID
server_container_url*stringd8a collector URL for the property
comoboolean | objectConsent mode configuration: false (disabled), true (use defaults), or custom mapping
dataanyCustom data mapping configuration
dataLayerNamestringName of the d8a command queue (default: d8aLayer)
globalNamestringName of the global d8a function (default: d8a)
send_page_viewbooleand8a sends a page_view when the tracker starts. Default true; set false when the flow sends its own page view events
snakeCasebooleanConvert event names to snake_case
debug_modebooleanEnable debug mode
cookie_domainstringCookie domain strategy: auto, none, or a specific domain
cookie_pathstringCookie path
cookie_expiresnumberCookie lifetime in seconds
cookie_flagsstringRaw cookie flags
cookie_prefixstringCookie name prefix
cookie_updatebooleanRefresh cookie expirations on activity
session_timeout_msnumberSession timeout window in milliseconds
session_engagement_time_secnumberMinimum engaged time in seconds
flush_interval_msnumberFlush interval in milliseconds
max_batch_sizenumberMaximum batch size
user_idstringGA4-style user ID
client_idstringClient ID override
campaign_idstring
campaign_sourcestring
campaign_mediumstring
campaign_namestring
campaign_termstring
campaign_contentstring
page_locationstring
page_titlestring
page_referrerstring
content_groupstring
languagestring
screen_resolutionstring
ignore_referrerboolean
site_search_enabledboolean
site_search_query_paramsstring | array
outbound_clicks_enabledboolean
outbound_exclude_domainsstring | array
file_downloads_enabledboolean
file_download_extensionsstring | array
* Required fields

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.

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": "83e860384d50953f",
  "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": "f0cc5f6fec3d8eeb",
  "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,
    "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"
  }
}
Mapping
{
  "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
              }
            }
          }
        ]
      }
    }
  }
}
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_value": 555,
  "context_shopping": "complete",
  "send_to": "80e1d6d0-560d-419f-ac2a-fe9281e93386"
})
💡 Need implementation support?
elbwalker offers hands-on support: setup review, measurement planning, destination mapping, and live troubleshooting. Book a 2-hour session (€399)