As an easy solution, persisting the query parameters through the entire site to the checkout seems like an obvious solution, but I'm wondering if there's either a Shopify setting or app that allows this, or if I should be coding it myself.
If I can't persist the query parameters through, are there any storeable attributes that can be used on the frontend of the site before the cart (ie. product page), that is accessible on the Additional Scripts area of the Receipt. IE. using utm parameters in the URL and printing this URL parameters in additional scripts.