Automatically apply discount when customer is coming from a google shopping ads

I can detect when a customer has arrived on my store from a google shopping ad.

When this is the case, I want to apply a site-wide discount code. I know I can apply a discount code on the homepage by redirecting to homepage.com/discount/{discountCode}

But since the goodle adw lead to a product page, Im unsure how I can apply the discount, while keeping them on the product page the landed on.

Help appreaciated!

Sidenote (policy requirement): If you are planning to add the promotion in Google Merchant Center, then selective promotions based on users are not allowed. You can only show/use promotions that apply to all users regardless of where they came from.