Ruby on Rails 6 with Google Analytics, Turbolinks, and a Content Security Policy
Published in
4 min readMay 26, 2020
Having spent the past few years not adding Google Analytics to Ruby on Rails websites it came as a shock to find such poor support for it “out of the box”. If you follow the Google Analytics setup and copy and paste their script into the head
of your HTML you might run into a host of conflicts. Chief among them are Content Security Policy (CSP) and…