Stats-tracker and crossdomain problem?

Stats-tracker and crossdomain problem?

Hey,

I want to do the following to track and view simple stats:

1. collect stats on page load
include a .js snippet in a random page that sends some params to a certain URL (I guess GET is more suitable than POST because of the reload-warning)

how would you do that? I think there might be problems with cross domain calls?
I don't need to return a result or anything


2. get image url on page load
a simple snippet/call on page load that fetches the stats-image url from an endpoint (same as above) and inserts the image url into an image tag to display the image (google graph api is used)

Here I'm also not sure about the call because of cross domain problems

How is this usually done?