If I understand you right, you are (essentially) passing a chunk of code for others to use, but you want to be able to keep an eye on where it’s being used… Is this correct?
I don’t know if this would work for you or not but one simple thing you could do is just create a 1 pixel image, store it on YOUR server. Then have the script call that image some Then in your logs, you would see that site X has made a request for the image. Generally (depending upon your configuration) it would also have the referrer.
You could then right a script to chug through your logs and parse the data that you need.