Expand my Community achievements bar.

SOLVED

xdm object and data object coexisting

Avatar

Level 3

Hello,

Setup: Adobe Analytics using xdm, schema set through code in edit code area JS (btw there are a bunch of warnings in the code ie 'expected identifier and instead saw '=') of AEP WebSDK extension.

 

We are having an issue where a numeric event is not sending values on purchase (number of coupons used in the transaction), talking with experts here seems it should just work. The numeric event is not fired as data layer event but a parameter of purchase and then later turned into an event somehow to be shown in Workspace etc.

 

I should mention that this company is unusually stringent (the most in my career) on access to admin or even testing the purchase path, so I haven't QAd myself, so I can't confirm if the tools are failing or bad setup or CMS related, etc and all I do is try my best with the limited tools and visibility I have.

 

I've read about data object and how it is better so I'm thinking to use it, however would be great to know how to go about using both xdm and data object, at least for the custom event that we are troubleshooting as going full data object may be high LOE and could face politics, etc. By the way the eventN is in the JS code I mentioned above, wondering if could copy the content.xdm and add below or above another with data._ formatting or so.


Thanks!

 

R

 

1 Accepted Solution

Avatar

Correct answer by
Level 9

HI @Rafael_Sahagun ,

It should be pretty straight forward to implement an AA numeric event using either XDM or Data objects. You can follow these steps (taking an example that event1 is what we need to set with value 5),

  • Enable even1 in AA and set type as numeric
  • In data collection tracking call pass either of below fields to auto-populate this event in AA
    • xdm._experience.analytics.event1to100.event1.value = 5
    • data.__adobe.analytics.events = "event1=5"

This should increment event1 by 5. You can have mix of XDM and Data objects in your implementation but Data object is recommended to use for AA because,

  • It's implementation is very similar to how AppMeasurement used to populate AA fields
  • It helps in preventing collection of AA formatted field paths (like eVar, prop etc.) to AEP which don't make much sense there.

Cheers!

 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 9

HI @Rafael_Sahagun ,

It should be pretty straight forward to implement an AA numeric event using either XDM or Data objects. You can follow these steps (taking an example that event1 is what we need to set with value 5),

  • Enable even1 in AA and set type as numeric
  • In data collection tracking call pass either of below fields to auto-populate this event in AA
    • xdm._experience.analytics.event1to100.event1.value = 5
    • data.__adobe.analytics.events = "event1=5"

This should increment event1 by 5. You can have mix of XDM and Data objects in your implementation but Data object is recommended to use for AA because,

  • It's implementation is very similar to how AppMeasurement used to populate AA fields
  • It helps in preventing collection of AA formatted field paths (like eVar, prop etc.) to AEP which don't make much sense there.

Cheers!

 

Avatar

Community Advisor

One great thing about the Web SDK Variables and Update Variable actions is that you - if you have both the newest AppMeasurement in your old launch property and Web SDK version in your new property - you can export the props and eVars set through the UI as JSON and paste it into the JSON configuration of the Update Variable action which saves you a ton of time if you have setups that don't just rely on the custom code part of the action.

 

As I understand, in your case you are mostly filling the old "s" instance through code, which is also not a deal breaker.

 

you can define your own "s" instance there as well and paste preexisting code

 

content.__adobe = content.__adobe || { };
content.__adobe.analytics = content.__adobe.analytics || { };
let s = content.__adobe.analytics;

 
Another cool thing is that you won't need to fiddle around with linkTrackVars and linkTrackEvents anymore. Just skip them 

 

I discussed it here as well

Cheers from Switzerland!