I’ve been battling this for the whole day and can’t wrap my head around how to do a pretty simple thing.
When user accesses the page with a ref= param I need to store it somewhere in order to trigger a URL on the thank-you page with the ref id and the order amount. Every other platform allows doing this super standard thing in like 5 minutes, but on Shopify? It seems like mission impossible.
I tried storing it in localStorage to realize that extensions run inside workers and have no access to localStorage. I tried getting the order from the useApi() just to realize there is no sum for me to add to the tracking code.
I tried using Shopify’s useStorage(), but this too, runs within its own environment. I’ve got landing pages which are hosted outside of Shopify and lead directly to the checkout page. Local storage was such a convenient option since the storage key stays as long as its the same domain…
Are there even solutions? How do people develop apps with custom tracking pixels and click ids?