Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Javascript action loading in SPA

stefanm38281801
Level 4
Level 4

Hi

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