Closed stcoats closed 1 year ago
Update: removing the Analytics code from the footer.vm file has unintended consequences. It works as intended, as far as I can tell, if the code I changed is both in header.vm, in the head, and in footer.vm. But I don't really understand the overall system architecture, so I will close the pull request!
Curious what you mean by unintended consequences? I haven't worked with gtag a lot so I can't tell you exactly what's happening here though. I'll look at it in due time, but in the meantime, if you'd like to take another shot to get it working for yourself:
Logging specificially is pretty cut and dry. The application just calls a hardcoded window.ga
or Vue.$plausible()
here and there. So at least that's pretty cut and dry. You might have to hunt them down (a global search for ga(
should find them all ) and replace them by calls to gtag
(and maybe slightly change the arguments if the spec changed, but I'm not up to date on this).
Re. architecture:
.war
by maven]) and defines some specific global variables required on only that page.
Changed header.vm and footer.vm to get the Google Analytics plugin working correctly.