I am trying to add a trigger on adobe launch to fire a rule when the site has a specific data layer event.
I did it in the past to fire a rule when someone clicked three times on the site:
window.addEventListener('click', function (event) {
If (event.detail === 3) {
trigger();
});
, but I'm lost in archiving it with data layer events. I will intend to create a listener to fire the rule on the event "show" from this data layer object:
window.adobeDataLayer = window.adobeDataLayer || [];
window.adobeDataLayer.push({
"event": "show",
"eventInfo": {
"reference": "component.accordion-1-item-2"
},
"component": {
"accordion-1": {
"shownItems": [
"component.accordion-1-item-1",
"component.accordion-1-item-2"
]
}
}
});