Not sure that this helps your issue, but I'll answer your question for you.
<img src="http://www.somedomain.com/image.jpg" id="thisImage" />
var somevalue = "whatever you want to collect";
document.getElementById('thisImage').src += '?newParam=' + somevalue;
But.. that will cause your pages to hit that image twice. Once when the img is first created, then again when the src is rewritten with the parameter appended to it.
If you want to have only one request to that image fire...
2- Hppend the img to the document, like this (one of many ways):
var img = document.createElement('img');
var someValue = 'value you want to collect';
img.src='http://www.somedomain.com/image.jpg?newparam=' + someValue;
The second approach might be helpful for you... if you suspect your image is being cached, adding a random number to the URL should get around the cache issue.