Getting shopOrigin from embedded app

New Member
1 0 0

Hi all,

I am stuck on this for days and I could really use some help. My main question is how do I send the shopOrigin from my embedded app to my backend?

What I've tried:

- Setting up the shopOrigin in a cookie. That works perfectly on normal circumstances, but when you are in incognito mode unfortunately you can't set the cookie. (app was rejected due to this reason)

- Trying to get the shopOrigin from the URL. I tried this:

const url = document.location.href
shopOrigin = url.split('&shop=')[1].split('&timestamp')[0];

However, once I navigate between the pages of my app this fails as the document.location.href returns the domain of my app and not the shopOrigin of the merchant.


I could really use some help on this and an example of how other people are solving this. Many thanks in advance.