Hidden Button/Component for Client/Server calls

Hi, I’d like to have a landing page when a user logs in that contains a hidden button (doesn’t necessarily have to be a button as long as it generates a client->server call). In the onLoad event of the page I’d like to use javascript that performs a .click on said button and sends some information to the server. What is the best way of achieving this?