Hi,
I am trying my hands on Web SDK, I tried using the XDM object data element, and its successful for me.
But when I try to use variable data element using both xdm object or data object, both ways tried, I do not see any calls in the debugger.
I will explain the one approach I am using, probably the same issue exists on the second one.
1. What I am doing is, setting the data element variable and then selecting the data object.
2. Then in the rule, I am setting the update variable action and mapping variable there.
3. Then I set the second action that sends the event, in that I am using event type "Web Webpagedetails Page Views" and setting data, I tried setting both xdm and data, only xdm and only data, but nothing is working.
Please help me find what I am setting wrong.
Any help is appreciated.
Solved! Go to Solution.
My issue is resolved, the bug was in custom code, I was using const s = content.__adobe.analytics; and then s object to set some custom variables, which was causing the issue, then I replaced it with content.__adobe.analytics only not using s object and it started working.
Thanks, @Ankit_Chaudhary and @bjoern__koth for all your help.
Hi @kaur_amneet
To debug you implementation use the following steps.
Also from your screenshot it seems like you are trying to send XDM object using data field which may through some errors during the send event call.
You can send your complete non-XDM data layer using data field and use data prep to map that to your schema.
@kaur_amneet as @Ankit_Chaudhary mentioned, the XDM object and data object are fundamentally different parts of the request payload.
Assuming Adobe has built in some checks on their end, dropping invalid data structures to not mess with your data on the Edge network.
To clarify
The XDM variables are the schemas you define on your request and can be set in the upper field.
It generates the actual "xdm" field in the payload.
The data data element is to be added in the lower field.
It generates the free-form data section in your payload which does not run through any validation checks on the Edge network. In here, you will see something like
data: {
__adobe: {
analytics: {
eVar99: "hello world"
},
target: {
// some target contextual stuff
},
}
// your own free form data
foo: "bar",
bla: "blub"
myArr: [1,2,3]
}
Views
Replies
Total Likes
Thank you @Ankit_Chaudhary and @bjoern__koth for your replies,
I checked the tutorial as well.
I am doing the following steps in setting up, I am trying both objects under the Data element.
1. Setting 2 Data elements, first one using XDM Object
1. a) Second one using Data Object in Variable data element
2. Then I am setting up the 2 separate rules for both.
3. Update Variable Action for XDM Object rule
3. a) Update Variable Action for Data object rule
4. Setting Send Event for XDM Object rule
4. a) Setting Send Event for Data Object rule
I am setting custom variables here in the update variable action.
Following this tutorial: https://www.youtube.com/watch?v=J4fuB2fki8o
Views
Replies
Total Likes
The library gets loaded, and I can even see the web SDK library in the AEP debugger, the only thing is, I don't see any calls in the network tab or any data passing.
Views
Replies
Total Likes
Use the XDM field to send XDM object not the data field.(Point 4 screenshot)
The configuration for sending data to Adobe analytics using data object seems fine, have you tried enabling logs over console? It might help you if any condition in your rules are crashing.
Views
Replies
Total Likes
Thank you @Ankit_Chaudhary for your instant response.
I changed the suggested solution, Set the XDM field for the XDM object in the Send event.
Still do not see processed data.
Again see only library info for WebSDK, in console, and in AEP Debugger.
Yes, I tried enabling logs, only see info related to the web SDK library and rules I am setting they are not showing up.
Hi @kaur_amneet
have you changed the consent settings in the WebSDK? What do you see as default consent when you open the WebSDK extension settings?
Views
Replies
Total Likes
I have these settings for consent
When you say "still do not see processed data", there are really no network requests in the debugger or in the network tab when filtering for "/ee" ?
Should look somewhat like this.
Also, what happens when you set neither XDM nor data object? Is that triggering any call?
Views
Replies
Total Likes
No Network request in the network tab on the AEP debugger and in Inspection tool.
To Answer the following question.
Also, what happens when you set neither XDM nor data object? Is that triggering any call?
Same thing I am seeing, I can see the library version of web SDK but no network request.
Views
Replies
Total Likes
@kaur_amneet it's getting quite interesting, can you share the URL over message here or you can connect with me over linkedin
With logging enabled, are you sure the rule's conditions are even met?
Just trying to rule out anything that may prevent the requestfrom firing.
Also, do you have any custom code in the "on before event send callback" of the extension that may return false?
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @kaur_amneet
and if you just add a custom code action like this, do you see it?
alert("hello world")
Cheers
Views
Replies
Total Likes
Views
Replies
Total Likes
hi @kaur_amneet
Try checking if your changes are being updated in the launch script on your page.
If everything is fine try creating a new library in launch and adding all your changes again and try rebuilding it, this has worked for me in the past several times.
Views
Replies
Total Likes
Thanks @Ankit_Chaudhary,
I checked and I am seeing launch file updated with the rule name.
Also checked on the console, and Build Property, and library are correct.
Also, Created a new build to publish my changes, still do not see the data _analytics object in the browser or in the AEP debugger.
Views
Replies
Total Likes
My issue is resolved, the bug was in custom code, I was using const s = content.__adobe.analytics; and then s object to set some custom variables, which was causing the issue, then I replaced it with content.__adobe.analytics only not using s object and it started working.
Thanks, @Ankit_Chaudhary and @bjoern__koth for all your help.
Views
Likes
Replies