Hello,
I'm having a few issues with firing events in a direct call rule.
The direct call rule is set up to fire on each section of a accordion type webpage. As the customer opens each section a satellite track with the DCR fires (it imitates a virtual page). This is all working as expected and updating props and eVars with values from a dataLayer. We update the dataLayer on each click so the DCR can capture the pageName and create the virtual page.
However I'm trying to set some events based on stages of these DCR firing (different pageNames).
For example if the customer hits the page and the DCR fires I want to set two events (one HIT and the other VISIT), I'm using this in the Adobe Analytics custom code:
/*Events - Start checkout*/
if (pageName == "step1") {
s.events = s.events ? s.events += ',' + 'event361,event461' : 'event361,event461';
}
This works but my problem is that the event is firing though each step, even if the pageName = "step2, 3, 4...."
I've tried amending the code to just simply
if (pageName == "step1")
s.events = event361
However it still persists through different steps
Hellllpppppp please, svp.