Revenue calculation thanks to recommendations using Web SDK | Community
Skip to main content
Michael_Soprano
Level 10
April 5, 2025
Solved

Revenue calculation thanks to recommendations using Web SDK

  • April 5, 2025
  • 1 reply
  • 488 views

I would like to count how much revenue was generated through Recommendations. Does that mean that I should implement specific mbox in Thank-you-page which would count conversions?

 

Best answer by VikasOhlan

Hello @michael_soprano,

Yes, that's correct. If you want to track how much revenue is generated in Adobe Target for any activity, you need to implement a conversion mbox on your Thank You / Order Confirmation page. Only after that Target Revenue/Order based reporting metrics can be leveraged.

 

If you are using at.js, below is the snippet which you can use:

adobe.target.trackEvent({ mbox: "purchase", params: { "orderId": "123456", "orderTotal": "299.99", "productPurchasedId": "ABC123,XYZ456" } }); ​


If your implementation is based on alloy.js(Web SDK), use below snippet:

alloy("sendEvent", { "xdm": { "commerce": { "order": { "priceTotal": _satellite.getVar('totalRevenue'), "purchaseID": _satellite.getVar('orderID'), }, "purchases":{ "value": 1 } }, "_experience": { "decisioning": { "propositions": [ { "scope": "orderConfirmation" } ], "propositionEventType": { "display": 1 } } } } });​

Hope this helps! Let me know if you have any other questions.


Regards,

Vikas Ohlan
LinkedIn Profile 

1 reply

VikasOhlan
Adobe Employee
VikasOhlanAdobe EmployeeAccepted solution
Adobe Employee
April 5, 2025

Hello @michael_soprano,

Yes, that's correct. If you want to track how much revenue is generated in Adobe Target for any activity, you need to implement a conversion mbox on your Thank You / Order Confirmation page. Only after that Target Revenue/Order based reporting metrics can be leveraged.

 

If you are using at.js, below is the snippet which you can use:

adobe.target.trackEvent({ mbox: "purchase", params: { "orderId": "123456", "orderTotal": "299.99", "productPurchasedId": "ABC123,XYZ456" } }); ​


If your implementation is based on alloy.js(Web SDK), use below snippet:

alloy("sendEvent", { "xdm": { "commerce": { "order": { "priceTotal": _satellite.getVar('totalRevenue'), "purchaseID": _satellite.getVar('orderID'), }, "purchases":{ "value": 1 } }, "_experience": { "decisioning": { "propositions": [ { "scope": "orderConfirmation" } ], "propositionEventType": { "display": 1 } } } } });​

Hope this helps! Let me know if you have any other questions.


Regards,

Vikas Ohlan
LinkedIn Profile 

Michael_Soprano
Level 10
April 6, 2025