Script Tag display popup content in iframe or custom script code. How to find the shop domain ?

New Member
6 0 0


I am newbie creating an app for shopify stores. I am able to authenticate and was able to add the script tag to merchant's store. I would like to add a popup on home page load. I figured there are 2 ways i can display content for the popup. I can display the content in an iFrame which is hosted on my server or I can also write custom javascript to add the elements. I am struggling to find the best way to do this. can anyone please help me find out which route should I do and what are the pros and cons of each method ?

Second question I have is how to find the merchant's shop ? Merchants are using custom domains so how can I find from which shop the request came and how to link it to the shop at my backend ?