How to print Activity ID or Name on the browser console for debugging?
I have a react application which has Adobe Target SDK deployed on the server side and using at.js 2.x.
How can I print the Activity ID or Activity Name on the browser console so that it's useful for debugging or checking if the correct offer is applied?
Below is my current TriggerView function:
I would like to console log the Activity ID after the success call.
export function triggerView(viewName, mbox) {
if (typeof adobe !== 'undefined' && adobe.target && typeof adobe.target.triggerView === 'function') {
adobe.target.getOffer({
"mbox": mbox,
"success": function (offer) {
if (offer.length) {
adobe.target.applyOffer({
"mbox": mbox,
"offer": offer
});
}
},
"error": function (status, error) {
console.log('Error', status, error);
},
"timeout": 3000
});
