app.js at the top of your app's
<head> element. It has no dependencies but plays well with other libraries like jQuery.
The SDK should be initialized with the API key and shop's origin immediately after including the
This makes the
ShopifyApp object available and ready for use.
The script detects if your app was loaded inside an iframe. If not, it will create a redirection back into the relative embedded URL in the Shopify admin. This functionality can be disabled by passing
forceRedirect: false as a configuration option.
You can include a
debug: true option as well to get detailed output into
On every page of your app that you'd like embedded, you should include an inline script tag which defines the behavior of the Shopify admin chrome in relation to your application. Here is a sample inline script for an embedded app view:
Once initialized, you can use any of the API methods and features provided with the SDK Embedded App SDK. Learn more about the available API methods in the Shopify Embedded App SDK ›