If a customer lands on any page of the Shopify site (not Plus), with a referral parameter in GET (?ref=something
), how can this value be carried over to the checkout and order confirmation pages, where the domain is different?
One idea I had was to set a cookie on our domain, and then modify URL one navigates to upon clicking Checkout to include the values of the cookies, but I am unsure if this is the cleanest way, and where the best place to modify the URL would be.
I see that _ga
parameter appears to be included automatically, in checkout URL. How can this be done for custom GET parameters?
2
Answers
One is the tricky way for doing this by modifying the checkout URL before submitting.
For doing this on your cart.liquid file find the form with action=”/cart” and add attribute:
And add the javascript code at the bottom of your theme.liquid file :
Hope this will solve your problem.
Note that the ref and landing page are automatically stored by Shopify, meaning without you doing anything, you get those values in the order placed by the customer. You do not have manually manipulate them as per this thread.
Why do you need the value on checkout (you can do nothing with it anyway) and why on the order confirmation where again, it serves no purpose for the customer?