We have migrated DTM to Launch and testing it. while I am testing the site, I see repeating event string appended to the events variable.
I have main page load event. that set to add event1, event42.
when user scroll down the content, I am calling a direct rule that add additional events (event1, event41, event51, event42). But this direct rule will be triggered again and again when user scroll through the page. It was working fine as expected in DTM. But after migration, when direct rules are called, it is appending events to each calls.
1st call (pageload): event1,event42
1st direct rule: event1,event42,event1,event41,event51,event42
2nd direct rule: event1,event42,event1,event41,event51,event42,event1,event41,event51,event42
First of all: Do your rules have a Clear Variables Action (this is needed in Launch compared to DTM)?
Second: if yes, what version of the Analytics Extension are you using. There seems to be a bug in AppMeasurement.js 2.11.0 which is part of the Extension since 1.6.0 that sometimes doesn't clear events even when using Clear Variables action: What are possible reasons why ClearVariable fails?
If you don't want to clear your variables between these calls, you may have to add custom logic, with code. I am using a simple helper method where the first parameter is s.events and the second a string containing one or more events separated by a comma: