Expand my Community achievements bar.

Javascript action loading in SPA


Level 4


we encounter this issue in an SPA application:

  • we have a rule which fires on a virtual page view
  • this rule is triggered by a custom event
  • the rule contains a Javascript action to fire a gtag event

The issue:

  • the gtag script is repetitively loaded into the page in a new script tag, each time a virtual pagehit is fired
  • since it is an SPA, and there is no "fresh" load of the actual page, scripts are building up in the DOM...

Schermafbeelding 2019-05-07 om 09.57.23.png

Anyone an idea how we can avoid this?

0 Replies