Forum Discussion
Can a Code Block in Rise 360 be used to add Google Analytics JavaScript? If so, how?
Hello!
I'm also trying to figure out if Code Block could be used for Google Analytics, which we use to track the # of visits to public-facing trainings.
I've been using the manual file modification method for some time now, but as Ashley mentioned, it's not the most sustainable process and is a challenge to maintain, especially across multiple projects and team members.
A Code Block that triggers a GA tag on load of the first lesson in the training would be ideal. I've tried testing this using Sam's code, but it doesn't seem like anything is being passed to GA.
Has anyone had any success with using the Code Block and GA? Or is this simply not possible with how Code Block functions in Rise?
I am trying the same thing and having the same problem -- nothing is getting passed to GA. I also tried manually editing the file, but something different is going wrong when I do that -- GA sees the data but the Rise page loads a blank page. We have older Rise courses hosted as webpages that we successfully used GA with, doing the manual file edit. But exporting my most recent Rise 360 course shows the index.html looks a lot different from courses built ~3 years ago. I am hosting on AWS.