Weekly live AEP workshops every Friday - reserve your seat →
Student question · Web SDK

Adobe Tags data elements: enterprise best practices

Designing reusable Adobe Tags data elements: data layer standards, null handling, SPA timing, governance and the flow from data layer to AEP dataset.

Quick answer

Good data elements read from a standardised data layer, are reused across rules, return safe defaults instead of null or undefined, and are documented with an owner and definition. In single-page apps, update the data layer first and then fire a custom event so rules read fresh values. Changes are versioned and tested so one team cannot break another.

The end-to-end flow

Data layer to datasetDATA LAYER TO DATASET1Data layerdigitalData2Data elementreusable3Tags ruleevent4Web SDKsendEvent5XDMschema6AEP dataset
From the page to the dataset.

Five design rules

  1. Standardise the data layer — one structure and naming convention for every team.
  2. Create reusable data elements — page name, user ID, product ID, transaction value.
  3. Add validation and defaults — handle null, undefined and invalid values.
  4. Govern — document owner, source, type, definition and usage.
  5. Control change — approvals, versioning and QA.

Safe defaults

var value = window.digitalData && digitalData.user && digitalData.user.name;
return value != null && value !== "" ? value : "Unknown";

Single-page apps

There is no full page load, so listen for route changes or application events. Update the data layer before triggering the rule:

window.digitalData.page.pageInfo.pageName = "Product Details";
_satellite.track("productView");

When the data layer changes

Renaming product.id to product.productId silently breaks every data element that reads the old path. Treat data-layer changes as releases with a contract, and test data elements before deploying.

Frequently asked questions

XDM object data element or individual mappings?

An XDM object data element maps many fields at once and is easier to govern; individual mappings are simpler for small implementations.

The value is right in the browser but wrong in AEP - why?

Check the XDM mapping in the rule, data element type conversion and any datastream mapping or overrides.

Last updated:

Ready to move your Adobe MarTech program forward?

Consulting for enterprise teams, training for professionals. Tell us where you are today.

WhatsApp