In our last Edge Data Collection Concepts blog, we introduced the concept of the data object as a flexible and schema-free method to collect data for Adobe Experience Cloud solutions. In this post, we'll dive deeper into how you can use the data object to implement Adobe Analytics. Whether you're migrating from AppMeasurement.js or starting fresh with Web SDK, the data object offers a straightforward method of implementation.
When configured as discussed below, the data object will contain values immediately recognizable to Analytics and to implementers of Analytics. If you previously set s.eVar1 to a value of "foo", setting data.__adobe.analytics.eVar1 to "foo" achieves the same result and can be done very simply in the Tags interface similarly to how those values can be set when using AppMeasurement.
Implementing the Data Object
The data object starts as an empty variable, and we can build up and clear values with each of our rules in a way that is similar to how we set and clear variables with AppMeasurement "Set Variables" and "Clear Variables" actions in Adobe Tags today. Follow these steps to get started with the data object:
- Ensure that your datastream has Adobe Analytics enabled
- Install the Adobe Experience Platform Web SDK extension in your Tags property and configure your datastream IDs
- Create a data element using the AEP Web SDK extension with the “Variable” type and enable the Adobe Analytics solution
Once the data element is ready, populate the object in your rules using the “Update variable” action type in the Web SDK extension. Add your variable data element and begin mapping.

Map your eVars and props to data elements, set events, and pass context data and additional properties.

Don’t forget to check the “Clear existing value” box clear the data object before setting values. For example, if you set values in the data object in a page view rule, you may want to clear those variables before sending subsequent link clicks on the same page. This works as if you used the "Clear Variables" action before "Set Variables" action with AppMeasurement.

Once your values are mapped, be sure to add the data object data element in your "Send event" action.

Migrating Custom Code
The "Update variable" action also allows you to write custom code to the data object. You can write values directly to the content.__adobe.analytics paths, for example, content.__adobe.analytics.eVar1 = "foo". The data object field mapping documentation is particularly helpful for this approach.
The custom code editor in the "Update variable" action can also be used to migrate the s object from an existing AppMeasurement implementation. It’s important to note that the s object is specific to AppMeasurement, so it will need to be migrated as you move to Web SDK. Using the approach below, we set the variable s to content.__adobe.analytics so that anything we previously wrote to the s object is now writing to the new Analytics path.

Validating Data
Validating your data object is straightforward using the Network tab in your browser’s developer tools:
- Open the Network tab and reload the page
- Find your Web SDK calls in the Network tab by filtering for /ee
- Select the call and expand the request payload and verify the data values

You can still use the AEP Debugger Extension or Adobe Assurance for validation if those are your preferred methods. These tools will also allow you to inspect your Edge calls and verify the data object.
Keep in mind that if you aren’t setting the XDM variable in your Tags implementation, some automatically collected XDM values will still appear in the payload.
Conclusion
Implementing the data object provides a powerful and intuitive way to migrate your Adobe Analytics implementation to Web SDK. This approach offers familiar methods of setting and clearing variables along with flexible custom code, while providing modernized data collection. Keep in mind that the data object isn't limited to Analytics – next time we'll explore how it can support Adobe Target, too!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.