@bkrane2 Try the snippet below, it adds a click event listener to all anchor (<a>) tags within Target offers:
document.querySelectorAll('.at-element-marker a').forEach(anchor => {
anchor.addEventListener('click', () => {
adobe.target.trackEvent({
mbox: "mbox-cta-click",
params: {
ctaSource: "${offer.id}"
}
});
});
});
Then, use the following profile script to set the profile attribute:
if(mbox.name == "mbox-cta-click" && mbox.param('ctaSource') == "1551876"){
return "true"
}
Hope this helps resolve the issue.