One can add note
, attributes
and ref
vars to Shopify URLs for conversion tracking as described here:
Shopify Conversion Tracking Documentation
How can I execute extra code if one of these vars exists in the URL? I need to run code right when the URL is initially visited and I also need to run code if the customer completes the purchase.
Supposedly if I have a Shopify Plus plan then I can create my own layout/checkout.liquid
templates and write some JavaScript code that will do what I need. But we don't have a Shopify Plus plan.
I've also heard that I can write code in Admin > Settings > Checkout > Order Processing > Additional Scripts
in order to respond to these URL vars but supposedly this option will only allow me to respond on the purchase finished page but not when the URL is initially visited.
Are there any other options? Can I do all of this with a Shopify app?