How to insert discount code into URL so discount is auto-applied to all prices

I spoke to Shopify about this → It turns out that when adding redirect, platform clears cookies and this is why it would never work.