reactjsremix.run

Running google analytics script on Remix.run


I have built a web app with remix run and I want to add the Google analytics. How can I add the pure JS to head and body section without making the typescript angry?


Solution

  • This repository helped me out a lot: https://github.com/remix-run/examples/blob/main/google-analytics

    The one thing that tripped my up for a while was that I was developing on Brave browser which blocks analytics.

    Switching to Chrome, Firefox, Safari should do the trick.