Change webpage content using Form Based Composer and target-global-mbox
Hello, I'm currently facing some difficulties with the form-based composer and would greatly appreciate the community's guidance and expertise in resolving this matter.
Goal -- to update the hero section of my website's homepage using the form-based composer.
I'm specifically interested in hearing success stories from others who have achieved similar updates and would greatly appreciate any guidelines you can provide regarding the tagging and activity setup process.
To provide some context, I attempted to implement an activity targeting "Location 1" with the value 'hphero'. I ran a script in the console, and it successfully fetched and rendered the new hero experience as expected. However, when I added the same script to the tag manager (both sync and async versions) and tested it, the hero section flickered, which was not the desired outcome.
At this point, I'm struggling to fully comprehend the solution. Could you please explain how I can change the content inside a specific page div using the form-based composer in conjunction with the target-global-mbox? Additionally, I would like to know how I can accomplish the same content update using the form-based composer and a custom regional mbox around the hero section, without experiencing any flickering issues.
To provide some context, here is the script I utilized:
document.querySelector('#dcom_hero_global').classList.add("mbox-name-hphero");
adobe.target.getOffer({
"mbox": "hphero",
"params": {},
"success": function(offer) {
adobe.target.applyOffer({
"mbox": "hphero",
"selector": ".mbox-name-hphero",
"offer": offer
});
},
"error": function(status, error) {
console.log('AT Error', status, error);
}
});
Thank you very much!
Col
