How can I trigger my custom statistics script on every page "load"?

Thank you! That did the trick.

Do you also happen to know how I can get the UI language from the user’s settings?