adobe.target.trackEvent() failing while getOffer() is working
Hi,
I am trying to track some CTAs and I am using trackEvent method for that. But when I am clicking on the button, the request goes into 400 status.
The workaround to this I opted is to go for getOffer() method but just curious to see the reason behind failure of trackEvent method. Any help will be much appreciated. thanks!
Below is the code -
el.addEventListener('click', function (e) {
e.preventDefault();
console.log("CTA clicked")
adobe.target.trackEvent({
"mbox": "carouselCTA"
});
// adobe.target.getOffer({
// "mbox": "carouselCTA",
// "success": function (offer) {
// adobe.target.applyOffer({
// "mbox": "carouselCTA",
// "offer": offer
// });
// },
// "error": function (status, error) {
// console.log('Error', status, error);
// }
// });
setTimeout(function () {
window.open(el.href, '_blank');
}, 1000);
});
Target version - 2.3.2
