Greetings!
I'm currently testing the Web SDK (Alloy) to handle everything related to Target.
Most of my activities are written form based and currently I'm struggling to find something similar to the old school "adobe.target.trackEvent()" function to count e.g. simple clicks of a button.
Normally I would write something like this:
adobe.target.trackEvent({
"mbox": "click-mbox"
});
How would i write the same via Alloy?
I found this in the documentation (https://experienceleague.adobe.com/docs/experience-platform/edge/personalization/adobe-target/web-sd...), but to be honest I don't really get it.
I understand that we are now using
alloy("sendEvent", {
…
});
but i couldn't figure out where to pass the "click-mbox" value.
Am I missing something? Thank you in advance!
Solved! Go to Solution.
Views
Replies
Total Likes
As per example above "click-mbox" is the mbox name.
When you're using the WebSDK, you can use
if you look at the terminology,
Scope: The scope of the decision. In Target, the scope is the mBox. The global mBox is the __view__ scope.
So in your above example you can add mbox name like below.
alloy("sendEvent", {
renderDecisions: true,
xdm: { ...},
decisionScopes: ["click-mbox"]
});
Hope this helps.
As per example above "click-mbox" is the mbox name.
When you're using the WebSDK, you can use
if you look at the terminology,
Scope: The scope of the decision. In Target, the scope is the mBox. The global mBox is the __view__ scope.
So in your above example you can add mbox name like below.
alloy("sendEvent", {
renderDecisions: true,
xdm: { ...},
decisionScopes: ["click-mbox"]
});
Hope this helps.
Hi @Gokul_Agiwal,
thank you very much for your quick reply! I'll take a closer look at the whole thing in the next few days but for now it seems to be working. Thank you for the informations!
Have a nice day and all the best.
Hi @Gokul_Agiwal ,
i have used the same code but when I check my target report the conversion data is still showing as 0.
I have configured the goal metric as conversion - viewed an mbox
please help me!
Views
Replies
Total Likes
Views
Like
Replies