Passing Channel Information (Search Engine, Campaign, Website) to Contact Form

Hello everyone,

I would like to pass the channel information (such as search engine, campaign, website) through a cookie or other solution and include it in the submission of a contact form. Is there a recommended way to achieve this in Matomo, or perhaps an existing plugin that can help with this process?

Thanks in advance!