I'm creating a plugin and I don't know how to receive information

My main question is how do i receive the information of the client web to my server, Matomo?
I’m using the tracking with js, but i dont know how transmit ,for example the coordinates of the mouse to my customize plugin, i know that i have to use an event, but where do i have to incorparate the code and how can i call that event in my plugin?

you need to create a trigger (on the tag manager window), there are bunch of types you can test them, and then create a tag (of type event) that will be linked to that trigger (these are all under the same window) (and also you need to create a container, which will hold all of your js code).