This is the snippet that we are trying to implement via DTM in a single page application.
It is being implemented on all pages in a single page application funnel where it fires as non-sequential HTML on the hashChange. The team I am working with is reporting that it is firing multiple times on each subsequent hashChange. So on the first page it will be once, the second page twice, etc through the funnel until the last page is loaded per hashChange.
I want to know what the solution is to have this only fire once as implemented.
My understanding is that the dataLayer isnt being emptied because no actual page refresh is occurring. I have tried to clear the dataLayer at the end of the function , but it then deletes the data before ever sending it to GTM.