Expand my Community achievements bar.

SOLVED

Revenue calculation thanks to recommendations using Web SDK

Avatar

Level 10

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?

Michael_Soprano_0-1743879159151.png

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 2

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 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 2

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 

Avatar

Level 10