Add custom note to orders from referral URL

I am looking for a way to automatically tag orders that have come from third-party referrals. Here is the specific scenario I am imaging:

  1. A third-party refers a customer to my Shopify page (perhaps through a unique URL)

  2. The customer orders an item from my Shopify page

  3. The order contains a note / tag so we can attribute the sale to the third-party referrer

Is there a way to set this up in Shopify?