Hi John,
If I understand you correctly, you can pass a ref id in the url like this: "http://www.example.com?refid=XX." In the form, create a hidden field that looks at the URL attribute of "refid."
Here's another discussion which might help:
https://community.marketo.com/MarketoDiscussionDetail?id=90650000000PqQDAA0
Good luck,
Erik