How to capture custom URL parameters in Shopify apps and handle webhook configuration

Need help with Shopify app development

I’m building a Shopify application that needs to monitor affiliate traffic using a URL shortening service. The service adds custom parameters to URLs and I need to track which links generate sales.

Main issues I’m facing:

Custom parameter tracking: My URL shortener uses ?tracking_id={value} instead of standard Shopify parameters. I found landing_page_ref in the documentation but it only captures certain predefined parameters. How can I grab my custom parameter on the order confirmation page?

Webhook setup for marketplace apps: During development I can point webhooks to my local server. But when this becomes a public app, how should webhook URLs be configured? Can they run directly on Shopify’s infrastructure or do I need my own hosting?

Admin panel integration: What’s the best approach for adding configuration settings? Can I create custom admin pages within Shopify’s backend or do all settings need to be stored in app files?

Any guidance on these points would be really helpful. I’ve read through the docs but these specific scenarios aren’t clearly covered.