Skip to main content

Adobe Experience Platform Implementation: Data Layer variables correctly map to Adobe Experience Platform tags

A guide to validating the connection between your Data Layer and Adobe Experience Platform (AEP) variables to ensure accurate data flow into your XDM schemas.

Written by Luiza Gircoveanu

Overview

This check validates the mapping logic between your Data Layer and AEP. Even if your Data Layer is perfectly populated, the data is useless if it is not correctly assigned to the intended XDM (Experience Data Model) fields.

This check ensures that a value existing in your Data Layer (e.g., adobeDataLayer.page.name) actually appears in the correct path of the AEP network request (e.g., xdm.web.webPageDetails.name). Since AEP is strictly schema-driven, any mapping misalignment can result in data being rejected or miscategorized at the Edge Network.

Why it is important

Mapping errors are the primary cause of "skewed" or "missing" data in the Adobe Experience Platform:

  • XDM Validation Failures: If a Data Layer variable provides a string, but the AEP Schema expects an integer, the Edge Network may reject the entire hit. Correct mapping ensures data types match schema requirements.

  • Empty Customer Profiles: If the mapping points to a misspelled Data Layer key (e.g., pgeName instead of pageName), the AEP tag will fire, but the variable will be sent as "undefined," leading to empty customer profiles and broken segmentation.

  • Miscategorized Events: If an "Add to Cart" interaction from the Data Layer is incorrectly mapped to a "Purchase" event in XDM, your conversion funnels and revenue reports will be fundamentally broken.

  • Personalization Errors: Adobe Target and AEP Offer Decisioning rely on specific XDM fields. Mapping errors prevent real-time personalization from triggering for the correct audience segments.

Implementation

We have made implementing this check simple using ObservePoint Tag Rules. To validate your mapping, you must create a rule that dynamically compares the network payload sent to AEP against the actual state of your Data Layer.

1. Create Create the Rule - Go to Standards > Tag & Variable Rules and lick Create New Rule and Name it: AEP Mapping Validation - Page Name.

2. Pick the Tag and Set the comparison - Select Adobe Experience Platform Web SDK from the dropdown. Then, fill out the row exactly like this:

  • Variable: xdm.web.webPageDetails.name

  • Operator: Equals

  • Value Type: Change "String" to Data Layer

  • Value: adobeDataLayer.page.pageInfo.pageName

4. Save - Leave the WHEN section blank and click Save.

5. Run an Audit and set the rule created from the Standards section.

How it works: ObservePoint intercepts the outgoing network request and pulls the value from your xdm path. It then checks the browser memory for your data layer value. If both equal"Homepage - Summer Campaign", the rule passes. If they don't match or return undefined, it flags a failure.

Remediation

If mapping errors are detected, follow these steps to fix the logic in AEP Tags (Launch):

  • Audit Data Element Definitions: Open your Data Elements and verify the JavaScript Path. Ensure there are no typos and that you are referencing the correct global object (e.g., adobeDataLayer vs digitalData).

  • Review XDM Object Mapping: Check the actions within your Tag Rules where the Web SDK is configured. Ensure the correct Data Element is assigned to the correct field in the XDM Object creator.

  • Check for Timing Issues: If the Data Layer is populated after the mapping logic executes, the variable will be sent as empty. Ensure your Tag rules trigger on an event that occurs after the Data Layer is ready (e.g., a "Data Layer Push" event).

  • Inspect Custom Code Blocks: If you use custom JavaScript to transform Data Layer values, ensure the logic accounts for null or undefined values to prevent the script from crashing and stopping the tag firing entirely.

Data Layer Variable

XDM Path (Target)

Common Issue

page.pageInfo.pageName

web.webPageDetails.name

Mapping points to page_name (typo).

cart.cartID

_tenant.cart.cartID

Custom tenant ID missing from schema.

user.profile.id

identityMap.ECID[0].id

Mapping to the wrong identity namespace.

Conclusion

Mapping is where your business requirements meet your technical implementation. By validating that Data Layer variables correctly map to AEP Tags, you ensure that the "raw" data generated by your website is accurately transformed into "actionable" insights within the Adobe Experience Platform.

Did this answer your question?