Hi All,
I am creating an regional mbox for my implementation.
Below is the code that I have written. I am getting an error as shown in the snapshot .
Please let me know what is correct way to write the code in selector section(highlighted in bold in the code) for "adobe.target.applyOffer"
$('.col-lg-4.col-sm-6').eq(1).addClass('mbox-name-homepage-txt'); adobe.target.getOffer({ "mbox": "txt", "params":{ "name_of_page":"Profile Page3", "pro_uname": "Uber CRO3" }, "success": function(offer) { adobe.target.applyOffer({ "mbox": "txt","selector": ".col-lg-4.col-sm-6.eq(0)", offer: offer }) }, "error": function(status, error) { console.log('Error', status, error); } });
I have also used "selector": "(.col-lg-4.col-sm-6).eq(0)" and it is not working
Solved! Go to Solution.
Hi @avez try this:
$('.col-lg-4.col-sm-6').eq(1).addClass('mbox-name-homepage-secondary-4'); adobe.target.getOffer({ "mbox": "homepage-secondary-4", "params":{ "name_of_page":"Profile Page3", "pro_uname": "Uber CRO3" }, "success": function(offer) { adobe.target.applyOffer({ "mbox": "homepage-secondary-4","selector": ".mbox-name-homepage-secondary-4", offer: offer }) }, "error": function(status, error) { console.log('Error', status, error); } });
Hi @avez try this:
$('.col-lg-4.col-sm-6').eq(1).addClass('mbox-name-homepage-secondary-4'); adobe.target.getOffer({ "mbox": "homepage-secondary-4", "params":{ "name_of_page":"Profile Page3", "pro_uname": "Uber CRO3" }, "success": function(offer) { adobe.target.applyOffer({ "mbox": "homepage-secondary-4","selector": ".mbox-name-homepage-secondary-4", offer: offer }) }, "error": function(status, error) { console.log('Error', status, error); } });
Thank @ambikaTewari_ATCI
It worked for me. But i am really confused why my code is not working .Is there any limitation/restriction from Adobe target about which selector we use in the code?
Views
Like
Replies