I have a function that retrieves a visiting user's country name by doing an ip lookup. I currently have this function running through the execute method in my module's controller. The problem is that I need this to run on every page and not just the single controller page.
Since every controller is tied to a particular action I am not sure if keeping it in a controller is the correct solution, nor do I know how to run my controller on every page request.
Does anybody know how to do this?