Asked By: Anonymous
I’ve added the google tag manager to the aurelia skeleton application.
I can create tags in the GTM and the app fires the events which I can see in the Google Analytics dashboard.
The problem is that the preview mode does not work.
The iframe shows up while the app is loading and then disappears.
What could be the cause of this?
Does preview mode work in a Single Page Application?
Here’s the link of the Aurelia App with GTM:
https://sofoklism.github.io/spm/#/
Solution
Answered By: Anonymous
Move aurelia-app="main"
from the <body>
to another element, a <div>
for example.
<body>
<!-- ... -->
<div aurelia-app="main">
<div class="splash"><!-- ... --></div>
</div>
<!-- ... -->
</body>
Aurelia replaces the content of the app host element, so any content added before .setRoot
completes gets removed.
This is how the splash screen gets removed.